From 28c7884d0186ad80db7b9ffa12dd5e52bcb6c52b Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 23 Jun 2019 00:36:46 +0800 Subject: ... --- include/cru/ui/window.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/cru/ui/window.hpp') 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 { 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 -- cgit v1.2.3