diff options
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 |