diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-12-25 16:33:45 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:50 +0100 |
commit | 2d1c84a16c36869ca292b74348f2ef852f2f8a62 (patch) | |
tree | 6da35292564452e77dabb315507008da7652b0c0 /src/menu/container.hpp | |
parent | 0f42e8231f3af3d518a5c438ec41a3d849d37a29 (diff) | |
download | usdx-2d1c84a16c36869ca292b74348f2ef852f2f8a62.tar.gz usdx-2d1c84a16c36869ca292b74348f2ef852f2f8a62.tar.xz usdx-2d1c84a16c36869ca292b74348f2ef852f2f8a62.zip |
menu: Container could contains and draw DrawableControls
DrawableControls register/unregister itself during
construction/destruction at the Container (supplied as owner) and get
automatically drawn
Diffstat (limited to '')
-rw-r--r-- | src/menu/container.hpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/menu/container.hpp b/src/menu/container.hpp index 6ee6bde2..a558462e 100644 --- a/src/menu/container.hpp +++ b/src/menu/container.hpp @@ -28,7 +28,6 @@ #define CONTAINER_HPP #include <list> - #include "drawable_control.hpp" namespace usdx @@ -38,15 +37,15 @@ namespace usdx private: std::list<DrawableControl*> controls; + protected: + virtual void draw(void); + public: - Container(Control* parent); + Container(Container* parent); virtual ~Container(); - /** - * Method for redraw all contained objects. - */ - void repaint(void); - + void add(DrawableControl *child); + void remove(DrawableControl *child); }; }; |