diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-18 16:21:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-18 16:21:16 +0000 |
commit | d53364f2cff25b8883f1188a22a1b7065680f229 (patch) | |
tree | b107589c18f781f40ae1d00116c08e3a8b5d3313 /libs | |
parent | 7a2c0b9d9a9a38f00018e7832f62975c9a9d516f (diff) |
MCP: gui stuff
git-svn-id: svn://localhost/ardour2/branches/3.0@12007 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/gui.cc | 61 | ||||
-rw-r--r-- | libs/surfaces/mackie/gui.h | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/surface.cc | 1 |
3 files changed, 62 insertions, 8 deletions
diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc index 6321495c59..e9c95ddec9 100644 --- a/libs/surfaces/mackie/gui.cc +++ b/libs/surfaces/mackie/gui.cc @@ -25,6 +25,8 @@ #include <gtkmm/treestore.h> #include <gtkmm/notebook.h> #include <gtkmm/cellrenderercombo.h> +#include <gtkmm/scale.h> +#include <gtkmm/alignment.h> #include "pbd/strsplit.h" @@ -65,14 +67,21 @@ MackieControlProtocol::build_gui () MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p) : _cp (p) + , touch_sensitivity_adjustment (0, 0, 9, 1, 4) + , touch_sensitivity_scale (touch_sensitivity_adjustment) + , recalibrate_fader_button (_("Recalibrate Faders")) { + Gtk::Label* l; + Gtk::Alignment* align; + set_border_width (12); - Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 2)); - table->set_spacings (4); - - table->attach (*manage (new Gtk::Label (_("Device Type:"))), 0, 1, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0)); - table->attach (_surface_combo, 1, 2, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0)); + Gtk::Table* table = Gtk::manage (new Gtk::Table (2, 7)); + table->set_row_spacings (4); + table->set_col_spacings (6); + l = manage (new Gtk::Label (_("Device Type:"))); + table->attach (*l, 0, 1, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0)); + table->attach (_surface_combo, 1, 2, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 20); vector<string> surfaces; @@ -83,6 +92,45 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p) _surface_combo.set_active_text (p.device_info().name()); _surface_combo.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::surface_combo_changed)); + RadioButtonGroup rb_group = absolute_touch_mode_button.get_group(); + touch_move_mode_button.set_group (rb_group); + + l = manage (new Gtk::Label (_("Button click"))); + l->set_alignment (1.0, 0.5); + table->attach (*l, 0, 1, 1, 2, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (relay_click_button); + table->attach (*align, 1, 2, 1, 2, AttachOptions(FILL|EXPAND), AttachOptions (0)); + l = manage (new Gtk::Label (_("Backlight"))); + l->set_alignment (1.0, 0.5); + table->attach (*l, 0, 1, 2, 3, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (backlight_button); + table->attach (*align, 1, 2, 2, 3, AttachOptions(FILL|EXPAND), AttachOptions (0)); + l = manage (new Gtk::Label (_("Send Fader Position Only When Touched"))); + l->set_alignment (1.0, 0.5); + table->attach (*l, 0, 1, 3, 4, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (absolute_touch_mode_button); + table->attach (*align, 1, 2, 3, 4, AttachOptions(FILL|EXPAND), AttachOptions (0)); + l = manage (new Gtk::Label (_("Send Fader Position When Moved"))); + l->set_alignment (1.0, 0.5); + table->attach (*l, 0, 1, 4, 5, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (touch_move_mode_button); + table->attach (*align, 1, 2, 4, 5, AttachOptions(FILL|EXPAND), AttachOptions (0)); + l = manage (new Gtk::Label (_("Fader Touch Sense Sensitivity"))); + l->set_alignment (1.0, 0.5); + table->attach (*l, 0, 1, 5, 6, AttachOptions(FILL|EXPAND), AttachOptions (0)); + touch_sensitivity_scale.property_digits() = 0; + touch_sensitivity_scale.property_draw_value() = false; + table->attach (touch_sensitivity_scale, 1, 2, 5, 6, AttachOptions(FILL|EXPAND), AttachOptions (0)); + table->attach (recalibrate_fader_button, 1, 2, 6, 7, AttachOptions(FILL|EXPAND), AttachOptions (0)); + vector<string> profiles; profiles.push_back ("default"); @@ -102,8 +150,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p) VBox* fkey_packer = manage (new VBox); HBox* profile_packer = manage (new HBox); - - Label* l = manage (new Gtk::Label (_("Profile/Settings:"))); + l = manage (new Gtk::Label (_("Profile/Settings:"))); profile_packer->pack_start (*l, false, false); profile_packer->pack_start (_profile_combo, true, true); profile_packer->set_spacing (12); diff --git a/libs/surfaces/mackie/gui.h b/libs/surfaces/mackie/gui.h index 1c248fcbfb..6255702e7b 100644 --- a/libs/surfaces/mackie/gui.h +++ b/libs/surfaces/mackie/gui.h @@ -94,5 +94,13 @@ class MackieControlProtocolGUI : public Gtk::Notebook void profile_combo_changed (); std::map<std::string,std::string> action_map; // map from action names to paths + + Gtk::CheckButton relay_click_button; + Gtk::CheckButton backlight_button; + Gtk::RadioButton absolute_touch_mode_button; + Gtk::RadioButton touch_move_mode_button; + Gtk::Adjustment touch_sensitivity_adjustment; + Gtk::HScale touch_sensitivity_scale; + Gtk::Button recalibrate_fader_button; }; diff --git a/libs/surfaces/mackie/surface.cc b/libs/surfaces/mackie/surface.cc index da22909d26..08b0355d5c 100644 --- a/libs/surfaces/mackie/surface.cc +++ b/libs/surfaces/mackie/surface.cc @@ -331,7 +331,6 @@ Surface::handle_midi_pitchbend_message (MIDI::Parser&, MIDI::pitchbend_t pb, uin Strip* strip = dynamic_cast<Strip*> (&fader->group()); float pos = (pb >> 4)/1023.0; // only the top 10 bytes are used if (strip) { - std::cerr << "New fader position " << pos << " SPtG = " << slider_position_to_gain (pos) << std::endl; strip->handle_fader (*fader, pos); } else { /* master fader */ |