#pragma once #include #include #include namespace psemek::ui { struct screen : container { enum class x_policy { left, center, right, fill, floating, }; enum class y_policy { top, center, bottom, fill, floating, }; screen(); children_range children() const override; bool add_child(std::shared_ptr c, x_policy x, y_policy y); bool add_child(std::shared_ptr c) override; bool has_child(element * c) const override; std::shared_ptr remove_child(element * c) override; bool move_to_top(element * c); struct shape const & shape() const override { return shape_; } void reshape(geom::box const & bbox) override; geom::box size_constraints() const override; bool transparent() const override { return !hint(); } void draw(painter &) const override {} ~screen() override; private: container_impl container_; box_shape shape_; struct policy { x_policy x; y_policy y; }; std::vector policies_; }; }