3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GBASE_BINARYCONTROL_H_
9 #define MSP_GBASE_BINARYCONTROL_H_
17 A control with two possible states. Button state is mapped directly. An axis
18 is considered to be active when its value is above a threshold (defined by the
21 class BinaryControl: public Control
24 sigc::signal<void> signal_press;
25 sigc::signal<void> signal_release;
32 BinaryControl(const ControlSource &);
33 BinaryControl(Device &, ControlSrcType, unsigned);
34 bool get_state() const { return state; }
37 virtual void on_press();
38 virtual void on_release();
39 virtual void on_motion(float, float);