From 99a322a6badf5b6d95be4944e80d92fc1cb2589e Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 11 Aug 2019 22:08:49 +0800 Subject: ... --- include/cru/ui/control.hpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'include/cru/ui/control.hpp') diff --git a/include/cru/ui/control.hpp b/include/cru/ui/control.hpp index f78557a3..b39b59a0 100644 --- a/include/cru/ui/control.hpp +++ b/include/cru/ui/control.hpp @@ -18,7 +18,7 @@ class Control : public Object { friend class Window; protected: - Control() = default; + Control(); public: Control(const Control& other) = delete; @@ -58,10 +58,14 @@ class Control : public Object { bool HasFocus(); - //*************** region: focus *************** + //*************** region: mouse *************** public: bool IsMouseOver() const { return is_mouse_over_; } + bool CaptureMouse(); // TODO + + bool IsMouseCaptured(); // TODO + //*************** region: events *************** public: // Raised when mouse enter the control. @@ -84,11 +88,6 @@ class Control : public Object { event::RoutedEvent* MouseUpEvent() { return &mouse_up_event_; } - // Raised when a mouse button is pressed in the control and released in the - // control with mouse not leaving it between two operations. - event::RoutedEvent* MouseClickEvent() { - return &mouse_click_event_; - } event::RoutedEvent* MouseWheelEvent() { return &mouse_wheel_event_; } @@ -114,7 +113,6 @@ class Control : public Object { event::RoutedEvent mouse_move_event_; event::RoutedEvent mouse_down_event_; event::RoutedEvent mouse_up_event_; - event::RoutedEvent mouse_click_event_; event::RoutedEvent mouse_wheel_event_; event::RoutedEvent key_down_event_; -- cgit v1.2.3