From a60910cb3db6f47fd8f3b7f31648a9d0514d4f2c Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 20 Nov 2021 22:43:30 +0800 Subject: ... --- include/cru/ui/controls/RootControl.hpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'include/cru/ui/controls/RootControl.hpp') diff --git a/include/cru/ui/controls/RootControl.hpp b/include/cru/ui/controls/RootControl.hpp index a795f322..44722cef 100644 --- a/include/cru/ui/controls/RootControl.hpp +++ b/include/cru/ui/controls/RootControl.hpp @@ -4,11 +4,13 @@ #include "cru/common/Base.hpp" #include "cru/platform/gui/Base.hpp" #include "cru/ui/Base.hpp" +#include "cru/ui/host/WindowHost.hpp" namespace cru::ui::controls { class RootControl : public LayoutControl { protected: - explicit RootControl(Control* attached_control); + explicit RootControl(Control* attached_control, + host::CreateWindowParams params); public: CRU_DELETE_COPY(RootControl) @@ -18,20 +20,7 @@ class RootControl : public LayoutControl { public: render::RenderObject* GetRenderObject() const override; - void EnsureWindowCreated(); - - // If create is false and native window is not create, it will not be created - // and shown. - void Show(bool create = true); - - Rect GetRect(); - void SetRect(const Rect& rect); - protected: - virtual gsl::not_null CreateNativeWindow( - gsl::not_null host, - platform::gui::INativeWindow* parent) = 0; - void SetGainFocusOnCreateAndDestroyWhenLoseFocus(bool value); private: -- cgit v1.2.3