1 #ifndef MSP_GLTK_ARRANGEMENT_H_
2 #define MSP_GLTK_ARRANGEMENT_H_
13 class arrangement_error: public std::logic_error
16 arrangement_error(const std::string &w): std::logic_error(w) { }
17 virtual ~arrangement_error() throw() { }
33 std::list<Widget *> widgets;
38 bool empty() { return widgets.empty(); }
40 void add(Widget &, bool);
48 Arrangement(Layout &);
50 virtual ~Arrangement();
52 void arrange(Widget &);
53 void arrange(Arrangement &);
56 virtual void process_widget(Widget &, Side, bool) = 0;
57 virtual void finish_widget(Widget &) = 0;
58 virtual void finish_slot() = 0;
59 const Edge &get_edge(Side s) const { return edges[s]; }
60 void add_constraint(Widget &, Layout::ConstraintType, Side);
61 void add_constraint(Widget &, Layout::ConstraintType, const Edge &);
63 static Layout::ConstraintType get_order_constraint(Side, bool);
64 static Layout::ConstraintType get_align_constraint(Side);