]> git.tdb.fi Git - libs/gltk.git/blob - source/panel.h
Add key events
[libs/gltk.git] / source / panel.h
1 #ifndef MSP_GLTK_PANEL_H_
2 #define MSP_GLTK_PANEL_H_
3
4 #include "widget.h"
5
6 namespace Msp {
7 namespace GLtk {
8
9 class Panel: public Widget
10 {
11 public:
12         Panel(const Resources &);
13         ~Panel();
14
15         void add(Widget &);
16         void button_press(int, int, unsigned);
17         void button_release(int, int, unsigned);
18         void pointer_motion(int, int);
19         void key_press(unsigned, unsigned, wchar_t);
20         void key_release(unsigned, unsigned);
21         void focus_out();
22 private:
23         typedef std::list<Widget *> ChildSeq;
24
25         ChildSeq children;
26         Widget *pointer_focus;
27         unsigned pointer_grab;
28         Widget *input_focus;
29
30         Panel(const Panel &);
31         Panel &operator=(const Panel &);
32         const char *get_class() const { return "panel"; }
33         void render_part(const Part &) const;
34         void set_pointer_focus(Widget *);
35         void set_input_focus(Widget *);
36 };
37
38 } // namespace GLtk
39 } // namespace Msp
40
41 #endif