From 397667bfaffdb622dfcf5bbbf64c49fd6a729f7e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 25 Jul 2007 22:37:39 +0000 Subject: Build against local SLV2 too. Better configure summary output. Some trivial initial work towards on-canvas controllers. git-svn-id: http://svn.drobilla.net/lad/ingen@628 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/PatchCanvas.cpp | 25 ++ src/libs/gui/PatchCanvas.hpp | 6 + src/libs/gui/ingen_gui.glade | 954 ++++++++++++++++++++++--------------------- 3 files changed, 527 insertions(+), 458 deletions(-) (limited to 'src/libs/gui') diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index ae18e0f2..44ee72e6 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -15,10 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "../../../config/config.h" #include "module/module.h" #include #include +#include #include "interface/EngineInterface.hpp" #include "client/PluginModel.hpp" #include "client/PatchModel.hpp" @@ -55,6 +57,8 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) Glib::RefPtr xml = GladeFactory::new_glade_reference(); xml->get_widget("canvas_menu", _menu); + xml->get_widget("canvas_menu_add_number_control", _menu_add_number_control); + xml->get_widget("canvas_menu_add_button_control", _menu_add_button_control); xml->get_widget("canvas_menu_add_audio_input", _menu_add_audio_input); xml->get_widget("canvas_menu_add_audio_output", _menu_add_audio_output); xml->get_widget("canvas_menu_add_control_input", _menu_add_control_input); @@ -67,6 +71,12 @@ PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) xml->get_widget("canvas_menu_load_patch", _menu_load_patch); xml->get_widget("canvas_menu_new_patch", _menu_new_patch); + // Add control menu items + _menu_add_number_control->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_control), NUMBER)); + _menu_add_button_control->signal_activate().connect( + sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_control), BUTTON)); + // Add port menu items _menu_add_audio_input->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port), @@ -471,10 +481,25 @@ PatchCanvas::generate_port_name(const string& base) { return name; } +void +PatchCanvas::menu_add_control(ControlType type) +{ + // FIXME: bundleify + + MetadataMap data = get_initial_data(); + float x = data["ingenuity:canvas-x"].get_float(); + float y = data["ingenuity:canvas-y"].get_float(); + + cerr << "ADD CONTROL: " << (unsigned)type << " @ " << x << ", " << y << endl; + + add_item(boost::shared_ptr( + new FlowCanvas::Ellipse(shared_from_this(), "control", x, y, 20, 20, true))); +} void PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output) { + // FIXME: bundleify const Path& path = _patch->path().base() + generate_port_name(name); App::instance().engine()->create_port(path, type, is_output); MetadataMap data = get_initial_data(); diff --git a/src/libs/gui/PatchCanvas.hpp b/src/libs/gui/PatchCanvas.hpp index 6eba024a..d0df1505 100644 --- a/src/libs/gui/PatchCanvas.hpp +++ b/src/libs/gui/PatchCanvas.hpp @@ -82,8 +82,12 @@ public: { _menu->popup(event->button.button, event->button.time); } private: + enum ControlType { NUMBER, BUTTON }; + void menu_add_control(ControlType type); + string generate_port_name(const string& base); void menu_add_port(const string& name, const string& type, bool is_output); + void menu_load_plugin(); void menu_new_patch(); void menu_load_patch(); @@ -116,6 +120,8 @@ private: int _last_click_y; Gtk::Menu* _menu; + Gtk::MenuItem* _menu_add_number_control; + Gtk::MenuItem* _menu_add_button_control; Gtk::MenuItem* _menu_add_audio_input; Gtk::MenuItem* _menu_add_audio_output; Gtk::MenuItem* _menu_add_control_input; diff --git a/src/libs/gui/ingen_gui.glade b/src/libs/gui/ingen_gui.glade index 994f456a..6294791c 100644 --- a/src/libs/gui/ingen_gui.glade +++ b/src/libs/gui/ingen_gui.glade @@ -481,62 +481,53 @@ 3 12 - + True - True - Clear filter text (show all plugins) - gtk-clear - True - 0 + 1 + Node Name: + True - 2 - 3 + 2 + 3 GTK_FILL - + True - Name contains: + 1 + 2 + 1 + 2 GTK_FILL - - + True - True - True - Search string to filter plugin list - * - 1 - 2 - 6 + 1 + 2 + GTK_FILL + GTK_FILL - + True - False - True - Add selected plugin to patch - gtk-add - True - 0 2 3 - 2 - 3 + 1 + 2 GTK_FILL - + GTK_FILL @@ -579,51 +570,60 @@ - + True + False + True + Add selected plugin to patch + gtk-add + True + 0 2 3 - 1 - 2 + 2 + 3 GTK_FILL - GTK_FILL + - + True + True + True + Search string to filter plugin list + * - 1 - 2 - GTK_FILL - GTK_FILL + 1 + 2 + 6 - + True + Name contains: - 1 - 2 - 1 - 2 GTK_FILL + - + True - 1 - Node Name: - True + True + Clear filter text (show all plugins) + gtk-clear + True + 0 - 2 - 3 + 2 + 3 GTK_FILL @@ -654,61 +654,61 @@ 2 2 - + True - True - True - * - True + 0 + Name: - 1 - 2 - - 4 + GTK_FILL + GTK_EXPAND + 5 - + True - True - 1 0 100 1 10 10 - 1 + 0 + Polyphony: - 1 - 2 1 2 GTK_FILL - - 4 + GTK_EXPAND + 5 - + True - 0 - Polyphony: + True + 1 0 100 1 10 10 + 1 + 1 + 2 1 2 GTK_FILL - GTK_EXPAND - 5 + + 4 - + True - 0 - Name: + True + True + * + True - GTK_FILL - GTK_EXPAND - 5 + 1 + 2 + + 4 @@ -810,71 +810,63 @@ 12 4 - + True - - - True - True - Specify the name for the new patch - Specify: - True - 0 - True - load_subpatch_name_from_file_radio - - - False - False - - - - - True - False - True - Specify the name for the new patch - * - True - - - False - 1 - - + 0 + <b>Name: </b> + True - 3 - 4 - GTK_FILL + GTK_FILL + - + True 0 + <b>Polyphony: </b> + True - 2 - 3 + 1 + 2 GTK_FILL - + True True - Set polyphony to the same value as the parent (containing) patch - Same as parent (?) + Use the name stored in the patch file + Load from file True 0 + True True - load_subpatch_poly_from_file_radio - 2 - 3 + 1 + 2 + GTK_FILL + + + + + + True + True + Use the polyphony value stored in the patch file + Load from file + True + 0 + True + True + + + 1 + 2 1 2 GTK_FILL @@ -925,19 +917,19 @@ - + True True - Use the polyphony value stored in the patch file - Load from file + Set polyphony to the same value as the parent (containing) patch + Same as parent (?) True 0 - True True + load_subpatch_poly_from_file_radio - 1 - 2 + 2 + 3 1 2 GTK_FILL @@ -945,47 +937,55 @@ - - True - True - Use the name stored in the patch file - Load from file - True - 0 - True - True - - - 1 - 2 - GTK_FILL - - - - - + True 0 - <b>Polyphony: </b> - True - 1 - 2 + 2 + 3 GTK_FILL - + True - 0 - <b>Name: </b> - True + + + True + True + Specify the name for the new patch + Specify: + True + 0 + True + load_subpatch_name_from_file_radio + + + False + False + + + + + True + False + True + Specify the name for the new patch + * + True + + + False + 1 + + - GTK_FILL - + 3 + 4 + GTK_FILL @@ -1046,6 +1046,54 @@ 4 12 4 + + + True + 0 + <b>Polyphony: </b> + True + + + GTK_FILL + + + + + + True + True + Use the same polyphony as the current patch + Keep current + True + 0 + True + True + + + 1 + 2 + GTK_FILL + + + + + + True + True + Use the polyphony value stored in the patch file + Load from file + True + 0 + True + load_patch_poly_from_current_radio + + + 2 + 3 + GTK_FILL + + + True @@ -1086,54 +1134,6 @@ GTK_FILL - - - True - True - Use the polyphony value stored in the patch file - Load from file - True - 0 - True - load_patch_poly_from_current_radio - - - 2 - 3 - GTK_FILL - - - - - - True - True - Use the same polyphony as the current patch - Keep current - True - 0 - True - True - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - <b>Polyphony: </b> - True - - - GTK_FILL - - - False @@ -1197,22 +1197,46 @@ - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + + True + 0 + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + + + + + + + + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True - - True - 0 - 4 - 4 - <b>Name</b> - True - True + + True + Apply changed controls to all voices + All Voices + True + 0 + True False @@ -1220,67 +1244,54 @@ - + True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 1 - 1 - 0 - 0 - 2 - 2 - 2 + 5 - + True True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 - 4 + Apply changed controls to one voice only + Specific Voice: + True + 0 + True + control_panel_all_voices_radio + + + False + False + + + + + True + False + True + Voice control changes are applied to + 1 1 100 1 10 10 + 1 True + + 1 + + False + False 1 False - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 -1e+113 1e+137 0 0 0 - 63 - False - - - False + 5 1 - - 3 - 4 - - - - - True - - - 1 - 2 - GTK_FILL - @@ -1514,46 +1525,32 @@ - + True + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True - 0 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - - - True - GTK_SHADOW_NONE - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - - - - - True - True - - - True - Apply changed controls to all voices - All Voices - True - 0 - True + 0 + 4 + 4 + <b>Name</b> + True + True False @@ -1561,54 +1558,57 @@ - + True - 5 - - - True - True - Apply changed controls to one voice only - Specific Voice: - True - 0 - True - control_panel_all_voices_radio - - - False - False - - + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 1 + 0 + 0 + 2 + 2 + 2 - + True - False True - Voice control changes are applied to - 1 1 100 1 10 10 - 1 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + 0 -9.9999999999999999e+45 1.0000000000000001e+63 1 10 10 + 4 True - - 1 - - False - False 1 False - 5 + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 -1e+113 1e+137 0 0 0 + 63 + False + + + False 1 + + 3 + 4 + @@ -1698,51 +1698,51 @@ 2 2 - + True - 0 + <b>Patch Search Path: </b> + True - 1 - 2 GTK_FILL - + True - <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> - True + True + * 1 2 - 1 - 2 - GTK_FILL - + True - True - * + <i>Example: /foo/bar:/home/john/patches:/usr/share/om/patches</i> + True 1 2 + 1 + 2 + GTK_FILL - + True - <b>Patch Search Path: </b> - True + 0 + 1 + 2 GTK_FILL @@ -2118,7 +2118,7 @@ 10 6 - + True 0 - @@ -2126,34 +2126,28 @@ 1 2 - 2 - 3 GTK_FILL - + True 0 - Name: + Type: - 2 - 3 GTK_FILL - + True 0 - - + URI: - 1 - 2 1 2 GTK_FILL @@ -2161,12 +2155,14 @@ - + True 0 - URI: + - + 1 + 2 1 2 GTK_FILL @@ -2174,18 +2170,20 @@ - + True 0 - Type: + Name: + 2 + 3 GTK_FILL - + True 0 - @@ -2193,6 +2191,8 @@ 1 2 + 2 + 3 GTK_FILL @@ -2347,33 +2347,64 @@ Contributors: 2 8 - + True - 0 + + + True + False + True + 16180 1 65535 1 10 10 + 1 + True + + + False + False + + + + + 1 + 2 + 1 + 2 + GTK_FILL + 8 + + + + + True + + + True + True + * + True + 28 + osc.udp://localhost:16180 + + 1 2 - 2 - 3 GTK_FILL - + GTK_FILL + 8 - + True - False True - Use internal engine + Connect to running server at: True 0 True - connect_server_radiobutton - 2 - 3 GTK_FILL @@ -2396,66 +2427,35 @@ Contributors: - + True + False True - Connect to running server at: + Use internal engine True 0 True + connect_server_radiobutton + 2 + 3 GTK_FILL - + True - - - True - True - * - True - 28 - osc.udp://localhost:16180 - - + 0 1 2 + 2 + 3 GTK_FILL - GTK_FILL - 8 - - - - - True - - - True - False - True - 16180 1 65535 1 10 10 - 1 - True - - - False - False - - - - - 1 - 2 - 1 - 2 - GTK_FILL - 8 + @@ -2522,6 +2522,44 @@ Contributors: True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Add a controller widget to the canvas + Control + True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Number + True + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Button + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-edit + + + + True @@ -2796,26 +2834,19 @@ Contributors: 2 8 - - True - 0 - Short Name: - - - 1 - 2 - GTK_FILL - - - - - + True - 0 - Symbol: + True + Enter a short name suitable for use as an identifier or filename. + +The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. + + * + True - GTK_FILL + 1 + 2 @@ -2836,19 +2867,26 @@ Contributors: - + True - True - Enter a short name suitable for use as an identifier or filename. - -The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. - - * - True + 0 + Symbol: - 1 - 2 + GTK_FILL + + + + + + True + 0 + Short Name: + + + 1 + 2 + GTK_FILL @@ -2994,26 +3032,17 @@ Thank you for contributing. 2 4 - - True - 0 - Maximum Value: - - - 1 - 2 - GTK_FILL - - - - - + True - 0 - Minimum Value: + True + 0 -100000000 100000000 1 10 10 + 1 + 5 + True - GTK_FILL + 1 + 2 @@ -3035,17 +3064,26 @@ Thank you for contributing. - + True - True - 0 -100000000 100000000 1 10 10 - 1 - 5 - True + 0 + Minimum Value: - 1 - 2 + GTK_FILL + + + + + + True + 0 + Maximum Value: + + + 1 + 2 + GTK_FILL -- cgit v1.2.1