1 #ifndef MSP_GBASE_INPUTHUB_H_
2 #define MSP_GBASE_INPUTHUB_H_
10 The Hub device collects events from multiple input devices and presents an
11 aggregate of them. Button and axis numbers are mapped to unique values.
13 class Hub: public Device
16 std::vector<Device *> devices;
22 Attaches an input device to the hub.
24 @param dev Device to attach
26 @return Index of the device within the hub
28 unsigned attach(Device &dev);
30 virtual std::string get_button_name(unsigned) const;
31 virtual std::string get_axis_name(unsigned) const;
33 void button_press(unsigned, unsigned);
34 void button_release(unsigned, unsigned);
35 void axis_motion(unsigned, float, float, unsigned);