#include namespace psemek::ui::impl { shape_reader_base::shape_reader_base() : shape_(geom::box{{{0.f, 0.f}, {0.f, 0.f}}}) {} void shape_reader_base::reshape(geom::box const & new_shape) { single_container::reshape(new_shape); if (auto child = this->child()) child->reshape(new_shape); shape_.set(new_shape); } react::value shape_reader_base::size_constraints() const { if (auto child = this->child()) return child->size_constraints(); return size_constraints::max(); } void shape_reader_base::update(shape_reader const & value) { shape_ = value.shape; shape_.set(shape()); } }