aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/control.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-13 23:11:52 +0800
committercrupest <crupest@outlook.com>2018-09-13 23:11:52 +0800
commit42f9f6c0bce5b3bea05edf4e371539fe21ea1c5d (patch)
tree53ddeb189912572fc45faaf1dffaad9a0e373d26 /CruUI/ui/control.h
parent9f6803884704e277fe49ed046344ddaa44a7fd19 (diff)
downloadcru-42f9f6c0bce5b3bea05edf4e371539fe21ea1c5d.tar.gz
cru-42f9f6c0bce5b3bea05edf4e371539fe21ea1c5d.tar.bz2
cru-42f9f6c0bce5b3bea05edf4e371539fe21ea1c5d.zip
...
Diffstat (limited to 'CruUI/ui/control.h')
-rw-r--r--CruUI/ui/control.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/CruUI/ui/control.h b/CruUI/ui/control.h
index 41401008..0c19f305 100644
--- a/CruUI/ui/control.h
+++ b/CruUI/ui/control.h
@@ -29,7 +29,10 @@ namespace cru
friend class Window;
friend class WindowLayoutManager;
protected:
+ struct WindowConstructorTag {};
+
explicit Control(bool container = false);
+ Control(WindowConstructorTag, Window* window);
public:
Control(const Control& other) = delete;
@@ -251,8 +254,10 @@ namespace cru
private:
bool is_container_;
- Window * window_;
+ protected:
+ Window * window_; // protected for Window class to write it as itself in constructor.
+ private:
Control * parent_;
Vector<Control*> children_;