21 #include "gtk2ardour-config.h"
24 #include <glibmm/miscutils.h>
25 #include <gtkmm/messagedialog.h>
57 Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
58 show_editor_mixer (tact->get_active());
67 Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
68 show_editor_list (tact->get_active());
77 show_editor_mixer_when_tracks_arrive =
false;
80 Glib::RefPtr<Gdk::Window> win = get_window ();
81 Glib::RefPtr<Gdk::Screen> screen;
84 screen = win->get_screen();
86 screen = Gdk::Screen::get_default();
89 if (g_getenv (
"ARDOUR_LOVES_STUPID_TINY_SCREENS") == 0 && screen && screen->get_height() < 700) {
90 Gtk::MessageDialog msg (
_(
"This screen is not tall enough to display the editor mixer"));
97 show_editor_mixer_when_tracks_arrive = yn;
103 if (selection->tracks.empty()) {
105 if (track_views.empty()) {
106 show_editor_mixer_when_tracks_arrive =
true;
110 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
113 if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
120 sort_track_selection (selection->tracks);
122 for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
125 if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
133 if (current_mixer_strip == 0) {
134 create_editor_mixer ();
138 if (current_mixer_strip && current_mixer_strip->get_parent() == 0) {
139 global_hpacker.pack_start (*current_mixer_strip, Gtk::PACK_SHRINK );
140 global_hpacker.reorder_child (*current_mixer_strip, 0);
141 current_mixer_strip->show ();
145 current_mixer_strip->set_route (r);
146 current_mixer_strip->set_width_enum (editor_mixer_strip_width, (
void*)
this);
151 if (current_mixer_strip) {
152 if (current_mixer_strip->get_parent() != 0) {
153 global_hpacker.remove (*current_mixer_strip);
160 ensure_all_elements_drawn();
166 Editor::ensure_all_elements_drawn ()
168 controls_layout.queue_draw ();
169 time_bars_event_box.queue_draw ();
183 current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*
this, &Editor::ensure_all_elements_drawn));
185 current_mixer_strip->set_embedded (
true);
199 Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
200 if (!tact || !tact->get_active()) {
206 if (current_mixer_strip == 0) {
207 create_editor_mixer ();
217 if ((atv = dynamic_cast<AutomationTimeAxisView*>(&view)) != 0) {
222 route = parent->
route ();
239 if (current_mixer_strip->route() == route) {
244 current_mixer_strip->set_route (route);
245 current_mixer_strip->set_width_enum (editor_mixer_strip_width, (
void*)
this);
254 Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
255 tact->set_active (
false);
262 if (current_mixer_strip) {
271 ensure_all_elements_drawn ();
274 editor_mixer_strip_width = current_mixer_strip->get_width_enum ();
286 if (_following_mixer_selection) {
290 _following_mixer_selection =
true;
291 selection->block_tracks_changed (
true);
295 selection->clear_tracks ();
297 for (RouteUISelection::iterator i = s.begin(); i != s.end(); ++i) {
298 TimeAxisView* tav = get_route_view_by_route_id ((*i)->route()->id());
300 selection->add (tav);
304 _following_mixer_selection =
false;
305 selection->block_tracks_changed (
false);
306 selection->TracksChanged ();
void editor_list_button_toggled()
TimeAxisView * get_parent()
void set_selected_mixer_strip(TimeAxisView &)
RouteProcessorSelection & selection()
void mixer_strip_width_changed()
static ARDOUR_UI * instance()
void maybe_add_mixer_strip_width(XMLNode &)
LIBGTKMM2EXT_API Glib::RefPtr< Gtk::Action > get_action(const char *group, const char *name)
void show_editor_mixer(bool yn)
void editor_mixer_button_toggled()
void current_mixer_strip_hidden()
void follow_mixer_selection()
XMLProperty * add_property(const char *name, const std::string &value)
void track_mixer_selection()
void create_editor_mixer()
static Mixer_UI * instance()
boost::shared_ptr< ARDOUR::Route > route() const
sigc::signal< void > RoutesChanged