diff options
author | crupest <crupest@outlook.com> | 2021-11-20 22:43:30 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-20 22:43:30 +0800 |
commit | a60910cb3db6f47fd8f3b7f31648a9d0514d4f2c (patch) | |
tree | 32c01c22e21742ae0c9febb2cbc26339f99eec1d /include/cru/ui/controls/RootControl.hpp | |
parent | 1a53ed0791d9793ed8030d3a44e833e5e7c4542b (diff) | |
download | cru-a60910cb3db6f47fd8f3b7f31648a9d0514d4f2c.tar.gz cru-a60910cb3db6f47fd8f3b7f31648a9d0514d4f2c.tar.bz2 cru-a60910cb3db6f47fd8f3b7f31648a9d0514d4f2c.zip |
...
Diffstat (limited to 'include/cru/ui/controls/RootControl.hpp')
-rw-r--r-- | include/cru/ui/controls/RootControl.hpp | 17 |
1 files changed, 3 insertions, 14 deletions
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<platform::gui::INativeWindow*> CreateNativeWindow( - gsl::not_null<host::WindowHost*> host, - platform::gui::INativeWindow* parent) = 0; - void SetGainFocusOnCreateAndDestroyWhenLoseFocus(bool value); private: |