#include <sigc++/trackable.h>
#include <sigc++/signal.h>
-#include <pbd/statefuldestructible.h>
+#include "pbd/statefuldestructible.h"
class XMLNode;
virtual void set_value (float) = 0;
virtual float get_value (void) const = 0;
- virtual bool can_send_feedback() const { return true; }
-
sigc::signal<void> LearningFinished;
+ static sigc::signal<void,PBD::Controllable*,int,int> CreateBinding;
+ static sigc::signal<void,PBD::Controllable*> DeleteBinding;
static sigc::signal<bool,PBD::Controllable*> StartLearning;
static sigc::signal<void,PBD::Controllable*> StopLearning;
sigc::signal<void> Changed;
- int set_state (const XMLNode&);
+ int set_state (const XMLNode&, int version = 3000);
XMLNode& get_state ();
- std::string name() const { return _name; }
+ std::string name() const { return _name; }
+ bool touching () const { return _touching; }
+
+ void set_touching (bool yn) { _touching = yn; }
static Controllable* by_id (const PBD::ID&);
static Controllable* by_name (const std::string&);
private:
std::string _name;
+ bool _touching;
void add ();
void remove ();
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; }
+};
+
}
#endif /* __pbd_controllable_h__ */