1 #ifndef MSP_INPUT_INPUTHUB_H_
2 #define MSP_INPUT_INPUTHUB_H_
5 #include <sigc++/trackable.h>
12 The Hub device collects events from multiple input devices and presents an
13 aggregate of them. Button and axis numbers are mapped to unique values.
15 class Hub: public Device, public sigc::trackable
18 std::vector<Device *> devices;
23 /// Attaches an input device to the hub.
24 void attach(Device &dev);
26 virtual Device *find_subdevice(DeviceType, unsigned = 0);
27 virtual Device *find_subdevice(const std::string &);
29 virtual std::string get_button_name(unsigned) const;
30 virtual std::string get_axis_name(unsigned) const;
32 void button_press(unsigned, unsigned);
33 void button_release(unsigned, unsigned);
34 void axis_motion(unsigned, float, float, unsigned);