summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/controllable.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/pbd/controllable.h')
-rw-r--r--libs/pbd/pbd/controllable.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h
index ed41af1be8..6dc421cfd9 100644
--- a/libs/pbd/pbd/controllable.h
+++ b/libs/pbd/pbd/controllable.h
@@ -70,6 +70,21 @@ class Controllable : public PBD::StatefulDestructible {
static Controllables registry;
};
+/* a utility class for the occasions when you need but do not have
+ a Controllable
+*/
+
+class IgnorableControllable : public Controllable
+{
+ public:
+ IgnorableControllable () : PBD::Controllable ("ignoreMe") {}
+ ~IgnorableControllable () {}
+
+ void set_value (float v){}
+ float get_value () const { return 0.0; }
+ bool can_send_feedback () const { return false; }
+};
+
}
#endif /* __pbd_controllable_h__ */