]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/mouse.h
Inherit input devices using Window::signal_input_event from sigc::trackable
[libs/gui.git] / source / input / mouse.h
index 8d5086f2d11654c7423dda2995d38e6d68d4a6b8..622a783b9960efd31ff201641bd49ae2277eb681 100644 (file)
@@ -1,32 +1,30 @@
-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GBASE_MOUSE_H_
-#define MSP_GBASE_MOUSE_H_
+#ifndef MSP_INPUT_MOUSE_H_
+#define MSP_INPUT_MOUSE_H_
 
+#include <sigc++/trackable.h>
+#include <msp/graphics/window.h>
 #include "device.h"
-#include "../gbase/window.h"
 
 namespace Msp {
 namespace Input {
 
-class Mouse: public Device
+/**
+Mouse device.  Receives events from a Graphics::Window and presents them in a
+uniform way.
+
+Note: Y axis grows upwards.
+*/
+class Mouse: public Device, public sigc::trackable
 {
 private:
        Graphics::Window &window;
-       float axis_scale;
 
 public:
        Mouse(Graphics::Window &);
        virtual std::string get_button_name(unsigned) const;
+       virtual std::string get_axis_name(unsigned) const;
 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