diff options
author | David Robillard <d@drobilla.net> | 2015-02-14 09:26:46 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-02-14 09:26:46 +0000 |
commit | b1553c6ad9990ce3285eb542b974d1359056da03 (patch) | |
tree | 0f8b4c175a584e4076215bc104cf88fa9ec9f5af | |
parent | 0b7baa6ab3810f3040ce3c891167591fa29d3690 (diff) | |
download | ingen-b1553c6ad9990ce3285eb542b974d1359056da03.tar.gz ingen-b1553c6ad9990ce3285eb542b974d1359056da03.tar.bz2 ingen-b1553c6ad9990ce3285eb542b974d1359056da03.zip |
Show type tags for more port types.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5567 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | ingen/URIs.hpp | 1 | ||||
-rw-r--r-- | src/URIs.cpp | 1 | ||||
-rw-r--r-- | src/gui/Port.cpp | 29 |
3 files changed, 31 insertions, 0 deletions
diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp index 6cb7ea15..70406f57 100644 --- a/ingen/URIs.hpp +++ b/ingen/URIs.hpp @@ -133,6 +133,7 @@ public: const Quark patch_Copy; const Quark patch_Delete; const Quark patch_Get; + const Quark patch_Message; const Quark patch_Move; const Quark patch_Patch; const Quark patch_Put; diff --git a/src/URIs.cpp b/src/URIs.cpp index 647c63b5..a70e8d77 100644 --- a/src/URIs.cpp +++ b/src/URIs.cpp @@ -123,6 +123,7 @@ URIs::URIs(Forge& f, URIMap* map) , patch_Copy (forge, map, LV2_PATCH__Copy) , patch_Delete (forge, map, LV2_PATCH__Delete) , patch_Get (forge, map, LV2_PATCH__Get) + , patch_Message (forge, map, LV2_PATCH__Message) , patch_Move (forge, map, LV2_PATCH__Move) , patch_Patch (forge, map, LV2_PATCH__Patch) , patch_Put (forge, map, LV2_PATCH__Put) diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 89284463..4a6f37ed 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -95,6 +95,35 @@ Port::Port(App& app, sigc::mem_fun(this, &Port::value_changed)); } + std::string value_label; + if (model()->is_a(_app.uris().lv2_AudioPort)) { + value_label = "~"; + } else if (model()->is_a(_app.uris().lv2_CVPort)) { + value_label = "ℝ̰"; + } else if (model()->is_a(_app.uris().lv2_ControlPort)) { + value_label = "ℝ"; + } else if (model()->is_a(_app.uris().atom_AtomPort)) { + if (model()->supports(_app.uris().atom_Float)) { + value_label += "ℝ"; + } + if (model()->supports(_app.uris().atom_Int)) { + value_label += "ℤ"; + } + if (model()->supports(_app.uris().midi_MidiEvent)) { + value_label += "ℳ"; + } + if (model()->supports(_app.uris().patch_Message)) { + if (value_label.empty()) { + value_label += "="; + } else { + value_label += "̿"; + } + } + } + if (!value_label.empty()) { + set_value_label(value_label.c_str()); + } + pm->signal_activity().connect( sigc::mem_fun(this, &Port::activity)); pm->signal_disconnection().connect( |