aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/control.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-02 15:02:51 +0800
committercrupest <crupest@outlook.com>2018-09-02 15:02:51 +0800
commitf3d62dec00748a306af658b87bffc54e4949a4f4 (patch)
tree5b5c81605838595b16eb868cb0d216f37bac0500 /CruUI/ui/control.h
parentd0fe3828bdda050316a331cefecec88987963b3e (diff)
downloadcru-f3d62dec00748a306af658b87bffc54e4949a4f4.tar.gz
cru-f3d62dec00748a306af658b87bffc54e4949a4f4.tar.bz2
cru-f3d62dec00748a306af658b87bffc54e4949a4f4.zip
...
Diffstat (limited to 'CruUI/ui/control.h')
-rw-r--r--CruUI/ui/control.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/CruUI/ui/control.h b/CruUI/ui/control.h
index e7fe2d45..f9c47a95 100644
--- a/CruUI/ui/control.h
+++ b/CruUI/ui/control.h
@@ -74,7 +74,10 @@ namespace cru
Control* GetAncestor();
//Get the window if attached, otherwise, return nullptr.
- Window* GetWindow();
+ Window* GetWindow() const
+ {
+ return window_;
+ }
//Traverse the tree rooted the control.
void TraverseDescendants(const std::function<void(Control*)>& predicate);