aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/control.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-09-14 22:26:19 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:41:06 +0100
commit780382ab640815e8e92c59d9147432df855359b4 (patch)
tree46042fa245aa4002dc2188b2f1722bce130c1313 /src/menu/control.hpp
parentc85f1cde101d5c6c8912c1131d4d43a828d87015 (diff)
downloadusdx-780382ab640815e8e92c59d9147432df855359b4.tar.gz
usdx-780382ab640815e8e92c59d9147432df855359b4.tar.xz
usdx-780382ab640815e8e92c59d9147432df855359b4.zip
menu: add some comments
Diffstat (limited to '')
-rw-r--r--src/menu/control.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/menu/control.hpp b/src/menu/control.hpp
index cb18c330..b821e79b 100644
--- a/src/menu/control.hpp
+++ b/src/menu/control.hpp
@@ -29,9 +29,17 @@
namespace usdx
{
+ /**
+ * Base class for all controls, either the drawable ones as well as the
+ * hidden ones. This class handles a owner slave relation ship and handles
+ * automatic destruction on destruction of the owner,
+ */
class Control
{
private:
+ /**
+ * Owner of this control. The owner is responsible for destruction.
+ */
Control* owner;
protected:
@@ -44,6 +52,11 @@ namespace usdx
Control(Control*);
virtual ~Control();
+ /**
+ * Change the current owner of this component. This requires to
+ * unregister this control at the old owner and register it again
+ * withthe new owner.
+ */
void set_owner(Control*);
Control* get_owner(void) const;
};