1 #ifndef MSP_GLTK_LAYOUT_H_
2 #define MSP_GLTK_LAYOUT_H_
6 #include <sigc++/trackable.h>
32 ABOVE = VERTICAL|SELF_POS|TARGET_POS|TARGET_DIM|SPACING,
33 BELOW = VERTICAL|SELF_POS|SELF_DIM|TARGET_POS|SPACING,
34 RIGHT_OF = HORIZONTAL|SELF_POS|TARGET_POS|TARGET_DIM|SPACING,
35 LEFT_OF = HORIZONTAL|SELF_POS|SELF_DIM|TARGET_POS|SPACING,
36 ALIGN_TOP = VERTICAL|SELF_POS|SELF_DIM|TARGET_POS|TARGET_DIM,
37 ALIGN_BOTTOM = VERTICAL|SELF_POS|TARGET_POS,
38 ALIGN_RIGHT = HORIZONTAL|SELF_POS|SELF_DIM|TARGET_POS|TARGET_DIM,
39 ALIGN_LEFT = HORIZONTAL|SELF_POS|TARGET_POS,
40 COPY_WIDTH = HORIZONTAL|SELF_DIM|TARGET_DIM,
41 COPY_HEIGHT = VERTICAL|SELF_DIM|TARGET_DIM
52 Constraint(ConstraintType, Slot &);
63 struct Slot: public sigc::trackable
69 std::list<Constraint> constraints;
73 Slot(Layout &, Widget &);
76 void autosize_changed();
83 std::list<Slot *> slots;
88 static Pointers pointers[2];
94 void set_container(Container &);
95 void set_margin(const Sides &);
96 void set_spacing(unsigned);
97 void set_row_spacing(unsigned);
98 void set_column_spacing(unsigned);
100 void add_widget(Widget &);
101 void remove_widget(Widget &);
103 virtual Slot *create_slot(Widget &);
104 Slot &get_slot_for_widget(Widget &);
105 static ConstraintType complement(ConstraintType);
107 void add_constraint(Widget &, ConstraintType, Widget &);
108 void set_gravity(Widget &, int, int);
109 void set_expand(Widget &, bool, bool);
114 void find_constraint_group(Slot &, ConstraintType, std::set<Slot *> &);
115 void sort_slots(std::list<Slot *> &, ConstraintType);
116 void solve_constraints(int);