30 #ifndef Pt_Forms_FlowLayout_H
31 #define Pt_Forms_FlowLayout_H
33 #include <Pt/Forms/Api.h>
34 #include <Pt/Forms/Layout.h>
40 class PT_FORMS_API FlowLayout :
public Layout
59 explicit FlowLayout(Direction d = Left);
61 virtual ~FlowLayout();
63 void setDirection(Direction d);
65 void setCenter(
bool b);
67 void setReverse(
bool b);
69 void addItem(Control& control);
71 void removeItem(Control& control);
74 virtual Gfx::SizeF onMeasure(
const SizePolicy& policy);
76 virtual void onLayout(
const Gfx::RectF& rect);
79 Gfx::SizeF onMeasureHorizontal(
const SizePolicy& policy);
81 Gfx::SizeF onMeasureVertical(
const SizePolicy& policy);
83 void onLayoutLeft(
const Gfx::RectF& rect,
bool center);
85 void onLayoutRight(
const Gfx::RectF& rect,
bool center);
87 void onLayoutTop(
const Gfx::RectF& rect,
bool center);
89 void onLayoutBottom(
const Gfx::RectF& rect,
bool center);
101 #endif // include guard