3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GBASE_INPUTHUB_H_
9 #define MSP_GBASE_INPUTHUB_H_
17 The Hub device collects events from multiple input devices and presents an
18 aggregate of them. Button and axis numbers are mapped to unique values.
20 class Hub: public Device
23 std::vector<Device *> devices;
29 Attaches an input device to the hub.
31 @param dev Device to attach
33 @return Index of the device within the hub
35 unsigned attach(Device &dev);
37 virtual std::string get_button_name(unsigned) const;
39 void button_press(unsigned, unsigned);
40 void button_release(unsigned, unsigned);
41 void axis_motion(unsigned, float, float, unsigned);