]> git.tdb.fi Git - libs/gui.git/blob - source/input/mouse.h
647da7c44d1df448bc3607778f01a39a06da652a
[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
25         std::string get_button_name(unsigned) const override;
26         std::string get_axis_name(unsigned) const override;
27 private:
28         void input_event(const Graphics::Window::Event &);
29 };
30
31 } // namespace Input
32 } // namespace Msp
33
34 #endif