diff options
Diffstat (limited to 'src/menu/control.hpp')
-rw-r--r-- | src/menu/control.hpp | 13 |
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; }; |