X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fmouse.h;h=647da7c44d1df448bc3607778f01a39a06da652a;hb=3c5bbaeadb33d288c0f9e487b52904b7ed7e4319;hp=eb5e9d61a4a1da49fda275a4b0b3e21bcdeb1ae7;hpb=dce7552c5e2f64fcf5f58b0c934bb4a01f6cbcf7;p=libs%2Fgui.git diff --git a/source/input/mouse.h b/source/input/mouse.h index eb5e9d6..647da7c 100644 --- a/source/input/mouse.h +++ b/source/input/mouse.h @@ -1,7 +1,8 @@ -#ifndef MSP_GBASE_MOUSE_H_ -#define MSP_GBASE_MOUSE_H_ +#ifndef MSP_INPUT_MOUSE_H_ +#define MSP_INPUT_MOUSE_H_ -#include +#include +#include #include "device.h" namespace Msp { @@ -13,19 +14,18 @@ uniform way. Note: Y axis grows upwards. */ -class Mouse: public Device +class Mouse: public Device, public sigc::trackable { private: - Graphics::EventSource &source; + Graphics::Window &window; public: - Mouse(Graphics::EventSource &); - virtual std::string get_button_name(unsigned) const; - virtual std::string get_axis_name(unsigned) const; + Mouse(Graphics::Window &); + + std::string get_button_name(unsigned) const override; + std::string get_axis_name(unsigned) const override; 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