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