1 #ifndef MSP_INPUT_INPUTDEVICE_H_
2 #define MSP_INPUT_INPUTDEVICE_H_
6 #include <sigc++/signal.h>
12 Base class for input devices. Input devices have two types of controls:
13 buttons and axes. Buttons are either on or off. Axes have a floating point
14 value in the range [-1, 1].
19 sigc::signal<void, unsigned> signal_button_press;
20 sigc::signal<void, unsigned> signal_button_release;
21 sigc::signal<void, unsigned, float, float> signal_axis_motion;
25 std::vector<char> buttons;
26 std::vector<float> axes;
31 const std::string &get_name() const { return name; }
32 bool get_button_state(unsigned) const;
33 float get_axis_value(unsigned) const;
35 virtual std::string get_button_name(unsigned) const;
36 virtual std::string get_axis_name(unsigned) const;
38 void set_button_state(unsigned, bool, bool);
39 void set_axis_value(unsigned, float, bool);