This is useful for dual-head setups.
<menu name='View' action = 'View'>
<menuitem action='ToggleMaximalEditor'/>
+ <menuitem action='ToggleMaximalMixer'/>
<menuitem action='KeepTearoffs'/>
<separator/>
void new_midi_tracer_window ();
void toggle_editing_space();
+ void toggle_mixer_space();
void toggle_keep_tearoffs();
Gtk::Tooltips& tooltips() { return _tooltips; }
}
return true;
}
+
+void
+ARDOUR_UI::toggle_mixer_space()
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalMixer");
+
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ if (tact->get_active()) {
+ mixer->maximise_mixer_space ();
+ } else {
+ mixer->restore_mixer_space ();
+ }
+ }
+}
/* windows visibility actions */
ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
+ ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalMixer"), _("Maximise Mixer Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_mixer_space));
act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Show Toolbars"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
ActionManager::session_sensitive_actions.push_back (act);
group_display.show();
_in_group_rebuild_or_clear = false;
+ _maximised = false;
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
}
}
+ if ((prop = node.property ("maximised"))) {
+ bool yn = string_is_affirmative (prop->value());
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleMaximalMixer"));
+ assert (act);
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ bool fs = tact && tact->get_active();
+ if (yn ^ fs) {
+ ActionManager::do_action ("Common",
+ "ToggleMaximalMixer");
+ }
+ }
+
+
return 0;
}
node->add_property ("show-mixer", _visible ? "yes" : "no");
+ node->add_property ("maximised", _maximised ? "yes" : "no");
+
return *node;
}
_session->set_exclusive_input_active (rl, onoff, flip_others);
}
+void
+Mixer_UI::maximise_mixer_space ()
+{
+ if (_maximised) {
+ return;
+ }
+
+ fullscreen ();
+
+ _maximised = true;
+}
+
+void
+Mixer_UI::restore_mixer_space ()
+{
+ if (!_maximised) {
+ return;
+ }
+
+ unfullscreen();
+
+ _maximised = false;
+}
void show_strip (MixerStrip *);
void hide_strip (MixerStrip *);
+ void maximise_mixer_space();
+ void restore_mixer_space();
+
void ensure_float (Gtk::Window&);
MonitorSection* monitor_section() const { return _monitor_section; }
bool _following_editor_selection;
void monitor_section_going_away ();
+
+ /// true if we are in fullscreen mode
+ bool _maximised;
};
#endif /* __ardour_mixer_ui_h__ */