Add method to show/hide VCA (and Mixbus) Mixer pane

This commit is contained in:
Robin Gareus 2018-08-08 22:42:12 +02:00
parent 3064c5a675
commit bf694199ab
5 changed files with 52 additions and 0 deletions

View File

@ -515,6 +515,10 @@
<menuitem action='show-editor-list'/>
<menuitem action='ToggleMixerList'/>
<menuitem action='ToggleMonitorSection'/>
#ifdef MIXBUS
<menuitem action='ToggleMixbusPane'/>
#endif
<menuitem action='ToggleVCAPane'/>
<menuitem action='ToggleSummary'/>
<menuitem action='ToggleGroupTabs'/>
<menuitem action='show-marker-lines'/>

View File

@ -230,6 +230,11 @@ public:
void toggle_monitor_section_visibility ();
void toggle_keep_tearoffs();
void toggle_vca_pane();
#ifdef MIXBUS
void toggle_mixbus_pane();
#endif
void reset_focus (Gtk::Widget*);
static PublicEditor* _instance;

View File

@ -977,3 +977,27 @@ ARDOUR_UI::toggle_monitor_section_visibility ()
mixer->show_monitor_section (tact->get_active());
}
}
void
ARDOUR_UI::toggle_vca_pane ()
{
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleVCAPane");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
mixer->showhide_vcas (tact->get_active());
}
}
#ifdef MIXBUS
void
ARDOUR_UI::toggle_mixbus_pane ()
{
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMixbusPane");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
mixer->showhide_mixbusses (tact->get_active());
}
}
#endif

View File

@ -372,6 +372,16 @@ ARDOUR_UI::install_actions ()
act = global_actions.register_toggle_action (common_actions, X_("ToggleMixerList"), _("Toggle Mixer List"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_list));
ActionManager::session_sensitive_actions.push_back (act);
act = global_actions.register_toggle_action (common_actions, X_("ToggleVCAPane"), _("Toggle VCA Pane"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_vca_pane));
ActionManager::session_sensitive_actions.push_back (act);
Glib::RefPtr<ToggleAction>::cast_dynamic(act)->set_active (true);
#ifdef MIXBUS
act = global_actions.register_toggle_action (common_actions, X_("ToggleMixbusPane"), _("Toggle Mixbus Pane"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixbus_pane));
ActionManager::session_sensitive_actions.push_back (act);
Glib::RefPtr<ToggleAction>::cast_dynamic(act)->set_active (true);
#endif
act = global_actions.register_toggle_action (common_actions, X_("ToggleMonitorSection"), _("Toggle Monitor Section Visibility"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_monitor_section_visibility));
act->set_sensitive (false);

View File

@ -133,6 +133,15 @@ public:
void load_bindings ();
Gtkmm2ext::Bindings* bindings;
void showhide_vcas (bool on) {
if (on) { vca_vpacker.show(); } else { vca_vpacker.hide(); }
}
#ifdef MIXBUS
void showhide_mixbusses (bool on) {
if (on) { mb_vpacker.show(); } else { mb_vpacker.hide(); }
}
#endif
protected:
void set_axis_targets_for_operation ();
ARDOUR::AutomationControlSet selected_gaincontrols ();