diff options
author | crupest <crupest@outlook.com> | 2018-09-02 16:25:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-02 16:25:47 +0800 |
commit | 09e480f0c956a16751a535558b84431ea47cd38f (patch) | |
tree | f98aa86d2b23970c7d03ea2463ea120d06838e17 /CruUI/ui/control.h | |
parent | f3d62dec00748a306af658b87bffc54e4949a4f4 (diff) | |
download | cru-09e480f0c956a16751a535558b84431ea47cd38f.tar.gz cru-09e480f0c956a16751a535558b84431ea47cd38f.tar.bz2 cru-09e480f0c956a16751a535558b84431ea47cd38f.zip |
...
Diffstat (limited to 'CruUI/ui/control.h')
-rw-r--r-- | CruUI/ui/control.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CruUI/ui/control.h b/CruUI/ui/control.h index f9c47a95..588eda17 100644 --- a/CruUI/ui/control.h +++ b/CruUI/ui/control.h @@ -80,7 +80,7 @@ namespace cru } //Traverse the tree rooted the control. - void TraverseDescendants(const std::function<void(Control*)>& predicate); + void TraverseDescendants(Action<Control*>&& predicate); //*************** region: position and size *************** // Position and size part must be isolated from layout part. @@ -225,11 +225,16 @@ namespace cru virtual void OnLayout(const Rect& rect); private: + // Only for layout manager to use. + void CheckAndNotifyPositionChanged(); + + private: Window * window_; Control * parent_; std::vector<Control*> children_; + Point old_position_; Point position_; Size size_; |