diff options
author | crupest <crupest@outlook.com> | 2019-06-23 00:36:46 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-06-23 00:36:46 +0800 |
commit | 28c7884d0186ad80db7b9ffa12dd5e52bcb6c52b (patch) | |
tree | 0fd34fdd7bed27508a16cfeaf88cb0c3235cbd43 /include/cru/ui/window.hpp | |
parent | bf7e486b8908ed494925ff9643b55ccafbfdc434 (diff) | |
download | cru-28c7884d0186ad80db7b9ffa12dd5e52bcb6c52b.tar.gz cru-28c7884d0186ad80db7b9ffa12dd5e52bcb6c52b.tar.bz2 cru-28c7884d0186ad80db7b9ffa12dd5e52bcb6c52b.zip |
...
Diffstat (limited to 'include/cru/ui/window.hpp')
-rw-r--r-- | include/cru/ui/window.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/cru/ui/window.hpp b/include/cru/ui/window.hpp index 4bc0e41d..e175b234 100644 --- a/include/cru/ui/window.hpp +++ b/include/cru/ui/window.hpp @@ -1,6 +1,7 @@ #pragma once #include "content_control.hpp" +#include "cru/common/self_resolvable.hpp" #include "cru/platform/native/native_event.hpp" #include "event/ui_event.hpp" @@ -16,7 +17,7 @@ namespace render { class WindowRenderObject; } -class Window final : public ContentControl { +class Window final : public ContentControl, public SelfResovable<Window> { public: static constexpr auto control_type = L"Window"; @@ -46,6 +47,11 @@ class Window final : public ContentControl { Control* GetMouseHoverControl() const { return mouse_hover_control_; } + //*************** region: layout *************** + void Relayout(); + + void InvalidateLayout(); + //*************** region: focus *************** // Request focus for specified control. @@ -93,5 +99,7 @@ class Window final : public ContentControl { Control* mouse_hover_control_; Control* focus_control_; // "focus_control_" can't be nullptr + + bool need_layout_ = false; }; } // namespace cru::ui |