diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-03-22 22:15:36 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-05 17:17:52 +0100 |
commit | ab4f6fc5cab3e65448145fda2995dc75bd866a2a (patch) | |
tree | 8503369d1a3a94f0b24774fd1bc7b66cb3c8dbac /src/menu/drawable_control.hpp | |
parent | 384f60e9ffe300c511ecd5e6bb7b73bc2e277d53 (diff) | |
download | usdx-ab4f6fc5cab3e65448145fda2995dc75bd866a2a.tar.gz usdx-ab4f6fc5cab3e65448145fda2995dc75bd866a2a.tar.xz usdx-ab4f6fc5cab3e65448145fda2995dc75bd866a2a.zip |
menu: frame should not be added to container item list
if a frame is constructed, it needs a container as parent to get the
size of it, but it should not be in the container item list and should
be painted first, to be under every component
the inner classes are used as helper classes, to be able to call a
virtual method in the constructor of drawable_control to decide
whether to add the control to the controls list of the container or
not
Diffstat (limited to '')
-rw-r--r-- | src/menu/drawable_control.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp index 5605ab62..a2f672c6 100644 --- a/src/menu/drawable_control.hpp +++ b/src/menu/drawable_control.hpp @@ -41,8 +41,21 @@ namespace usdx { private: static log4cpp::Category& log; + + protected: Container* parent; + class ContainerHelper + { + private: + DrawableControl* self; + + public: + ContainerHelper(DrawableControl*); + virtual void add(Container*) const; + }; + DrawableControl(Container*, const ContainerHelper&); + public: DrawableControl(Container*); virtual ~DrawableControl(); |