]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/binarycontrol.h
Add dependency to mspdatafile
[libs/gui.git] / source / input / binarycontrol.h
index 851c6127f08006a11731e90ff037bd8b00c79344..ff773b8a3fb8f2d225ac01ea387aa5998c6c16a6 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef MSP_GBASE_BINARYCONTROL_H_
-#define MSP_GBASE_BINARYCONTROL_H_
+#ifndef MSP_INPUT_BINARYCONTROL_H_
+#define MSP_INPUT_BINARYCONTROL_H_
 
 #include "control.h"
 
@@ -25,12 +25,15 @@ public:
        BinaryControl();
        BinaryControl(const ControlSource &);
        BinaryControl(Device &, ControlSrcType, unsigned);
+       virtual ~BinaryControl();
 
        /** Sets the threshold between states for axis sources.  No effect on button
        sources */
        void set_threshold(float);
 
        bool get_state() const { return state; }
+       bool was_pressed() const { return rising_edge; }
+       bool was_released() const { return falling_edge; }
 
 private:
        virtual void on_press();