summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-11 21:02:10 +0000
committerDavid Robillard <d@drobilla.net>2008-10-11 21:02:10 +0000
commita18022d4243de7b2093507c574689c7a17c82bb9 (patch)
treef0d53178b87c955bd2ae254ef5bed999a4bee0b2 /src/client
parent3b6aa464ffeef786ad09cafe478ac45979f45e70 (diff)
downloadingen-a18022d4243de7b2093507c574689c7a17c82bb9.tar.gz
ingen-a18022d4243de7b2093507c574689c7a17c82bb9.tar.bz2
ingen-a18022d4243de7b2093507c574689c7a17c82bb9.zip
Add control randomize feature (node context menu).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1648 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/NodeModel.cpp2
-rw-r--r--src/client/NodeModel.hpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index af1f959e..ad04892f 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -171,7 +171,7 @@ NodeModel::port(uint32_t index) const
void
-NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max)
+NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) const
{
assert(port->parent().get() == this);
diff --git a/src/client/NodeModel.hpp b/src/client/NodeModel.hpp
index 03afc17c..9b6efde8 100644
--- a/src/client/NodeModel.hpp
+++ b/src/client/NodeModel.hpp
@@ -62,7 +62,7 @@ public:
uint32_t num_ports() const { return _ports.size(); }
const Ports& ports() const { return _ports; }
- void port_value_range(SharedPtr<PortModel> port, float& min, float& max);
+ void port_value_range(SharedPtr<PortModel> port, float& min, float& max) const;
// Signals
sigc::signal<void, SharedPtr<PortModel> > signal_new_port;
@@ -89,9 +89,11 @@ protected:
Ports _ports; ///< Vector of ports (not a Table to preserve order)
string _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
SharedPtr<PluginModel> _plugin; ///< The plugin this node is an instance of
- uint32_t _num_values; ///< Size of _min_values and _max_values
- float* _min_values; ///< Port min values (cached for LV2)
- float* _max_values; ///< Port max values (cached for LV2)
+
+private:
+ mutable uint32_t _num_values; ///< Size of _min_values and _max_values
+ mutable float* _min_values; ///< Port min values (cached for LV2)
+ mutable float* _max_values; ///< Port max values (cached for LV2)
};