From ab4f6fc5cab3e65448145fda2995dc75bd866a2a Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 22 Mar 2012 22:15:36 +0100 Subject: 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 --- src/menu/container.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/menu/container.cpp') diff --git a/src/menu/container.cpp b/src/menu/container.cpp index 379dd7c1..755a8b3b 100644 --- a/src/menu/container.cpp +++ b/src/menu/container.cpp @@ -37,6 +37,11 @@ namespace usdx { } + Container::Container(Container* owner, const ContainerHelper& add) + : DrawableControl(owner, add), frame(NULL) + { + } + Container::~Container() { controls.clear(); -- cgit v1.2.3