39 virtual void Clear()
override;
46 virtual std::shared_ptr<UIWidget>
CustomFindChild(ID
id)
const override;
49 std::shared_ptr<UIWidget> child;
53 std::vector<PackData> children;
54 unsigned int padding = 0;
55 Size2D GetChildSize(
unsigned int n)
const;
56 void TriggerChildResizes();
57 void RecalculateChildSizes(
int available_space);
58 Point2D GetChildLocation(
unsigned int n)
const;
59 unsigned int GetTotalSize()
const;
60 unsigned int GetChildMaxContra()
const;
65 UIBox(std::weak_ptr<Window> parent_window);
81 static std::shared_ptr<UIVBox>
Create(std::weak_ptr<Window> parent_window);
83 UIVBox(std::weak_ptr<Window> parent_window);
94 static std::shared_ptr<UIHBox>
Create(std::weak_ptr<Window> parent_window);
96 UIHBox(std::weak_ptr<Window> parent_window);
virtual Size2D DirectionalSize2D(int direction, int contra) const =0
virtual Point2D DirectionalPoint2D(int direction, int contra) const =0
void SetPadding(unsigned int padding)
static std::shared_ptr< UIVBox > Create(std::weak_ptr< Window > parent_window)
virtual Size2D DirectionalSize2D(int direction, int contra) const override
Definition: UIBox.hpp:89
UIVBox(std::weak_ptr< Window > parent_window)
virtual int ContradirectionalDimension(Size2D s) const override
Definition: UIBox.hpp:86
Definition: DrawContext.hpp:65
Point2D_< int > Point2D
Definition: Utilities.hpp:35
int height
Definition: Utilities.hpp:46
MouseButton
Definition: Utilities.hpp:190
virtual void CustomDraw(DrawContext &c) override __attribute__((hot))
virtual void CustomResize(Size2D) override
virtual int ContradirectionalDimension(Size2D s) const =0
virtual void Clear() override
virtual Point2D DirectionalPoint2D(int direction, int contra) const override
Definition: UIBox.hpp:90
virtual void OnChildVisibilityChanged() override
virtual int ContradirectionalDimension(Point2D s) const override
Definition: UIBox.hpp:88
virtual void CustomMouseEnter(Point2D) override
Definition: Utilities.hpp:34
virtual Point2D DirectionalPoint2D(int direction, int contra) const override
Definition: UIBox.hpp:103
int width
Definition: Utilities.hpp:46
virtual void CustomMouseMotion(Point2D p1, Point2D p2) override
Definition: UIContainer.hpp:60
T x
Definition: Utilities.hpp:62
UIHBox(std::weak_ptr< Window > parent_window)
Definition: Alertable.hpp:26
virtual void CustomMouseLeave(Point2D) override
virtual Point2D GetChildPos(std::shared_ptr< UIWidget >) const override
virtual int DirectionalDimension(Size2D s) const =0
virtual void OnChildRequestedSizeChanged() override
T y
Definition: Utilities.hpp:62
virtual Size2D DirectionalSize2D(int direction, int contra) const override
Definition: UIBox.hpp:102
virtual int DirectionalDimension(Size2D s) const override
Definition: UIBox.hpp:98
Subscription __attribute__((warn_unused_result)) Signal< Types...>
Definition: Signal.hpp:208
static std::shared_ptr< UIHBox > Create(std::weak_ptr< Window > parent_window)
virtual int DirectionalDimension(Size2D s) const override
Definition: UIBox.hpp:85
PackMode
Definition: UIBox.hpp:30
virtual int DirectionalDimension(Point2D s) const override
Definition: UIBox.hpp:87
virtual int DirectionalDimension(Point2D s) const override
Definition: UIBox.hpp:100
virtual std::shared_ptr< UIWidget > CustomFindChild(ID id) const override
UIBox(std::weak_ptr< Window > parent_window)
virtual bool CustomMousePress(bool down, MouseButton b, Point2D) override
Definition: Utilities.hpp:40
virtual int ContradirectionalDimension(Size2D s) const override
Definition: UIBox.hpp:99
void Insert(std::shared_ptr< UIWidget > w, PackMode m)
virtual int ContradirectionalDimension(Point2D s) const override
Definition: UIBox.hpp:101