diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/common/event.hpp | 6 | ||||
-rw-r--r-- | include/cru/ui/window.hpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/cru/common/event.hpp b/include/cru/common/event.hpp index 52d75a7b..763f8378 100644 --- a/include/cru/common/event.hpp +++ b/include/cru/common/event.hpp @@ -57,6 +57,12 @@ class Event { return EventHandlerRevoker(EventHandlerRevokerImpl(event_resolver_, token)); } + EventHandlerRevoker AddHandler(EventHandler&& handler) { + const auto token = current_token_++; + handlers_.emplace(token, std::move(handler)); + return EventHandlerRevoker(EventHandlerRevokerImpl(event_resolver_, token)); + } + template <typename... Args> EventHandlerRevoker AddHandler(Args&& args...) { const auto token = current_token_++; diff --git a/include/cru/ui/window.hpp b/include/cru/ui/window.hpp index f0c790be..94deb4c5 100644 --- a/include/cru/ui/window.hpp +++ b/include/cru/ui/window.hpp @@ -64,8 +64,8 @@ class Window final : public ContentControl { void OnNativeFocus(bool focus); + void OnNativeMouseEnterLeave(bool enter); void OnNativeMouseMove(const Point& point); - void OnNativeMouseLeave(); void OnNativeMouseDown(platform::MouseButton button, const Point& point); void OnNativeMouseUp(platform::MouseButton button, const Point& point); |