/* * Copyright (C) 2023 Holger Dehnhardt * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __ardour_console1_gui_h__ #define __ardour_console1_gui_h__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Gtk { class CellRendererCombo; class ListStore; } namespace ActionManager { class ActionModel; } #include "ardour/mode.h" #include "console1.h" namespace ArdourSurface { class C1GUI : public Gtk::Notebook { public: C1GUI (Console1&); ~C1GUI (); private: Console1& c1; PBD::ScopedConnectionList lcxl_connections; Gtk::VBox hpacker; Gtk::Table table; Gtk::ComboBox input_combo; Gtk::ComboBox output_combo; Gtk::ComboBox plugins_combo; Gtk::ScrolledWindow plugin_mapping_scroller; Gtk::Image image; Gtk::CheckButton swap_solo_mute_cb; Gtk::CheckButton band_q_as_send_cb; Gtk::CheckButton create_plugin_stubs_btn; Gtk::TreeView plugin_assignment_editor; Gtk::VBox plugin_packer; bool assignement_changed = false; void update_port_combos (); PBD::ScopedConnection connection_change_connection; void connection_handler (); PBD::ScopedConnectionList _port_connections; struct MidiPortColumns : public Gtk::TreeModel::ColumnRecord { MidiPortColumns() { add (short_name); add (full_name); } Gtk::TreeModelColumn short_name; Gtk::TreeModelColumn full_name; }; struct PluginColumns : public Gtk::TreeModel::ColumnRecord { PluginColumns() { add (plugin_name); add (plugin_id); } Gtk::TreeModelColumn plugin_name; Gtk::TreeModelColumn plugin_id; }; struct PluginAssignamentEditorColumns : public Gtk::TreeModel::ColumnRecord { PluginAssignamentEditorColumns() { add (index); add (name); add (is_switch); add (controllerName); add (shift); }; Gtk::TreeModelColumn index; // parameter index Gtk::TreeModelColumn name; // readable name of the parameter Gtk::TreeModelColumn is_switch; Gtk::TreeModelColumn controllerName; // enum Button::ID Gtk::TreeModelColumn shift; }; MidiPortColumns midi_port_columns; PluginColumns plugin_columns; PluginAssignamentEditorColumns plugin_assignment_editor_columns; Glib::RefPtr plugin_assignment_store; bool ignore_active_change; Glib::RefPtr build_midi_port_list (std::vector const & ports, bool for_input); ArdourSurface::Console1::PluginMapping pc; Gtk::CellRendererCombo* make_action_renderer (Glib::RefPtr model, Gtk::TreeModelColumnBase column); void build_plugin_assignment_editor (); void change_controller (const Glib::ustring &, const Gtk::TreeIter&); void toggle_shift ( const Glib::ustring& ); void active_port_changed (Gtk::ComboBox*, bool for_input); void set_swap_solo_mute (); void set_band_q_as_send(); void set_create_mapping_stubs (); void active_plugin_changed (Gtk::ComboBox* combo); void write_plugin_assignment (); }; } #endif /* __ardour_console1_gui_h__ */