diff options
author | crupest <crupest@outlook.com> | 2021-11-20 19:47:53 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-20 19:47:53 +0800 |
commit | b0b86b6b9d6798d04a320060e90bd8497a7f50f9 (patch) | |
tree | a6e3f3315a538791e1cbd4e799bc6268262feedb /include/cru/ui/controls | |
parent | 2ad748a0fcb66398299886970cc9c40cc50b3cd0 (diff) | |
download | cru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.tar.gz cru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.tar.bz2 cru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.zip |
...
Diffstat (limited to 'include/cru/ui/controls')
-rw-r--r-- | include/cru/ui/controls/Popup.hpp | 1 | ||||
-rw-r--r-- | include/cru/ui/controls/RootControl.hpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/cru/ui/controls/Popup.hpp b/include/cru/ui/controls/Popup.hpp index d76e1211..321bbbc6 100644 --- a/include/cru/ui/controls/Popup.hpp +++ b/include/cru/ui/controls/Popup.hpp @@ -1,7 +1,6 @@ #pragma once #include "RootControl.hpp" -#include "cru/ui/Base.hpp" #include "cru/platform/gui/Base.hpp" #include <memory> diff --git a/include/cru/ui/controls/RootControl.hpp b/include/cru/ui/controls/RootControl.hpp index 53e69e7c..a795f322 100644 --- a/include/cru/ui/controls/RootControl.hpp +++ b/include/cru/ui/controls/RootControl.hpp @@ -32,6 +32,8 @@ class RootControl : public LayoutControl { gsl::not_null<host::WindowHost*> host, platform::gui::INativeWindow* parent) = 0; + void SetGainFocusOnCreateAndDestroyWhenLoseFocus(bool value); + private: platform::gui::INativeWindow* GetNativeWindow(bool create); @@ -41,5 +43,7 @@ class RootControl : public LayoutControl { std::unique_ptr<render::StackLayoutRenderObject> render_object_; Control* attached_control_; + + bool gain_focus_on_create_and_destroy_when_lose_focus_ = false; }; } // namespace cru::ui::controls |