29 #ifndef PT_FORMS_TABLELAYOUT_H
30 #define PT_FORMS_TABLELAYOUT_H
32 #include <Pt/Forms/Api.h>
33 #include <Pt/Forms/Layout.h>
40 class PT_FORMS_API TableLayout :
public Layout
56 virtual ~TableLayout();
58 void addItem(Control& control, std::size_t row, std::size_t column);
60 void removeItem(Control& control);
62 void setColumn(std::size_t col, SizeMode mode,
double size = 0);
64 void setRow(std::size_t row, SizeMode mode,
double size = 0);
67 virtual void onRemoveControl(Control& control);
69 virtual Gfx::SizeF onMeasure(
const SizePolicy& policy);
71 virtual void onLayout(
const Gfx::RectF& rect);
82 SizeInfo(SizeMode m,
double size)
93 void setSize(
double s)
101 std::vector<SizeInfo> _columnSizes;
102 std::vector<SizeInfo> _rowSizes;
104 typedef std::vector<Control*> Row;
105 std::vector<Row> _rows;