]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/mouse.h
Use the override specifier where appropriate
[libs/gui.git] / source / input / mouse.h
index 5f7e71478913902c598bdeb551ea59d159c3a00a..647da7c44d1df448bc3607778f01a39a06da652a 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_INPUT_MOUSE_H_
 #define MSP_INPUT_MOUSE_H_
 
+#include <sigc++/trackable.h>
 #include <msp/graphics/window.h>
 #include "device.h"
 
@@ -13,19 +14,18 @@ uniform way.
 
 Note: Y axis grows upwards.
 */
-class Mouse: public Device
+class Mouse: public Device, public sigc::trackable
 {
 private:
-       Graphics::EventSource &source;
+       Graphics::Window &window;
 
 public:
-       Mouse(Graphics::EventSource &);
-       virtual std::string get_button_name(unsigned) const;
-       virtual std::string get_axis_name(unsigned) const;
+       Mouse(Graphics::Window &);
+
+       std::string get_button_name(unsigned) const override;
+       std::string get_axis_name(unsigned) const override;
 private:
-       void button_press(int, int, unsigned, unsigned);
-       void button_release(int, int, unsigned, unsigned);
-       void pointer_motion(int, int);
+       void input_event(const Graphics::Window::Event &);
 };
 
 } // namespace Input