1 #ifndef MSP_GLTK_PANEL_H_
2 #define MSP_GLTK_PANEL_H_
11 Panels are containers for other widgets. Panel styles should have a special
12 part "children" to render the child widgets. All properties of this part are
15 class Panel: public Container
18 class Loader: public DataFile::DerivedObjectLoader<Panel, Widget::Loader>
21 typedef std::map<std::string, Widget *> WidgetMap;
28 Loader(Panel &, WidgetMap &);
31 Widget &get_last_widget();
35 void child(const std::string &);
36 void constraint(Layout::ConstraintType, const std::string &);
37 void expand(bool, bool);
39 void gravity(int, int);
42 void panel(const std::string &);
47 class ArrangedLoader: public DataFile::Loader
50 typename T::Loader arr_loader;
53 ArrangedLoader(Loader &, T &);
60 Panel &operator=(const Panel &);
65 virtual const char *get_class() const { return "panel"; }
67 void set_layout(Layout *);
68 Layout *get_layout() { return layout; }
71 virtual void autosize_special(const Part &, Geometry &) const;
72 virtual void render_special(const Part &, GL::Renderer &) const;
74 virtual void on_geometry_change();
75 virtual void on_child_added(Widget &);
76 virtual void on_child_removed(Widget &);