]> git.tdb.fi Git - libs/gui.git/blob - source/input/mouse.h
Add decorations for things which should be exported from the library
[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/mspgui_api.h>
6 #include <msp/graphics/window.h>
7 #include "device.h"
8
9 namespace Msp {
10 namespace Input {
11
12 /**
13 Mouse device.  Receives events from a Graphics::Window and presents them in a
14 uniform way.
15
16 Note: Y axis grows upwards.
17 */
18 class MSPGUI_API Mouse: public Device, public sigc::trackable
19 {
20 private:
21         Graphics::Window &window;
22
23 public:
24         Mouse(Graphics::Window &);
25
26         std::string get_button_name(unsigned) const override;
27         std::string get_axis_name(unsigned) const override;
28 private:
29         void input_event(const Graphics::Window::Event &);
30 };
31
32 } // namespace Input
33 } // namespace Msp
34
35 #endif