]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.h
Adapt to DataFile changes
[libs/gltk.git] / source / panel.h
index 7a94dcd0fdb5f02f8778afaebf1c6b298a2de418..bf17829c101449747c07a23d61170811dcb08d4c 100644 (file)
@@ -9,20 +9,43 @@ namespace GLtk {
 class Panel: public Widget
 {
 public:
+       class Loader: public Widget::Loader
+       {
+       private:
+               Panel &panel;
+               std::map<std::string, Widget *> &wdg_map;
+       
+       public:
+               Loader(Panel &, std::map<std::string, Widget *> &);
+       private:
+               template<typename T>
+               void child(const std::string &);
+       };
+
        Panel(const Resources &);
        ~Panel();
+
        void add(Widget &);
+       void button_press(int, int, unsigned);
+       void button_release(int, int, unsigned);
+       void pointer_motion(int, int);
+       void key_press(unsigned, unsigned, wchar_t);
+       void key_release(unsigned, unsigned);
+       void focus_out();
 private:
        typedef std::list<Widget *> ChildSeq;
 
        ChildSeq children;
+       Widget *pointer_focus;
+       unsigned pointer_grab;
+       Widget *input_focus;
 
        Panel(const Panel &);
        Panel &operator=(const Panel &);
        const char *get_class() const { return "panel"; }
        void render_part(const Part &) const;
-       void on_button_press(int, int, unsigned);
-       void on_button_release(int, int, unsigned);
+       void set_pointer_focus(Widget *);
+       void set_input_focus(Widget *);
 };
 
 } // namespace GLtk