summaryrefslogtreecommitdiffstats
path: root/src/libs/gui/NodeModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-19 21:36:34 +0000
committerDavid Robillard <d@drobilla.net>2008-05-19 21:36:34 +0000
commitf9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4 (patch)
treefa8a4a74ee4072987ed79ffdcf766730bcdc0790 /src/libs/gui/NodeModule.cpp
parentee173c38c5c0a385c46bec12e3f52c57e0e074a0 (diff)
downloadingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.tar.gz
ingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.tar.bz2
ingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.zip
More (but not yet completely) type safe value_changed notification.
git-svn-id: http://svn.drobilla.net/lad/ingen@1216 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/NodeModule.cpp')
-rw-r--r--src/libs/gui/NodeModule.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index fefe84fb..0e4ce18b 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -107,8 +107,10 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
void
-NodeModule::control_change(uint32_t index, float control)
+NodeModule::value_changed(uint32_t index, const Atom& value)
{
+ float control = value.get_float();
+ cout << _node->name() << " control " << index << " = " << control << endl;
if (_plugin_ui) {
SLV2UIInstance inst = _plugin_ui->instance();
const LV2UI_Descriptor* ui_descriptor = slv2_ui_instance_get_descriptor(inst);
@@ -250,8 +252,8 @@ NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
Module::add_port(boost::shared_ptr<Port>(
new Port(PtrCast<NodeModule>(shared_from_this()), port)));
- port->signal_control.connect(sigc::bind<0>(
- sigc::mem_fun(this, &NodeModule::control_change), index));
+ port->signal_value_changed.connect(sigc::bind<0>(
+ sigc::mem_fun(this, &NodeModule::value_changed), index));
if (resize_to_fit)
resize();
@@ -320,7 +322,7 @@ NodeModule::initialise_gui_values()
uint32_t index=0;
for (PortModelList::const_iterator p = _node->ports().begin(); p != _node->ports().end(); ++p) {
if ((*p)->type().is_control())
- control_change(index, (*p)->value());
+ value_changed(index, (*p)->value());
++index;
}
}