1 #ifndef MSP_INPUT_INPUTHUB_H_
2 #define MSP_INPUT_INPUTHUB_H_
11 The Hub device collects events from multiple input devices and presents an
12 aggregate of them. Button and axis numbers are mapped to unique values.
14 class Hub: public Device
17 std::map<unsigned, Device *> devices;
22 /// Attaches an input device to the hub.
23 void attach(Device &dev);
25 virtual std::string get_button_name(unsigned) const;
26 virtual std::string get_axis_name(unsigned) const;
28 void button_press(unsigned, unsigned);
29 void button_release(unsigned, unsigned);
30 void axis_motion(unsigned, float, float, unsigned);