aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/host/WindowHost.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/host/WindowHost.h')
-rw-r--r--include/cru/ui/host/WindowHost.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cru/ui/host/WindowHost.h b/include/cru/ui/host/WindowHost.h
index d88482c4..0d2e0341 100644
--- a/include/cru/ui/host/WindowHost.h
+++ b/include/cru/ui/host/WindowHost.h
@@ -21,6 +21,14 @@ class CRU_UI_API WindowHost : public Object, public SelfResolvable<WindowHost> {
friend controls::Control;
CRU_DEFINE_CLASS_LOG_TAG(u"WindowHost")
+ private:
+ static int event_handling_depth_;
+
+ public:
+ static bool IsInEventHandling() { return event_handling_depth_ > 0; }
+ static void EnterEventHandling();
+ static void LeaveEventHandling();
+
public:
explicit WindowHost(controls::Control* root_control);
@@ -139,6 +147,8 @@ class CRU_UI_API WindowHost : public Object, public SelfResolvable<WindowHost> {
const Point& point, bool no_leave,
bool no_enter);
+ void OnControlDetach(controls::Control* control);
+
private:
controls::Control* root_control_ = nullptr;
render::RenderObject* root_render_object_ = nullptr;