diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-11 22:08:49 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-11 22:08:49 +0800 |
commit | 99a322a6badf5b6d95be4944e80d92fc1cb2589e (patch) | |
tree | 4227de0cbb1fd73ef99de4bc57041492a0450208 /include/cru/ui/control.hpp | |
parent | 3a8abe0aed9bb72ed64cbfe9f2f83a0db285e14c (diff) | |
download | cru-99a322a6badf5b6d95be4944e80d92fc1cb2589e.tar.gz cru-99a322a6badf5b6d95be4944e80d92fc1cb2589e.tar.bz2 cru-99a322a6badf5b6d95be4944e80d92fc1cb2589e.zip |
...
Diffstat (limited to 'include/cru/ui/control.hpp')
-rw-r--r-- | include/cru/ui/control.hpp | 14 |
1 files changed, 6 insertions, 8 deletions
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<event::MouseButtonEventArgs>* 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<event::MouseButtonEventArgs>* MouseClickEvent() { - return &mouse_click_event_; - } event::RoutedEvent<event::MouseWheelEventArgs>* MouseWheelEvent() { return &mouse_wheel_event_; } @@ -114,7 +113,6 @@ class Control : public Object { event::RoutedEvent<event::MouseEventArgs> mouse_move_event_; event::RoutedEvent<event::MouseButtonEventArgs> mouse_down_event_; event::RoutedEvent<event::MouseButtonEventArgs> mouse_up_event_; - event::RoutedEvent<event::MouseButtonEventArgs> mouse_click_event_; event::RoutedEvent<event::MouseWheelEventArgs> mouse_wheel_event_; event::RoutedEvent<event::KeyEventArgs> key_down_event_; |