summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-14 20:44:40 +0000
committerDavid Robillard <d@drobilla.net>2009-11-14 20:44:40 +0000
commit6ae2018e81e7e81e4906e62dc6224ad34298d9c2 (patch)
tree11286438977c4f975b5148dc93b5f4dfafabdbdc /src/gui
parentcfec427867f42d7aa7bea6dfbb0736b5ce99e9e2 (diff)
downloadingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.gz
ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.tar.bz2
ingen-6ae2018e81e7e81e4906e62dc6224ad34298d9c2.zip
Object extension.
Port resize extension. Sensible extension(s) implementation design for Ingen. Replace string port extension support in Ingen with Object port extension. Implement port resize extension in Ingen. Some test plugins for this stuff. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2260 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Configuration.cpp8
-rw-r--r--src/gui/Configuration.hpp2
-rw-r--r--src/gui/ControlPanel.cpp2
-rw-r--r--src/gui/Controls.cpp28
-rw-r--r--src/gui/PatchCanvas.cpp2
-rw-r--r--src/gui/Port.cpp2
-rw-r--r--src/gui/PortMenu.cpp2
7 files changed, 22 insertions, 24 deletions
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index c7a5b19c..58a2abc5 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -41,7 +41,7 @@ Configuration::Configuration()
, _control_port_color(0x4A8A0EC0)
, _event_port_color( 0x960909C0)
// , _osc_port_color( 0x5C3566C0)
- , _string_port_color( 0x00000000)
+ , _object_port_color( 0x5C3566C0)
{
}
@@ -90,12 +90,12 @@ Configuration::get_port_color(const PortModel* p)
return _control_port_color;
} else if (p->type().is_audio()) {
return _audio_port_color;
- } else if (p->type().is_event()) {
+ } else if (p->type().is_events()) {
return _event_port_color;
/*} else if (p->type().is_osc()) {
return _osc_port_color;
- */} else if (p->type().is_string()) {
- return _string_port_color;
+ */} else if (p->type().is_object()) {
+ return _object_port_color;
}
cerr << "[Configuration] Unknown port type " << p->type().uri()
diff --git a/src/gui/Configuration.hpp b/src/gui/Configuration.hpp
index 480ed6d1..f66d9f67 100644
--- a/src/gui/Configuration.hpp
+++ b/src/gui/Configuration.hpp
@@ -68,7 +68,7 @@ private:
uint32_t _audio_port_color;
uint32_t _control_port_color;
uint32_t _event_port_color;
- uint32_t _string_port_color;
+ uint32_t _object_port_color;
};
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index 1e7d177b..95cd6e02 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -120,7 +120,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("toggle_control");
xml->get_widget_derived("toggle_control", tc);
control = tc;
- } else if (pm->type().is_string()) {
+ } else if (pm->type().is_object()) {
StringControl* sc;
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("string_control");
xml->get_widget_derived("string_control", sc);
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index 6ab9081a..6e8ca351 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -414,16 +414,16 @@ ToggleControl::set_value(const Atom& val)
{
bool enable = false;
switch (val.type()) {
- case Atom::FLOAT:
- enable = (val.get_float() != 0.0f);
- break;
- case Atom::INT:
- enable = (val.get_int32() != 0);
- break;
- case Atom::BOOL:
- enable = (val.get_bool());
- default:
- cerr << "Unsupported value type for toggle control" << endl;
+ case Atom::FLOAT:
+ enable = (val.get_float() != 0.0f);
+ break;
+ case Atom::INT:
+ enable = (val.get_int32() != 0);
+ break;
+ case Atom::BOOL:
+ enable = (val.get_bool());
+ default:
+ cerr << "Unsupported value type for toggle control" << endl;
}
_enable_signal = false;
@@ -521,11 +521,9 @@ StringControl::disable()
void
StringControl::activated()
{
- if (_enable_signal) {
- const string& value = _entry->get_text();
- cerr << "String control activated: " << value << endl;
- _control_panel->value_changed(_port_model, value.c_str());
- }
+ if (_enable_signal)
+ _control_panel->value_changed_atom(_port_model,
+ Raul::Atom(_entry->get_text().c_str()));
}
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index c7e3559c..0f071334 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -496,7 +496,7 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
return;
// Midi binding/learn shortcut
- if (src->model()->type().is_event() && dst->model()->type().is_control()) {
+ if (src->model()->type().is_events() && dst->model()->type().is_control()) {
cerr << "[PatchCanvas] TODO: MIDI binding shortcut" << endl;
} else {
App::instance().engine()->connect(src->model()->path(), dst->model()->path());
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index ddefd0e2..c4f5de5e 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -127,7 +127,7 @@ Port::set_control(float value, bool signal)
if (signal) {
if (model()->type() == DataType::CONTROL) {
App::instance().engine()->set_port_value(model()->path(), Atom(value));
- } else if (model()->type() == DataType::EVENT) {
+ } else if (model()->type() == DataType::EVENTS) {
App::instance().engine()->set_port_value(model()->path(),
Atom("<http://example.org/ev#BangEvent>", 0, NULL));
}
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index c6229361..8a98b281 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -48,7 +48,7 @@ PortMenu::init(SharedPtr<PortModel> port, bool patch_port)
_destroy_menuitem->hide();
}
- if (port->type() == DataType::EVENT || port->type() == DataType::STRING)
+ if (port->type() == DataType::EVENTS || port->type() == DataType::OBJECT)
_polyphonic_menuitem->hide();
_enable_signal = true;