summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-06-09 04:51:32 +0000
committerDavid Robillard <d@drobilla.net>2013-06-09 04:51:32 +0000
commitfe81cb8af20ecbe721eba55d53fa62c5e2041421 (patch)
tree98e94e5dcf675054ac6023ddbccd44b1381ddda0 /ingen
parentc8e00539e66bbe3584798ab8619f4b5927e83c2c (diff)
downloadingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.tar.gz
ingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.tar.bz2
ingen-fe81cb8af20ecbe721eba55d53fa62c5e2041421.zip
Support removing properties from the properties dialog.
You can definitely blow your leg off with this one, clever ontology awareness (e.g. required properties) would be good... git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5138 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Resource.hpp9
-rw-r--r--ingen/client/ObjectModel.hpp2
2 files changed, 11 insertions, 0 deletions
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index 756419d8..3d6d6cd2 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -152,6 +152,15 @@ public:
*/
virtual void on_property(const Raul::URI& uri, const Atom& value) {}
+ /** Hook called whenever a property value is removed.
+ *
+ * If all values of a given key are removed, then value will be the wildcard.
+ *
+ * This can be used by derived classes to implement special behaviour for
+ * particular properties (e.g. ingen:value for ports).
+ */
+ virtual void on_property_removed(const Raul::URI& uri, const Atom& value) {}
+
/** Get the ingen type from a set of Properties.
*
* If some coherent ingen type is found, true is returned and the appropriate
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 66c3db7c..6c582812 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -62,6 +62,7 @@ public:
const Atom& get_property(const Raul::URI& key) const;
void on_property(const Raul::URI& uri, const Atom& value);
+ void on_property_removed(const Raul::URI& uri, const Atom& value);
const Raul::Path& path() const { return _path; }
const Raul::Symbol& symbol() const { return _symbol; }
@@ -74,6 +75,7 @@ public:
INGEN_SIGNAL(new_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(removed_child, void, SPtr<ObjectModel>);
INGEN_SIGNAL(property, void, const Raul::URI&, const Atom&);
+ INGEN_SIGNAL(property_removed, void, const Raul::URI&, const Atom&);
INGEN_SIGNAL(destroyed, void);
INGEN_SIGNAL(moved, void);