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 &);
32 void add_child_type(const std::string &);
34 Widget &get_last_widget();
38 void child(const std::string &);
39 void constraint(Layout::ConstraintType, const std::string &);
40 void expand(bool, bool);
42 void gravity(int, int);
51 class ArrangedLoader: public DataFile::Loader
54 typename T::Loader arr_loader;
57 ArrangedLoader(Loader &, T &);
64 Panel &operator=(const Panel &);
69 virtual const char *get_class() const { return "panel"; }
71 void set_layout(Layout *);
72 Layout *get_layout() { return layout; }
75 virtual void autosize_special(const Part &, Geometry &) const;
76 virtual void render_special(const Part &, GL::Renderer &) const;
79 virtual bool navigate(Navigation);
81 Widget *find_next_child(int, int, int, int, int) const;
82 static int compute_delta(int, int, int, int, int);
84 virtual void on_geometry_change();
85 virtual void on_child_added(Widget &);
86 virtual void on_child_removed(Widget &);