1 #ifndef MSP_GLTK_PANEL_H_
2 #define MSP_GLTK_PANEL_H_
12 Panels are containers for other widgets. Panel styles should have a special
13 part "children" to render the child widgets. All properties of this part are
16 class Panel: public Container
19 class Loader: public Widget::Loader
22 typedef std::map<std::string, Widget *> WidgetMap;
29 Loader(Panel &, WidgetMap &);
32 void child(const std::string &);
33 void panel(const std::string &);
37 struct Child: public Container::Child
39 Child(Panel &, Widget *);
42 void visibility_changed(bool);
43 void autosize_changed();
46 void ungrab_pointer();
51 Widget *pointer_focus;
56 Panel &operator=(const Panel &);
61 virtual const char *get_class() const { return "panel"; }
63 void set_layout(Layout *);
64 virtual void autosize();
67 virtual Child *create_child(Widget *);
71 Widget *get_input_focus() const { return input_focus; }
72 Widget *get_final_input_focus() const;
75 virtual void render_special(const Part &, GL::Renderer &) const;
78 virtual void button_press(int, int, unsigned);
79 virtual void button_release(int, int, unsigned);
80 virtual void pointer_motion(int, int);
81 virtual void pointer_leave();
82 virtual void key_press(unsigned, unsigned);
83 virtual void key_release(unsigned, unsigned);
84 virtual void character(wchar_t);
85 virtual void focus_out();
87 virtual void on_geometry_change();
88 virtual void on_child_added(Widget &);
89 virtual void on_child_removed(Widget &);
91 void set_pointer_focus(Widget *);
92 void set_input_focus(Widget *);