aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-10-18 21:40:23 +0800
committercrupest <crupest@outlook.com>2020-10-18 21:40:23 +0800
commitf90650efb7175957892d18097954ffd3aa59dc95 (patch)
tree136bde01edf8c4f2c36f2aa0c7b8aecfc6577483 /include
parentc072432e68d7a3d7659add0994b2f8caf387ddf2 (diff)
downloadcru-f90650efb7175957892d18097954ffd3aa59dc95.tar.gz
cru-f90650efb7175957892d18097954ffd3aa59dc95.tar.bz2
cru-f90650efb7175957892d18097954ffd3aa59dc95.zip
...
Diffstat (limited to 'include')
-rw-r--r--include/cru/ui/UiHost.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cru/ui/UiHost.hpp b/include/cru/ui/UiHost.hpp
index b1658ef6..01791de6 100644
--- a/include/cru/ui/UiHost.hpp
+++ b/include/cru/ui/UiHost.hpp
@@ -59,6 +59,11 @@ class UiHost : public Object, public SelfResolvable<UiHost> {
return &after_layout_event_;
}
+ // If true, preferred size of root render object is set to window size when
+ // measure. Default is true.
+ bool IsLayoutPreferToFillWindow() const;
+ void SetLayoutPreferToFillWindow(bool value);
+
void Relayout();
// Get current control that mouse hovers on. This ignores the mouse-capture
@@ -168,5 +173,7 @@ class UiHost : public Object, public SelfResolvable<UiHost> {
Control* focus_control_; // "focus_control_" can't be nullptr
Control* mouse_captured_control_;
+
+ bool layout_prefer_to_fill_window_ = true;
};
} // namespace cru::ui