1 #ifndef MSP_GBASE_BINARYCONTROL_H_
2 #define MSP_GBASE_BINARYCONTROL_H_
10 A control with two possible states. Button state is mapped directly. An axis
11 is considered to be active when its value is above a threshold (0.5 by
14 class BinaryControl: public Control
17 sigc::signal<void> signal_press;
18 sigc::signal<void> signal_release;
26 BinaryControl(const ControlSource &);
27 BinaryControl(Device &, ControlSrcType, unsigned);
29 /** Sets the threshold between states for axis sources. No effect on button
31 void set_threshold(float);
33 bool get_state() const { return state; }
36 virtual void on_press();
37 virtual void on_release();
38 virtual void on_motion(float, float);