X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fmackie%2Fgui.h;h=4c2acc62782e486ddfe3c246eb22cdb2a748fd1c;hb=1e5672de9827f3fd73cc79f6664644d547a64526;hp=6fc0352b657a72029f306f7ad58fc7c5b780af3b;hpb=4512d013eb7c658519abc8b5e82a1e7bf926cad6;p=ardour.git diff --git a/libs/surfaces/mackie/gui.h b/libs/surfaces/mackie/gui.h index 6fc0352b65..4c2acc6278 100644 --- a/libs/surfaces/mackie/gui.h +++ b/libs/surfaces/mackie/gui.h @@ -26,7 +26,7 @@ #include namespace Gtk { - class CellRendererCombo; +class CellRendererCombo; } #include "button.h" @@ -39,76 +39,81 @@ class MackieControlProtocol; class MackieControlProtocolGUI : public Gtk::Notebook { - public: + public: MackieControlProtocolGUI (MackieControlProtocol &); - private: - MackieControlProtocol& _cp; - Gtk::ComboBoxText _surface_combo; - Gtk::ComboBoxText _profile_combo; - - struct AvailableActionColumns : public Gtk::TreeModel::ColumnRecord { - AvailableActionColumns() { - add (name); - add (path); - } - Gtk::TreeModelColumn name; - Gtk::TreeModelColumn path; - }; + private: + MackieControlProtocol& _cp; + Gtk::ComboBoxText _surface_combo; + Gtk::ComboBoxText _profile_combo; + Gtk::ComboBoxText _input_port_combo; + Gtk::ComboBoxText _output_port_combo; + + struct AvailableActionColumns : public Gtk::TreeModel::ColumnRecord { + AvailableActionColumns() { + add (name); + add (path); + } + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn path; + }; - struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord { - FunctionKeyColumns() { - add (name); - add (id); - add (plain); - add (shift); - add (control); - add (option); - add (cmdalt); - add (shiftcontrol); + struct FunctionKeyColumns : public Gtk::TreeModel::ColumnRecord { + FunctionKeyColumns() { + add (name); + add (id); + add (plain); + add (shift); + add (control); + add (option); + add (cmdalt); + add (shiftcontrol); + }; + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn id; + Gtk::TreeModelColumn plain; + Gtk::TreeModelColumn shift; + Gtk::TreeModelColumn control; + Gtk::TreeModelColumn option; + Gtk::TreeModelColumn cmdalt; + Gtk::TreeModelColumn shiftcontrol; }; - Gtk::TreeModelColumn name; - Gtk::TreeModelColumn id; - Gtk::TreeModelColumn plain; - Gtk::TreeModelColumn shift; - Gtk::TreeModelColumn control; - Gtk::TreeModelColumn option; - Gtk::TreeModelColumn cmdalt; - Gtk::TreeModelColumn shiftcontrol; - }; - - AvailableActionColumns available_action_columns; - FunctionKeyColumns function_key_columns; - - Gtk::ScrolledWindow function_key_scroller; - Gtk::TreeView function_key_editor; - Glib::RefPtr function_key_model; - Glib::RefPtr available_action_model; - - void build_available_action_menu (); - void refresh_function_key_editor (); - void build_function_key_editor (); - void action_changed (const Glib::ustring &sPath, const Glib::ustring &text, Gtk::TreeModelColumnBase); - Gtk::CellRendererCombo* make_action_renderer (Glib::RefPtr model, Gtk::TreeModelColumnBase); - - void surface_combo_changed (); - void profile_combo_changed (); - void ipmidi_spinner_changed (); - - std::map 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; - Gtk::Adjustment ipmidi_base_port_adjustment; - Gtk::SpinButton ipmidi_base_port_spinner; - Gtk::Button discover_button; - - void discover_clicked (); + + AvailableActionColumns available_action_columns; + FunctionKeyColumns function_key_columns; + + Gtk::ScrolledWindow function_key_scroller; + Gtk::TreeView function_key_editor; + Glib::RefPtr function_key_model; + Glib::RefPtr available_action_model; + + void build_available_action_menu (); + void refresh_function_key_editor (); + void build_function_key_editor (); + void action_changed (const Glib::ustring &sPath, const Glib::ustring &text, Gtk::TreeModelColumnBase); + Gtk::CellRendererCombo* make_action_renderer (Glib::RefPtr model, Gtk::TreeModelColumnBase); + + void surface_combo_changed (); + void profile_combo_changed (); + void ipmidi_spinner_changed (); + + std::map 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; + Gtk::Adjustment ipmidi_base_port_adjustment; + Gtk::SpinButton ipmidi_base_port_spinner; + Gtk::Button discover_button; + + void discover_clicked (); + void recalibrate_faders (); + void toggle_backlight (); + void touch_sensitive_change (); }; }