diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-15 10:19:45 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-19 11:42:59 +0200 |
commit | 467085bfb0f595a094389c2de159589372d36d1e (patch) | |
tree | 1124baddedd97a081015513aab0dd8656fe3d683 /include/vcl/event.hxx | |
parent | de90c192cb8f1f03a4028493d8bfe9a127a76b2a (diff) |
Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events
Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'include/vcl/event.hxx')
-rw-r--r-- | include/vcl/event.hxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 32ff5bcfa098..58a90b2a764a 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -272,7 +272,7 @@ inline TrackingEvent::TrackingEvent( const MouseEvent& rMEvt, } -enum class MouseNotifyEvent +enum class NotifyEventType { NONE = 0, MOUSEBUTTONDOWN = 1, @@ -290,10 +290,10 @@ class VCL_DLLPUBLIC NotifyEvent private: VclPtr<vcl::Window> mpWindow; void* mpData; - MouseNotifyEvent mnEventType; + NotifyEventType mnEventType; public: - NotifyEvent( MouseNotifyEvent nEventType, + NotifyEvent( NotifyEventType nEventType, vcl::Window* pWindow, const void* pEvent = nullptr ); ~NotifyEvent(); @@ -305,7 +305,7 @@ public: NotifyEvent& operator=(const NotifyEvent&) = delete; NotifyEvent& operator=(NotifyEvent&&) = delete; - MouseNotifyEvent GetType() const { return mnEventType; } + NotifyEventType GetType() const { return mnEventType; } vcl::Window* GetWindow() const { return mpWindow; } void* GetData() const { return mpData; } const KeyEvent* GetKeyEvent() const; @@ -315,7 +315,7 @@ public: inline const KeyEvent* NotifyEvent::GetKeyEvent() const { - if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) ) + if ( (mnEventType == NotifyEventType::KEYINPUT) || (mnEventType == NotifyEventType::KEYUP) ) return static_cast<const KeyEvent*>(mpData); else return nullptr; @@ -323,7 +323,7 @@ inline const KeyEvent* NotifyEvent::GetKeyEvent() const inline const MouseEvent* NotifyEvent::GetMouseEvent() const { - if ( (mnEventType >= MouseNotifyEvent::MOUSEBUTTONDOWN) && (mnEventType <= MouseNotifyEvent::MOUSEMOVE) ) + if ( (mnEventType >= NotifyEventType::MOUSEBUTTONDOWN) && (mnEventType <= NotifyEventType::MOUSEMOVE) ) return static_cast<const MouseEvent*>(mpData); else return nullptr; @@ -331,7 +331,7 @@ inline const MouseEvent* NotifyEvent::GetMouseEvent() const inline const CommandEvent* NotifyEvent::GetCommandEvent() const { - if ( mnEventType == MouseNotifyEvent::COMMAND ) + if ( mnEventType == NotifyEventType::COMMAND ) return static_cast<const CommandEvent*>(mpData); else return nullptr; |