diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-07 23:51:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-07-07 23:51:30 +0000 |
commit | 8b46567e0677eb25c965ed46b80da8808fa33b2b (patch) | |
tree | f34e3d1cbdab142e7f155d981fee5fb56a82c431 /libs/pbd/pbd/controllable.h | |
parent | 6f2e8de6a05d9d52069fa1f95c3264b5f151df5f (diff) |
id_t becomes a fully-fledged object, UUID's used for IDs, generic MIDI now owns bindings, MIDI binding concept removed from libardour itself in favor of generic Controllables
git-svn-id: svn://localhost/ardour2/trunk@669 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd/controllable.h')
-rw-r--r-- | libs/pbd/pbd/controllable.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h new file mode 100644 index 0000000000..4948e4e4a0 --- /dev/null +++ b/libs/pbd/pbd/controllable.h @@ -0,0 +1,44 @@ +#ifndef __pbd_controllable_h__ +#define __pbd_controllable_h__ + +#include <sigc++/trackable.h> +#include <sigc++/signal.h> + +#include <pbd/stateful.h> +#include <pbd/id.h> + +class XMLNode; + +namespace PBD { + +class Controllable : public virtual sigc::trackable, public Stateful { + public: + Controllable (); + virtual ~Controllable() { GoingAway (this); } + + virtual void set_value (float) = 0; + virtual float get_value (void) const = 0; + + virtual bool can_send_feedback() const { return true; } + + static sigc::signal<void,Controllable*> Created; + static sigc::signal<void,Controllable*> GoingAway; + + + static sigc::signal<bool,PBD::Controllable*> StartLearning; + static sigc::signal<void,PBD::Controllable*> StopLearning; + + sigc::signal<void> Changed; + + const PBD::ID& id() const { return _id; } + + int set_state (const XMLNode&) { return 0; } + XMLNode& get_state (); + + private: + PBD::ID _id; +}; + +} + +#endif /* __pbd_controllable_h__ */ |