aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/controls')
-rw-r--r--include/cru/ui/controls/ControlHost.h4
-rw-r--r--include/cru/ui/controls/Window.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/include/cru/ui/controls/ControlHost.h b/include/cru/ui/controls/ControlHost.h
index c67e8a72..a27be835 100644
--- a/include/cru/ui/controls/ControlHost.h
+++ b/include/cru/ui/controls/ControlHost.h
@@ -169,7 +169,8 @@ class CRU_UI_API ControlHost : public Object {
}
void UpdateCursor();
- void NotifyControlParentChange(Control* control, Control* old_parent, Control* new_parent);
+ void NotifyControlParentChange(Control* control, Control* old_parent,
+ Control* new_parent);
private:
int event_handling_count_;
@@ -185,7 +186,6 @@ class CRU_UI_API ControlHost : public Object {
bool layout_prefer_to_fill_window_;
- platform::gui::TimerAutoCanceler repaint_schedule_canceler_;
platform::gui::TimerAutoCanceler relayout_schedule_canceler_;
};
} // namespace cru::ui::controls
diff --git a/include/cru/ui/controls/Window.h b/include/cru/ui/controls/Window.h
index a2ae01f9..3d3ff0b0 100644
--- a/include/cru/ui/controls/Window.h
+++ b/include/cru/ui/controls/Window.h
@@ -1,5 +1,6 @@
#pragma once
#include "../render/StackLayoutRenderObject.h"
+#include "ControlHost.h"
#include "LayoutControl.h"
#include <cru/base/Base.h>
@@ -9,6 +10,8 @@
#include <cru/platform/gui/UiApplication.h>
#include <cru/platform/gui/Window.h>
+#include <memory>
+
namespace cru::ui::controls {
class CRU_UI_API Window
: public LayoutControl<render::StackLayoutRenderObject> {
@@ -31,7 +34,7 @@ class CRU_UI_API Window
void SetGainFocusOnCreateAndDestroyWhenLoseFocus(bool value);
private:
- std::shared_ptr<ControlHost> control_host_;
+ std::unique_ptr<ControlHost> control_host_;
Control* attached_control_;