From f90650efb7175957892d18097954ffd3aa59dc95 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 18 Oct 2020 21:40:23 +0800 Subject: ... --- include/cru/ui/UiHost.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/cru') 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 { 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 { Control* focus_control_; // "focus_control_" can't be nullptr Control* mouse_captured_control_; + + bool layout_prefer_to_fill_window_ = true; }; } // namespace cru::ui -- cgit v1.2.3