X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fhub.h;h=55d58765f1d705dabeeec7ff5eb028a4f65a46b8;hb=7302a061c57602203895b616bf54d96269c677c6;hp=8d41bcee41393bc0314825db0c44b1fc2b65fc61;hpb=b2d45380967cb2f682c3edfa6288b3d412507d5d;p=libs%2Fgui.git diff --git a/source/input/hub.h b/source/input/hub.h index 8d41bce..55d5876 100644 --- a/source/input/hub.h +++ b/source/input/hub.h @@ -1,7 +1,8 @@ #ifndef MSP_INPUT_INPUTHUB_H_ #define MSP_INPUT_INPUTHUB_H_ -#include +#include +#include #include "device.h" namespace Msp { @@ -11,10 +12,10 @@ namespace Input { The Hub device collects events from multiple input devices and presents an aggregate of them. Button and axis numbers are mapped to unique values. */ -class Hub: public Device +class Hub: public Device, public sigc::trackable { protected: - std::map devices; + std::vector devices; public: Hub(); @@ -22,6 +23,9 @@ public: /// Attaches an input device to the hub. void attach(Device &dev); + virtual Device *find_subdevice(DeviceType, unsigned = 0); + virtual Device *find_subdevice(const std::string &); + virtual std::string get_button_name(unsigned) const; virtual std::string get_axis_name(unsigned) const; protected: