aboutsummaryrefslogtreecommitdiff
path: root/src/ui/window.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-10 22:11:05 +0800
committercrupest <crupest@outlook.com>2018-11-10 22:11:05 +0800
commit9cf812f77a879d5394a9158ce290f9d7e858de7d (patch)
tree83bbf3a45687be0a4f22840e295d988972de7b34 /src/ui/window.hpp
parente5513daa53cb958b0c83d575c440f40aaf40f562 (diff)
downloadcru-9cf812f77a879d5394a9158ce290f9d7e858de7d.tar.gz
cru-9cf812f77a879d5394a9158ce290f9d7e858de7d.tar.bz2
cru-9cf812f77a879d5394a9158ce290f9d7e858de7d.zip
Refactor layout invalidation system.
Diffstat (limited to 'src/ui/window.hpp')
-rw-r--r--src/ui/window.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/window.hpp b/src/ui/window.hpp
index 963bff78..05b1a259 100644
--- a/src/ui/window.hpp
+++ b/src/ui/window.hpp
@@ -192,8 +192,12 @@ namespace cru::ui
//*************** region: layout ***************
+ void WindowInvalidateLayout();
+
void Relayout();
+ void SetSizeFitContent(const Size& max_size = Size(1000, 1000));
+
//*************** region: functions ***************
//Refresh control list.
@@ -319,7 +323,9 @@ namespace cru::ui
Control* focus_control_ = this; // "focus_control_" can't be nullptr
Control* mouse_capture_control_ = nullptr;
-
+
+ bool is_layout_invalid_ = false;
+
#ifdef CRU_DEBUG_LAYOUT
bool debug_layout_ = false;
#endif