]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/binarycontrol.h
Add a gesture detector input device
[libs/gui.git] / source / input / binarycontrol.h
index 4331f05aa94371b8337ce3ffc1b97fc748c7805c..64e4ab17be4ca1698e78c880a164f299d61b89e3 100644 (file)
@@ -1,12 +1,5 @@
-/* $Id$
-
-This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#ifndef MSP_GBASE_BINARYCONTROL_H_
-#define MSP_GBASE_BINARYCONTROL_H_
+#ifndef MSP_INPUT_BINARYCONTROL_H_
+#define MSP_INPUT_BINARYCONTROL_H_
 
 #include "control.h"
 
@@ -15,7 +8,8 @@ namespace Input {
 
 /**
 A control with two possible states.  Button state is mapped directly.  An axis
-is considered to be active when its value is within 10% of the end of the axis.
+is considered to be active when its value is above a threshold (0.5 by
+default).
 */
 class BinaryControl: public Control
 {
@@ -31,11 +25,10 @@ public:
        BinaryControl();
        BinaryControl(const ControlSource &);
        BinaryControl(Device &, ControlSrcType, unsigned);
+       virtual ~BinaryControl();
 
-       /**
-       Sets the threshold between states for axis sources.  No effect on button
-       sources
-       */
+       /** Sets the threshold between states for axis sources.  No effect on button
+       sources */
        void set_threshold(float);
 
        bool get_state() const { return state; }