30 lines
765 B
C++
30 lines
765 B
C++
#pragma once
|
|
|
|
#include <psemek/ui/impl/container.hpp>
|
|
#include <psemek/ui/stack_layout.hpp>
|
|
#include <psemek/react/value.hpp>
|
|
#include <psemek/react/source.hpp>
|
|
|
|
namespace psemek::ui::impl
|
|
{
|
|
|
|
struct stack_layout_base
|
|
: container
|
|
{
|
|
stack_layout_base();
|
|
|
|
void reshape(geom::box<float, 2> const & new_shape) override;
|
|
react::value<struct size_constraints> size_constraints() const override;
|
|
|
|
void set_children(std::vector<std::unique_ptr<component>> children) override;
|
|
std::vector<std::unique_ptr<component>> release_children() override;
|
|
|
|
void update(stack_layout const &)
|
|
{}
|
|
|
|
private:
|
|
react::source<std::vector<react::value<struct size_constraints>>> children_size_constraints_;
|
|
react::value<struct size_constraints> size_constraints_;
|
|
};
|
|
|
|
}
|