- Panel(const Resources &);
- ~Panel();
-
- void add(Widget &);
- void remove(Widget &);
-
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual void pointer_motion(int, int);
- virtual void key_press(unsigned, unsigned, wchar_t);
- virtual void key_release(unsigned, unsigned);
- virtual void focus_out();
-private:
- virtual const char *get_class() const { return "panel"; }
- virtual void render_part(const Part &) const;
- void set_pointer_focus(Widget *);
- void set_input_focus(Widget *);
- Widget *get_child_at(int, int);
+ Panel();
+ virtual ~Panel();
+
+ template<typename T>
+ static void register_child_type(const std::string &);
+
+ const char *get_class() const override { return "panel"; }
+
+ void set_layout(Layout *);
+ Layout *get_layout() { return layout; }
+
+protected:
+ void autosize_special(const Part &, Geometry &) const override;
+ void render_special(const Part &, GL::Renderer &) const override;
+
+public:
+ bool navigate(Navigation) override;
+protected:
+ Widget *find_next_child(int, int, int, int, int) const;
+ static int compute_delta(int, int, int, int, int);
+
+ void on_size_change() override;
+ void on_child_added(Widget &) override;
+ void on_child_removed(Widget &) override;