diff options
Diffstat (limited to '')
-rw-r--r-- | src/menu/control.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/menu/control.cpp b/src/menu/control.cpp index 373fb482..68b5c328 100644 --- a/src/menu/control.cpp +++ b/src/menu/control.cpp @@ -24,15 +24,31 @@ * $Id$ */ +#include <stddef.h> #include "control.hpp" namespace usdx { - Control::Control() + Control::Control(Control *parent) + : parent(parent) { } Control::~Control() { + if (parent) { + delete parent; + parent = NULL; + } + } + + void Control::set_parent(Control *parent) + { + this->parent = parent; + } + + Control* Control::get_parent(void) const + { + return parent; } }; |