From 72ee43e9470c6fdbc6ed7ff92b85dfa5062c5762 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 6 Jan 2015 18:51:37 +0000 Subject: Added separate event handlers for mouse button clicks and mouse wheel movement. --- src/ui/modelview.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/ui/modelview.h') diff --git a/src/ui/modelview.h b/src/ui/modelview.h index e23fd1c..f9566cd 100755 --- a/src/ui/modelview.h +++ b/src/ui/modelview.h @@ -88,16 +88,30 @@ protected: /// draw border virtual void draw_background(); - /// keypress event handler - virtual bool on_keypress(const int key, const unsigned int modifier); - - /// keyrelease event handler - virtual bool on_keyrelease(const int key, const unsigned int modifier); + /** + * @brief mouse button press event handler + * */ + virtual bool on_mousepress(const unsigned int button); + + /** + * @brief mouse button release event handler + * */ + virtual bool on_mouserelease(const unsigned int button); + /** + * @brief mouse over event handler + * */ virtual void on_mouseover(const math::Vector2f &cursor); - /// mouse movement handler + /** + * @brief mouse movement event handler + * */ virtual void on_mousemove(const math::Vector2f &cursor); + + /** + * @brief mouse hweel event handler + * */ + virtual bool on_mousewheel(const math::Vector2f & direction); private: void reset(); -- cgit v1.2.3