]> git.tdb.fi Git - libs/gui.git/blob - source/input/mouse.h
622a783b9960efd31ff201641bd49ae2277eb681
[libs/gui.git] / source / input / mouse.h
1 #ifndef MSP_INPUT_MOUSE_H_
2 #define MSP_INPUT_MOUSE_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/window.h>
6 #include "device.h"
7
8 namespace Msp {
9 namespace Input {
10
11 /**
12 Mouse device.  Receives events from a Graphics::Window and presents them in a
13 uniform way.
14
15 Note: Y axis grows upwards.
16 */
17 class Mouse: public Device, public sigc::trackable
18 {
19 private:
20         Graphics::Window &window;
21
22 public:
23         Mouse(Graphics::Window &);
24         virtual std::string get_button_name(unsigned) const;
25         virtual std::string get_axis_name(unsigned) const;
26 private:
27         void input_event(const Graphics::Window::Event &);
28 };
29
30 } // namespace Input
31 } // namespace Msp
32
33 #endif