#define MSP_INPUT_INPUTHUB_H_
#include <map>
+#include <sigc++/trackable.h>
#include "device.h"
namespace Msp {
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<unsigned, Device *> devices;
#ifndef MSP_INPUT_KEYBOARD_H_
#define MSP_INPUT_KEYBOARD_H_
+#include <sigc++/trackable.h>
#include <msp/graphics/window.h>
#include <msp/stringcodec/ustring.h>
#include "device.h"
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<bool, StringCodec::unichar>::accumulated<EventAccumulator> signal_character;
#ifndef MSP_INPUT_MOUSE_H_
#define MSP_INPUT_MOUSE_H_
+#include <sigc++/trackable.h>
#include <msp/graphics/window.h>
#include "device.h"
Note: Y axis grows upwards.
*/
-class Mouse: public Device
+class Mouse: public Device, public sigc::trackable
{
private:
Graphics::Window &window;