]> git.tdb.fi Git - libs/gltk.git/blob - source/panel.h
31be7e57c1afb530c0ef58600d69c9e31110c12b
[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 private:
20         typedef std::list<Widget *> ChildSeq;
21
22         ChildSeq children;
23         Widget *pointer_focus;
24         unsigned pointer_grab;
25
26         Panel(const Panel &);
27         Panel &operator=(const Panel &);
28         const char *get_class() const { return "panel"; }
29         void render_part(const Part &) const;
30         void set_pointer_focus(Widget *);
31 };
32
33 } // namespace GLtk
34 } // namespace Msp
35
36 #endif