From: Mikko Rasa Date: Thu, 13 Nov 2014 20:41:09 +0000 (+0200) Subject: Inherit input devices using Window::signal_input_event from sigc::trackable X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b45ba2f7ceb60c1a6abc1a951a97b40c03671264;p=libs%2Fgui.git Inherit input devices using Window::signal_input_event from sigc::trackable --- diff --git a/source/input/hub.h b/source/input/hub.h index 8d41bce..31eeb94 100644 --- a/source/input/hub.h +++ b/source/input/hub.h @@ -2,6 +2,7 @@ #define MSP_INPUT_INPUTHUB_H_ #include +#include #include "device.h" namespace Msp { @@ -11,7 +12,7 @@ namespace Input { The Hub device collects events from multiple input devices and presents an aggregate of them. Button and axis numbers are mapped to unique values. */ -class Hub: public Device +class Hub: public Device, public sigc::trackable { protected: std::map devices; diff --git a/source/input/keyboard.h b/source/input/keyboard.h index 8cd83f2..15fe4f9 100644 --- a/source/input/keyboard.h +++ b/source/input/keyboard.h @@ -1,6 +1,7 @@ #ifndef MSP_INPUT_KEYBOARD_H_ #define MSP_INPUT_KEYBOARD_H_ +#include #include #include #include "device.h" @@ -12,7 +13,7 @@ namespace Input { Adapts key events from a window to the abstracted input framework. Key codes are translated to platform-independent values. See keys.h for a list. */ -class Keyboard: public Device +class Keyboard: public Device, public sigc::trackable { public: sigc::signal::accumulated signal_character; diff --git a/source/input/mouse.h b/source/input/mouse.h index c85d8d2..622a783 100644 --- a/source/input/mouse.h +++ b/source/input/mouse.h @@ -1,6 +1,7 @@ #ifndef MSP_INPUT_MOUSE_H_ #define MSP_INPUT_MOUSE_H_ +#include #include #include "device.h" @@ -13,7 +14,7 @@ uniform way. Note: Y axis grows upwards. */ -class Mouse: public Device +class Mouse: public Device, public sigc::trackable { private: Graphics::Window &window;