aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/RootControl.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-20 19:47:53 +0800
committercrupest <crupest@outlook.com>2021-11-20 19:47:53 +0800
commitb0b86b6b9d6798d04a320060e90bd8497a7f50f9 (patch)
treea6e3f3315a538791e1cbd4e799bc6268262feedb /include/cru/ui/controls/RootControl.hpp
parent2ad748a0fcb66398299886970cc9c40cc50b3cd0 (diff)
downloadcru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.tar.gz
cru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.tar.bz2
cru-b0b86b6b9d6798d04a320060e90bd8497a7f50f9.zip
...
Diffstat (limited to 'include/cru/ui/controls/RootControl.hpp')
-rw-r--r--include/cru/ui/controls/RootControl.hpp4
1 files changed, 4 insertions, 0 deletions
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