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 Device *find_subdevice(DeviceType, unsigned = 0) override;
27 Device *find_subdevice(const std::string &) override;
29 std::string get_button_name(unsigned) const override;
30 std::string get_axis_name(unsigned) const override;
32 void button_press(unsigned, unsigned);
33 void button_release(unsigned, unsigned);
34 void axis_motion(unsigned, float, float, unsigned);