X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fhub.h;h=aadfcd7f5b0a87752b9e623d354f29bcf0403ec5;hb=11ab96ba152e389814543a6398e2cd6f17a31092;hp=31eeb94bf5dfb220c793d73d6cff533b345204e5;hpb=b45ba2f7ceb60c1a6abc1a951a97b40c03671264;p=libs%2Fgui.git diff --git a/source/input/hub.h b/source/input/hub.h index 31eeb94..aadfcd7 100644 --- a/source/input/hub.h +++ b/source/input/hub.h @@ -1,8 +1,9 @@ #ifndef MSP_INPUT_INPUTHUB_H_ #define MSP_INPUT_INPUTHUB_H_ -#include +#include #include +#include #include "device.h" namespace Msp { @@ -12,10 +13,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, public sigc::trackable +class MSPGUI_API Hub: public Device, public sigc::trackable { protected: - std::map devices; + std::vector devices; public: Hub(); @@ -23,8 +24,11 @@ public: /// Attaches an input device to the hub. void attach(Device &dev); - virtual std::string get_button_name(unsigned) const; - virtual std::string get_axis_name(unsigned) const; + Device *find_subdevice(DeviceType, unsigned = 0) override; + Device *find_subdevice(const std::string &) override; + + std::string get_button_name(unsigned) const override; + std::string get_axis_name(unsigned) const override; protected: void button_press(unsigned, unsigned); void button_release(unsigned, unsigned);