2 Copyright (C) 2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <sigc++/bind.h>
29 #include <pbd/error.h>
30 #include <pbd/stl_delete.h>
31 #include <pbd/whitespace.h>
32 #include <pbd/memento_command.h>
34 #include <gtkmm/menu.h>
35 #include <gtkmm/menuitem.h>
36 #include <gtkmm2ext/gtk_ui.h>
37 #include <gtkmm2ext/selector.h>
38 #include <gtkmm2ext/stop_signal.h>
39 #include <gtkmm2ext/bindable_button.h>
40 #include <gtkmm2ext/utils.h>
42 #include <ardour/playlist.h>
43 #include <ardour/audioplaylist.h>
44 #include <ardour/diskstream.h>
45 #include <ardour/insert.h>
46 #include <ardour/ladspa_plugin.h>
47 #include <ardour/location.h>
48 #include <ardour/panner.h>
49 #include <ardour/playlist.h>
50 #include <ardour/session.h>
51 #include <ardour/session_playlist.h>
52 #include <ardour/utils.h>
53 #include <ardour/profile.h>
55 #include "ardour_ui.h"
56 #include "route_time_axis.h"
57 #include "automation_time_axis.h"
58 #include "redirect_automation_time_axis.h"
59 #include "redirect_automation_line.h"
60 #include "canvas_impl.h"
61 #include "crossfade_view.h"
63 #include "gui_thread.h"
65 #include "playlist_selector.h"
66 #include "point_selection.h"
68 #include "public_editor.h"
69 #include "region_view.h"
70 #include "rgb_macros.h"
71 #include "selection.h"
72 #include "simplerect.h"
73 #include "streamview.h"
76 #include <ardour/track.h>
80 using namespace ARDOUR;
82 using namespace Gtkmm2ext;
84 using namespace Editing;
87 Glib::RefPtr<Gdk::Pixbuf> RouteTimeAxisView::slider;
90 RouteTimeAxisView::setup_slider_pix ()
92 if ((slider = ::get_icon ("fader_belt_h")) == 0) {
93 throw failed_constructor ();
97 RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
99 RouteUI(rt, sess, _("m"), _("s"), _("r")), // mute, solo, and record
100 TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas),
101 parent_canvas (canvas),
103 edit_group_button (_("g")), // group
104 playlist_button (_("p")),
105 size_button (_("h")), // height
106 automation_button (_("a")),
107 visual_button (_("v")),
108 gm (rt, sess, slider, true)
110 gm.get_level_meter().set_no_show_all();
111 gm.get_level_meter().setup_meters(50);
115 playlist_action_menu = 0;
116 automation_action_menu = 0;
118 timestretch_rect = 0;
120 destructive_track_mode_item = 0;
121 normal_track_mode_item = 0;
123 ignore_toggle = false;
125 edit_group_button.set_name ("TrackGroupButton");
126 playlist_button.set_name ("TrackPlaylistButton");
127 automation_button.set_name ("TrackAutomationButton");
128 size_button.set_name ("TrackSizeButton");
129 visual_button.set_name ("TrackVisualButton");
130 hide_button.set_name ("TrackRemoveButton");
132 hide_button.add (*(manage (new Image (::get_icon("hide")))));
133 hide_button.show_all ();
135 edit_group_button.signal_button_release_event().connect (mem_fun(*this, &RouteTimeAxisView::edit_click), false);
136 playlist_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::playlist_click));
137 automation_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::automation_click));
138 size_button.signal_button_release_event().connect (mem_fun(*this, &RouteTimeAxisView::size_click), false);
139 visual_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::visual_click));
140 hide_button.signal_clicked().connect (mem_fun(*this, &RouteTimeAxisView::hide_click));
142 solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
143 solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release));
144 mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press), false);
145 mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release));
151 rec_enable_button->remove ();
152 switch (track()->mode()) {
154 rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_normal_red"))))));
156 case ARDOUR::Destructive:
157 rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_tape_red"))))));
160 rec_enable_button->show_all ();
162 rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press), false);
163 rec_enable_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::rec_enable_release));
164 controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
165 ARDOUR_UI::instance()->tooltips().set_tip(*rec_enable_button, _("Record"));
169 controls_hbox.pack_start(gm.get_level_meter(), false, false);
170 _route->meter_change.connect (mem_fun(*this, &RouteTimeAxisView::meter_changed));
171 _route->input_changed.connect (mem_fun(*this, &RouteTimeAxisView::io_changed));
172 _route->output_changed.connect (mem_fun(*this, &RouteTimeAxisView::io_changed));
174 controls_table.attach (*mute_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
175 controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
177 controls_table.attach (edit_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
178 controls_table.attach (gm.get_gain_slider(), 0, 5, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
180 ARDOUR_UI::instance()->tooltips().set_tip(*solo_button,_("Solo"));
181 ARDOUR_UI::instance()->tooltips().set_tip(*mute_button,_("Mute"));
182 ARDOUR_UI::instance()->tooltips().set_tip(edit_group_button,_("Edit Group"));
183 ARDOUR_UI::instance()->tooltips().set_tip(size_button,_("Display Height"));
184 ARDOUR_UI::instance()->tooltips().set_tip(playlist_button,_("Playlist"));
185 ARDOUR_UI::instance()->tooltips().set_tip(automation_button, _("Automation"));
186 ARDOUR_UI::instance()->tooltips().set_tip(visual_button, _("Visual options"));
187 ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("Hide this track"));
193 /* old school - when we used to put an extra row of buttons in place */
195 controls_table.attach (hide_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
196 controls_table.attach (visual_button, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
197 controls_table.attach (size_button, 2, 3, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
198 controls_table.attach (automation_button, 3, 4, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
202 controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
205 if (is_track() && track()->mode() == ARDOUR::Normal) {
206 controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
211 _route->redirects_changed.connect (mem_fun(*this, &RouteTimeAxisView::redirects_changed));
212 _route->name_changed.connect (mem_fun(*this, &RouteTimeAxisView::route_name_changed));
216 track()->TrackModeChanged.connect (mem_fun(*this, &RouteTimeAxisView::track_mode_changed));
217 track()->FreezeChange.connect (mem_fun(*this, &RouteTimeAxisView::map_frozen));
218 track()->DiskstreamChanged.connect (mem_fun(*this, &RouteTimeAxisView::diskstream_changed));
219 get_diskstream()->SpeedChanged.connect (mem_fun(*this, &RouteTimeAxisView::speed_changed));
221 /* pick up the correct freeze state */
226 editor.ZoomChanged.connect (mem_fun(*this, &RouteTimeAxisView::reset_samples_per_unit));
227 ColorsChanged.connect (mem_fun (*this, &RouteTimeAxisView::color_handler));
229 gm.get_gain_slider().set_name ("TrackGainFader");
232 RouteTimeAxisView::~RouteTimeAxisView ()
234 GoingAway (); /* EMIT_SIGNAL */
236 vector_delete (&redirect_automation_curves);
238 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
243 delete playlist_menu;
247 if (playlist_action_menu) {
248 delete playlist_action_menu;
249 playlist_action_menu = 0;
259 RouteTimeAxisView::post_construct ()
261 /* map current state of the route */
263 update_diskstream_display ();
264 subplugin_menu.items().clear ();
265 _route->foreach_redirect (this, &RouteTimeAxisView::add_redirect_to_subplugin_menu);
266 _route->foreach_redirect (this, &RouteTimeAxisView::add_existing_redirect_automation_curves);
267 reset_redirect_automation_curves ();
271 RouteTimeAxisView::set_playlist (boost::shared_ptr<Playlist> newplaylist)
273 boost::shared_ptr<Playlist> pl = playlist();
276 modified_connection.disconnect ();
277 modified_connection = pl->Modified.connect (mem_fun(*this, &RouteTimeAxisView::playlist_modified));
281 RouteTimeAxisView::playlist_modified ()
286 RouteTimeAxisView::edit_click (GdkEventButton *ev)
288 if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
289 _route->set_edit_group (0, this);
293 using namespace Menu_Helpers;
295 MenuList& items = edit_group_menu.items ();
296 RadioMenuItem::Group group;
299 items.push_back (RadioMenuElem (group, _("No group"),
300 bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), (RouteGroup *) 0)));
302 if (_route->edit_group() == 0) {
303 static_cast<RadioMenuItem*>(&items.back())->set_active ();
306 _session.foreach_edit_group (bind (mem_fun (*this, &RouteTimeAxisView::add_edit_group_menu_item), &group));
307 edit_group_menu.popup (ev->button, ev->time);
313 RouteTimeAxisView::add_edit_group_menu_item (RouteGroup *eg, RadioMenuItem::Group* group)
315 using namespace Menu_Helpers;
317 MenuList &items = edit_group_menu.items();
319 items.push_back (RadioMenuElem (*group, eg->name(), bind (mem_fun(*this, &RouteTimeAxisView::set_edit_group_from_menu), eg)));
320 if (_route->edit_group() == eg) {
321 static_cast<RadioMenuItem*>(&items.back())->set_active ();
326 RouteTimeAxisView::set_edit_group_from_menu (RouteGroup *eg)
328 _route->set_edit_group (eg, this);
332 RouteTimeAxisView::playlist_changed ()
337 set_playlist (get_diskstream()->playlist());
342 RouteTimeAxisView::label_view ()
344 string x = _route->name();
346 if (x != name_entry.get_text()) {
347 name_entry.set_text (x);
350 ARDOUR_UI::instance()->tooltips().set_tip (name_entry, x);
354 RouteTimeAxisView::route_name_changed (void *src)
356 editor.route_name_changed (this);
361 RouteTimeAxisView::take_name_changed (void *src)
370 RouteTimeAxisView::playlist_click ()
372 // always build a new action menu
374 if (playlist_action_menu != 0) {
375 delete playlist_action_menu;
378 playlist_action_menu = new Menu;
379 playlist_action_menu->set_name ("ArdourContextMenu");
381 build_playlist_menu (playlist_action_menu);
383 conditionally_add_to_selection ();
384 playlist_action_menu->popup (1, gtk_get_current_event_time());
388 RouteTimeAxisView::automation_click ()
390 if (automation_action_menu == 0) {
391 /* this seems odd, but the automation action
392 menu is built as part of the display menu.
394 build_display_menu ();
396 conditionally_add_to_selection ();
397 automation_action_menu->popup (1, gtk_get_current_event_time());
401 RouteTimeAxisView::build_automation_action_menu ()
403 using namespace Menu_Helpers;
405 automation_action_menu = manage (new Menu);
406 MenuList& automation_items = automation_action_menu->items();
407 automation_action_menu->set_name ("ArdourContextMenu");
409 automation_items.push_back (MenuElem (_("Show all automation"),
410 mem_fun(*this, &RouteTimeAxisView::show_all_automation)));
412 automation_items.push_back (MenuElem (_("Show existing automation"),
413 mem_fun(*this, &RouteTimeAxisView::show_existing_automation)));
415 automation_items.push_back (MenuElem (_("Hide all automation"),
416 mem_fun(*this, &RouteTimeAxisView::hide_all_automation)));
418 automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
422 RouteTimeAxisView::build_display_menu ()
424 using namespace Menu_Helpers;
426 /* get the size menu ready */
432 TimeAxisView::build_display_menu ();
434 /* now fill it with our stuff */
436 MenuList& items = display_menu->items();
437 display_menu->set_name ("ArdourContextMenu");
439 items.push_back (MenuElem (_("Height"), *size_menu));
440 items.push_back (MenuElem (_("Color"), mem_fun(*this, &RouteTimeAxisView::select_track_color)));
442 items.push_back (SeparatorElem());
444 build_remote_control_menu ();
445 build_automation_action_menu ();
447 if (!Profile->get_sae()) {
448 items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
449 items.push_back (MenuElem (_("Automation"), *automation_action_menu));
450 items.push_back (SeparatorElem());
453 // Hook for derived classes to add type specific stuff
454 append_extra_display_menu_items ();
455 items.push_back (SeparatorElem());
459 Menu* alignment_menu = manage (new Menu);
460 MenuList& alignment_items = alignment_menu->items();
461 alignment_menu->set_name ("ArdourContextMenu");
463 RadioMenuItem::Group align_group;
465 alignment_items.push_back (RadioMenuElem (align_group, _("Align with existing material"),
466 bind (mem_fun(*this, &RouteTimeAxisView::set_align_style), ExistingMaterial)));
467 align_existing_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
468 if (get_diskstream()->alignment_style() == ExistingMaterial)
469 align_existing_item->set_active();
471 alignment_items.push_back (RadioMenuElem (align_group, _("Align with capture time"),
472 bind (mem_fun(*this, &RouteTimeAxisView::set_align_style), CaptureTime)));
473 align_capture_item = dynamic_cast<RadioMenuItem*>(&alignment_items.back());
474 if (get_diskstream()->alignment_style() == CaptureTime)
475 align_capture_item->set_active();
477 if (!Profile->get_sae()) {
478 items.push_back (MenuElem (_("Alignment"), *alignment_menu));
479 get_diskstream()->AlignmentStyleChanged.connect (mem_fun(*this, &RouteTimeAxisView::align_style_changed));
481 RadioMenuItem::Group mode_group;
482 items.push_back (RadioMenuElem (mode_group, _("Normal mode"),
483 bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Normal)));
484 normal_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
485 items.push_back (RadioMenuElem (mode_group, _("Tape mode"),
486 bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Destructive)));
487 destructive_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
489 switch (track()->mode()) {
490 case ARDOUR::Destructive:
491 destructive_track_mode_item->set_active ();
494 normal_track_mode_item->set_active ();
498 items.push_back (SeparatorElem());
502 items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));
503 route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
504 route_active_menu_item->set_active (_route->active());
506 items.push_back (SeparatorElem());
507 items.push_back (MenuElem (_("Hide"), mem_fun(*this, &RouteTimeAxisView::hide_click)));
508 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
511 static bool __reset_item (RadioMenuItem* item)
518 RouteTimeAxisView::set_track_mode (TrackMode mode)
521 RadioMenuItem* other_item;
525 item = normal_track_mode_item;
526 other_item = destructive_track_mode_item;
528 case ARDOUR::Destructive:
529 item = destructive_track_mode_item;
530 other_item = normal_track_mode_item;
533 fatal << string_compose (_("programming error: %1 %2"), "illegal track mode in RouteTimeAxisView::set_track_mode", mode) << endmsg;
538 if (item && other_item && item->get_active () && track()->mode() != mode) {
539 _set_track_mode (track(), mode, other_item);
544 RouteTimeAxisView::_set_track_mode (boost::shared_ptr<Track> track, TrackMode mode, RadioMenuItem* reset_item)
548 if (!track->can_use_mode (mode, needs_bounce)) {
552 Glib::signal_idle().connect (bind (sigc::ptr_fun (__reset_item), reset_item));
555 cerr << "would bounce this one\n";
560 track->set_mode (mode);
562 rec_enable_button->remove ();
565 rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_normal_red"))))));
567 case ARDOUR::Destructive:
568 rec_enable_button->add (*(manage (new Image (::get_icon (X_("record_tape_red"))))));
571 rec_enable_button->show_all ();
576 RouteTimeAxisView::track_mode_changed ()
580 switch (track()->mode()) {
582 item = normal_track_mode_item;
584 case ARDOUR::Destructive:
585 item = destructive_track_mode_item;
588 fatal << string_compose (_("programming error: %1 %2"), "illegal track mode in RouteTimeAxisView::set_track_mode", track()->mode()) << endmsg;
597 RouteTimeAxisView::show_timestretch (nframes_t start, nframes_t end)
603 TimeAxisView::show_timestretch (start, end);
613 /* check that the time selection was made in our route, or our edit group.
614 remember that edit_group() == 0 implies the route is *not* in a edit group.
617 if (!(ts.track == this || (ts.group != 0 && ts.group == _route->edit_group()))) {
618 /* this doesn't apply to us */
622 /* ignore it if our edit group is not active */
624 if ((ts.track != this) && _route->edit_group() && !_route->edit_group()->is_active()) {
629 if (timestretch_rect == 0) {
630 timestretch_rect = new SimpleRect (*canvas_display);
631 timestretch_rect->property_x1() = 0.0;
632 timestretch_rect->property_y1() = 0.0;
633 timestretch_rect->property_x2() = 0.0;
634 timestretch_rect->property_y2() = 0.0;
635 timestretch_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchFill.get();
636 timestretch_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchOutline.get();
639 timestretch_rect->show ();
640 timestretch_rect->raise_to_top ();
642 x1 = start / editor.get_current_zoom();
643 x2 = (end - 1) / editor.get_current_zoom();
644 y2 = current_height() - 2;
646 timestretch_rect->property_x1() = x1;
647 timestretch_rect->property_y1() = 1.0;
648 timestretch_rect->property_x2() = x2;
649 timestretch_rect->property_y2() = y2;
653 RouteTimeAxisView::hide_timestretch ()
655 TimeAxisView::hide_timestretch ();
657 if (timestretch_rect) {
658 timestretch_rect->hide ();
663 RouteTimeAxisView::show_selection (TimeSelection& ts)
667 /* ignore it if our edit group is not active or if the selection was started
668 in some other track or edit group (remember that edit_group() == 0 means
669 that the track is not in an edit group).
672 if (((ts.track != this && !is_child (ts.track)) && _route->edit_group() && !_route->edit_group()->is_active()) ||
673 (!(ts.track == this || is_child (ts.track) || (ts.group != 0 && ts.group == _route->edit_group())))) {
679 TimeAxisView::show_selection (ts);
683 RouteTimeAxisView::set_height (uint32_t h)
686 bool height_changed = (height == 0) || (h != height);
687 gm.get_level_meter().setup_meters (gmlen);
689 TimeAxisView::set_height (h);
694 _view->set_height ((double) current_height());
698 snprintf (buf, sizeof (buf), "%u", height);
699 xml_node->add_property ("height", buf);
701 if (height >= hNormal) {
706 gm.get_gain_slider().show();
709 if (rec_enable_button)
710 rec_enable_button->show();
712 edit_group_button.show();
714 visual_button.show();
716 automation_button.show();
718 if (is_track() && track()->mode() == ARDOUR::Normal) {
719 playlist_button.show();
722 } else if (height >= hSmaller) {
728 gm.get_gain_slider().hide();
731 if (rec_enable_button)
732 rec_enable_button->show();
734 edit_group_button.hide ();
736 visual_button.hide ();
738 automation_button.hide ();
740 if (is_track() && track()->mode() == ARDOUR::Normal) {
741 playlist_button.hide ();
750 gm.get_gain_slider().hide();
753 if (rec_enable_button)
754 rec_enable_button->hide();
756 edit_group_button.hide ();
758 visual_button.hide ();
760 automation_button.hide ();
761 playlist_button.hide ();
762 name_label.set_text (_route->name());
765 if (height_changed) {
766 /* only emit the signal if the height really changed */
767 _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
772 RouteTimeAxisView::select_track_color ()
774 if (RouteUI::choose_color ()) {
777 _view->apply_color (_color, StreamView::RegionColor);
783 RouteTimeAxisView::reset_samples_per_unit ()
785 set_samples_per_unit (editor.get_current_zoom());
789 RouteTimeAxisView::set_samples_per_unit (double spu)
793 if (get_diskstream() != 0) {
794 speed = get_diskstream()->speed();
798 _view->set_samples_per_unit (spu * speed);
801 TimeAxisView::set_samples_per_unit (spu * speed);
805 RouteTimeAxisView::align_style_changed ()
807 switch (get_diskstream()->alignment_style()) {
808 case ExistingMaterial:
809 if (!align_existing_item->get_active()) {
810 align_existing_item->set_active();
814 if (!align_capture_item->get_active()) {
815 align_capture_item->set_active();
822 RouteTimeAxisView::set_align_style (AlignStyle style)
827 case ExistingMaterial:
828 item = align_existing_item;
831 item = align_capture_item;
834 fatal << string_compose (_("programming error: %1 %2"), "illegal align style in RouteTimeAxisView::set_align_style", style) << endmsg;
839 if (item->get_active()) {
840 get_diskstream()->set_align_style (style);
845 RouteTimeAxisView::rename_current_playlist ()
847 ArdourPrompter prompter (true);
850 boost::shared_ptr<Diskstream> ds = get_diskstream();
851 if (!ds || ds->destructive())
854 boost::shared_ptr<Playlist> pl = ds->playlist();
858 prompter.set_prompt (_("Name for playlist"));
859 prompter.set_initial_text (pl->name());
860 prompter.add_button (_("Rename"), Gtk::RESPONSE_ACCEPT);
861 prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
863 switch (prompter.run ()) {
864 case Gtk::RESPONSE_ACCEPT:
865 prompter.get_result (name);
877 RouteTimeAxisView::use_copy_playlist (bool prompt)
881 boost::shared_ptr<Diskstream> ds = get_diskstream();
882 if (!ds || ds->destructive())
885 boost::shared_ptr<const Playlist> pl = ds->playlist();
892 name = Playlist::bump_name (name, _session);
893 } while (_session.playlist_by_name(name));
895 // TODO: The prompter "new" button should be de-activated if the user
896 // specifies a playlist name which already exists in the session.
900 ArdourPrompter prompter (true);
902 prompter.set_prompt (_("Name for Playlist"));
903 prompter.set_initial_text (name);
904 prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
905 prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, true);
906 prompter.show_all ();
908 switch (prompter.run ()) {
909 case Gtk::RESPONSE_ACCEPT:
910 prompter.get_result (name);
919 ds->use_copy_playlist ();
920 ds->playlist()->set_name (name);
925 RouteTimeAxisView::use_new_playlist (bool prompt)
929 boost::shared_ptr<Diskstream> ds = get_diskstream();
930 if (!ds || ds->destructive())
933 boost::shared_ptr<const Playlist> pl = ds->playlist();
940 name = Playlist::bump_name (name, _session);
941 } while (_session.playlist_by_name(name));
946 ArdourPrompter prompter (true);
948 prompter.set_prompt (_("Name for Playlist"));
949 prompter.set_initial_text (name);
950 prompter.add_button (Gtk::Stock::NEW, Gtk::RESPONSE_ACCEPT);
951 prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, true);
953 switch (prompter.run ()) {
954 case Gtk::RESPONSE_ACCEPT:
955 prompter.get_result (name);
964 ds->use_new_playlist ();
965 ds->playlist()->set_name (name);
970 RouteTimeAxisView::clear_playlist ()
972 boost::shared_ptr<Diskstream> ds = get_diskstream();
973 if (!ds || ds->destructive())
976 boost::shared_ptr<Playlist> pl = ds->playlist();
980 editor.clear_playlist (pl);
984 RouteTimeAxisView::speed_changed ()
986 Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &RouteTimeAxisView::reset_samples_per_unit));
990 RouteTimeAxisView::diskstream_changed ()
992 Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &RouteTimeAxisView::update_diskstream_display));
996 RouteTimeAxisView::update_diskstream_display ()
998 if (!get_diskstream()) // bus
1001 set_playlist (get_diskstream()->playlist());
1006 RouteTimeAxisView::selection_click (GdkEventButton* ev)
1008 if (Keyboard::modifier_state_equals (ev->state, (Keyboard::TertiaryModifier|Keyboard::PrimaryModifier))) {
1010 /* special case: select/deselect all tracks */
1011 if (editor.get_selection().selected (this)) {
1012 editor.get_selection().clear_tracks ();
1014 editor.select_all_tracks ();
1020 PublicEditor::TrackViewList* tracks = editor.get_valid_views (this, _route->edit_group());
1022 switch (Keyboard::selection_type (ev->state)) {
1023 case Selection::Toggle:
1024 editor.get_selection().toggle (*tracks);
1027 case Selection::Set:
1028 editor.get_selection().set (*tracks);
1031 case Selection::Extend:
1032 if (tracks->size() > 1) {
1033 /* add each one, do not "extend" */
1034 editor.get_selection().add (*tracks);
1036 /* extend to the single track */
1037 editor.extend_selection_to_track (*tracks->front());
1041 case Selection::Add:
1042 editor.get_selection().add (*tracks);
1050 RouteTimeAxisView::set_selected_points (PointSelection& points)
1052 for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
1053 (*i)->set_selected_points (points);
1058 RouteTimeAxisView::set_selected_regionviews (RegionSelection& regions)
1061 _view->set_selected_regionviews (regions);
1066 RouteTimeAxisView::get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable*>& results)
1070 if (get_diskstream() != 0) {
1071 speed = get_diskstream()->speed();
1074 nframes_t start_adjusted = session_frame_to_track_frame(start, speed);
1075 nframes_t end_adjusted = session_frame_to_track_frame(end, speed);
1077 if ((_view && ((top < 0.0 && bot < 0.0))) || touched (top, bot)) {
1078 _view->get_selectables (start_adjusted, end_adjusted, results);
1081 /* pick up visible automation tracks */
1083 for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
1084 if (!(*i)->hidden()) {
1085 (*i)->get_selectables (start_adjusted, end_adjusted, top, bot, results);
1091 RouteTimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
1094 _view->get_inverted_selectables (sel, results);
1097 for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
1098 if (!(*i)->hidden()) {
1099 (*i)->get_inverted_selectables (sel, results);
1107 RouteTimeAxisView::edit_group() const
1109 return _route->edit_group();
1113 RouteTimeAxisView::name() const
1115 return _route->name();
1118 boost::shared_ptr<Playlist>
1119 RouteTimeAxisView::playlist () const
1121 boost::shared_ptr<Diskstream> ds;
1123 if ((ds = get_diskstream()) != 0) {
1124 return ds->playlist();
1126 return boost::shared_ptr<Playlist> ();
1131 RouteTimeAxisView::name_entry_changed ()
1135 x = name_entry.get_text ();
1137 if (x == _route->name()) {
1141 strip_whitespace_edges(x);
1143 if (x.length() == 0) {
1144 name_entry.set_text (_route->name());
1148 if (_session.route_name_unique (x)) {
1149 _route->set_name (x, this);
1151 ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
1152 name_entry.set_text (_route->name());
1157 RouteTimeAxisView::visual_click ()
1159 popup_display_menu (0);
1163 RouteTimeAxisView::hide_click ()
1165 // LAME fix for hide_button refresh fix
1166 hide_button.set_sensitive(false);
1168 editor.hide_track_in_display (*this);
1170 hide_button.set_sensitive(true);
1173 boost::shared_ptr<Region>
1174 RouteTimeAxisView::find_next_region (nframes_t pos, RegionPoint point, int32_t dir)
1176 boost::shared_ptr<Diskstream> stream;
1177 boost::shared_ptr<Playlist> playlist;
1179 if ((stream = get_diskstream()) != 0 && (playlist = stream->playlist()) != 0) {
1180 return playlist->find_next_region (pos, point, dir);
1183 return boost::shared_ptr<Region> ();
1187 RouteTimeAxisView::find_next_region_boundary (nframes64_t pos, int32_t dir)
1189 boost::shared_ptr<Diskstream> stream;
1190 boost::shared_ptr<Playlist> playlist;
1192 if ((stream = get_diskstream()) != 0 && (playlist = stream->playlist()) != 0) {
1193 return playlist->find_next_region_boundary (pos, dir);
1200 RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
1202 boost::shared_ptr<Playlist> what_we_got;
1203 boost::shared_ptr<Diskstream> ds = get_diskstream();
1204 boost::shared_ptr<Playlist> playlist;
1208 /* route is a bus, not a track */
1212 playlist = ds->playlist();
1214 TimeSelection time (selection.time);
1215 float speed = ds->speed();
1216 if (speed != 1.0f) {
1217 for (TimeSelection::iterator i = time.begin(); i != time.end(); ++i) {
1218 (*i).start = session_frame_to_track_frame((*i).start, speed);
1219 (*i).end = session_frame_to_track_frame((*i).end, speed);
1223 XMLNode &before = playlist->get_state();
1226 if ((what_we_got = playlist->cut (time)) != 0) {
1227 editor.get_cut_buffer().add (what_we_got);
1228 _session.add_command( new MementoCommand<Playlist>(*playlist.get(), &before, &playlist->get_state()));
1233 if ((what_we_got = playlist->copy (time)) != 0) {
1234 editor.get_cut_buffer().add (what_we_got);
1239 if ((what_we_got = playlist->cut (time)) != 0) {
1240 _session.add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
1241 what_we_got->release ();
1251 RouteTimeAxisView::paste (nframes_t pos, float times, Selection& selection, size_t nth)
1257 boost::shared_ptr<Playlist> playlist = get_diskstream()->playlist();
1258 PlaylistSelection::iterator p;
1260 for (p = selection.playlists.begin(); p != selection.playlists.end() && nth; ++p, --nth);
1262 if (p == selection.playlists.end()) {
1266 if (get_diskstream()->speed() != 1.0f)
1267 pos = session_frame_to_track_frame(pos, get_diskstream()->speed() );
1269 XMLNode &before = playlist->get_state();
1270 playlist->paste (*p, pos, times);
1271 _session.add_command( new MementoCommand<Playlist>(*playlist, &before, &playlist->get_state()));
1278 RouteTimeAxisView::get_child_list()
1281 list<TimeAxisView*>redirect_children;
1283 for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
1284 if (!(*i)->hidden()) {
1285 redirect_children.push_back(*i);
1288 return redirect_children;
1293 RouteTimeAxisView::build_playlist_menu (Gtk::Menu * menu)
1295 using namespace Menu_Helpers;
1297 if (!menu || !is_track()) {
1301 MenuList& playlist_items = menu->items();
1302 menu->set_name ("ArdourContextMenu");
1303 playlist_items.clear();
1305 if (playlist_menu) {
1306 delete playlist_menu;
1309 playlist_menu = new Menu;
1310 playlist_menu->set_name ("ArdourContextMenu");
1312 vector<boost::shared_ptr<Playlist> > playlists;
1313 boost::shared_ptr<Diskstream> ds = get_diskstream();
1314 RadioMenuItem::Group playlist_group;
1316 _session.get_playlists (playlists);
1318 for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists.begin(); i != playlists.end(); ++i) {
1320 if ((*i)->get_orig_diskstream_id() == ds->id()) {
1321 playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name(), bind (mem_fun (*this, &RouteTimeAxisView::use_playlist),
1322 boost::weak_ptr<Playlist> (*i))));
1324 if (ds->playlist()->id() == (*i)->id()) {
1325 static_cast<RadioMenuItem*>(&playlist_items.back())->set_active();
1327 } else if (ds->playlist()->id() == (*i)->id()) {
1328 playlist_items.push_back (RadioMenuElem (playlist_group, (*i)->name(), bind (mem_fun (*this, &RouteTimeAxisView::use_playlist),
1329 boost::weak_ptr<Playlist>(*i))));
1330 static_cast<RadioMenuItem*>(&playlist_items.back())->set_active();
1335 playlist_items.push_back (SeparatorElem());
1336 playlist_items.push_back (MenuElem (_("Rename"), mem_fun(*this, &RouteTimeAxisView::rename_current_playlist)));
1337 playlist_items.push_back (SeparatorElem());
1339 playlist_items.push_back (MenuElem (_("New"), bind(mem_fun(editor, &PublicEditor::new_playlists), this)));
1340 playlist_items.push_back (MenuElem (_("New Copy"), bind(mem_fun(editor, &PublicEditor::copy_playlists), this)));
1341 playlist_items.push_back (SeparatorElem());
1342 playlist_items.push_back (MenuElem (_("Clear Current"), bind(mem_fun(editor, &PublicEditor::clear_playlists), this)));
1343 playlist_items.push_back (SeparatorElem());
1345 playlist_items.push_back (MenuElem(_("Select from all ..."), mem_fun(*this, &RouteTimeAxisView::show_playlist_selector)));
1349 RouteTimeAxisView::use_playlist (boost::weak_ptr<Playlist> wpl)
1351 assert (is_track());
1353 boost::shared_ptr<Playlist> pl (wpl.lock());
1359 boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl);
1362 get_diskstream()->use_playlist (apl);
1367 RouteTimeAxisView::show_playlist_selector ()
1369 editor.playlist_selector().show_for (this);
1373 RouteTimeAxisView::map_frozen ()
1379 ENSURE_GUI_THREAD (mem_fun(*this, &RouteTimeAxisView::map_frozen));
1381 switch (track()->freeze_state()) {
1383 playlist_button.set_sensitive (false);
1384 rec_enable_button->set_sensitive (false);
1387 playlist_button.set_sensitive (true);
1388 rec_enable_button->set_sensitive (true);
1394 RouteTimeAxisView::color_handler ()
1396 if (timestretch_rect) {
1397 timestretch_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchOutline.get();
1400 if (timestretch_rect) {
1401 timestretch_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeStretchFill.get();
1408 RouteTimeAxisView::show_all_automation ()
1412 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
1413 for (vector<RedirectAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
1414 if ((*ii)->view == 0) {
1415 add_redirect_automation_curve ((*i)->redirect, (*ii)->what);
1418 (*ii)->menu_item->set_active (true);
1424 _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
1428 RouteTimeAxisView::show_existing_automation ()
1432 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
1433 for (vector<RedirectAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
1434 if ((*ii)->view != 0) {
1435 (*ii)->menu_item->set_active (true);
1442 _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
1446 RouteTimeAxisView::hide_all_automation ()
1450 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
1451 for (vector<RedirectAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
1452 (*ii)->menu_item->set_active (false);
1457 _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
1462 RouteTimeAxisView::region_view_added (RegionView* rv)
1464 for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
1465 AutomationTimeAxisView* atv;
1467 if ((atv = dynamic_cast<AutomationTimeAxisView*> (*i)) != 0) {
1468 rv->add_ghost (*atv);
1474 RouteTimeAxisView::add_ghost_to_redirect (RegionView* rv, AutomationTimeAxisView* atv)
1476 rv->add_ghost (*atv);
1479 RouteTimeAxisView::RedirectAutomationInfo::~RedirectAutomationInfo ()
1481 for (vector<RedirectAutomationNode*>::iterator i = lines.begin(); i != lines.end(); ++i) {
1487 RouteTimeAxisView::RedirectAutomationNode::~RedirectAutomationNode ()
1489 parent.remove_ran (this);
1497 RouteTimeAxisView::remove_ran (RedirectAutomationNode* ran)
1500 remove_child (ran->view);
1504 RouteTimeAxisView::RedirectAutomationNode*
1505 RouteTimeAxisView::find_redirect_automation_node (boost::shared_ptr<Redirect> redirect, uint32_t what)
1507 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
1509 if ((*i)->redirect == redirect) {
1511 for (vector<RedirectAutomationNode*>::iterator ii = (*i)->lines.begin(); ii != (*i)->lines.end(); ++ii) {
1512 if ((*ii)->what == what) {
1522 // FIXME: duplicated in midi_time_axis.cc
1524 legalize_for_xml_node (string str)
1526 string::size_type pos;
1527 string legal_chars = "abcdefghijklmnopqrtsuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=:";
1533 while ((pos = legal.find_first_not_of (legal_chars, pos)) != string::npos) {
1534 legal.replace (pos, 1, "_");
1543 RouteTimeAxisView::add_redirect_automation_curve (boost::shared_ptr<Redirect> redirect, uint32_t what)
1545 RedirectAutomationLine* ral;
1547 RedirectAutomationNode* ran;
1549 if ((ran = find_redirect_automation_node (redirect, what)) == 0) {
1550 fatal << _("programming error: ")
1551 << string_compose (X_("redirect automation curve for %1:%2 not registered with audio track!"),
1552 redirect->name(), what)
1562 name = redirect->describe_parameter (what);
1564 /* create a string that is a legal XML node name that can be used to refer to this redirect+port combination */
1566 char state_name[256];
1567 snprintf (state_name, sizeof (state_name), "Redirect-%s-%" PRIu32, legalize_for_xml_node (redirect->name()).c_str(), what);
1569 ran->view = new RedirectAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, name, what, *redirect, state_name);
1571 ral = new RedirectAutomationLine (name,
1572 *redirect, what, _session, *ran->view,
1573 *ran->view->canvas_display, redirect->automation_list (what));
1575 ral->set_line_color (ARDOUR_UI::config()->canvasvar_RedirectAutomationLine.get());
1576 ral->queue_reset ();
1578 ran->view->add_line (*ral);
1580 ran->view->Hiding.connect (bind (mem_fun(*this, &RouteTimeAxisView::redirect_automation_track_hidden), ran, redirect));
1582 if (!ran->view->marked_for_display()) {
1585 ran->menu_item->set_active (true);
1588 add_child (ran->view);
1591 _view->foreach_regionview (bind (mem_fun(*this, &RouteTimeAxisView::add_ghost_to_redirect), ran->view));
1594 redirect->mark_automation_visible (what, true);
1598 RouteTimeAxisView::redirect_automation_track_hidden (RouteTimeAxisView::RedirectAutomationNode* ran, boost::shared_ptr<Redirect> r)
1601 ran->menu_item->set_active (false);
1604 r->mark_automation_visible (ran->what, false);
1606 _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
1610 RouteTimeAxisView::add_existing_redirect_automation_curves (boost::shared_ptr<Redirect> redirect)
1613 RedirectAutomationLine *ral;
1615 redirect->what_has_visible_automation (s);
1617 for (set<uint32_t>::iterator i = s.begin(); i != s.end(); ++i) {
1619 if ((ral = find_redirect_automation_curve (redirect, *i)) != 0) {
1620 ral->queue_reset ();
1622 add_redirect_automation_curve (redirect, (*i));
1628 RouteTimeAxisView::add_redirect_to_subplugin_menu (boost::shared_ptr<Redirect> r)
1630 using namespace Menu_Helpers;
1631 RedirectAutomationInfo *rai;
1632 list<RedirectAutomationInfo*>::iterator x;
1634 const std::set<uint32_t>& automatable = r->what_can_be_automated ();
1635 std::set<uint32_t> has_visible_automation;
1637 r->what_has_visible_automation(has_visible_automation);
1639 if (automatable.empty()) {
1643 for (x = redirect_automation.begin(); x != redirect_automation.end(); ++x) {
1644 if ((*x)->redirect == r) {
1649 if (x == redirect_automation.end()) {
1651 rai = new RedirectAutomationInfo (r);
1652 redirect_automation.push_back (rai);
1660 /* any older menu was deleted at the top of redirects_changed()
1661 when we cleared the subplugin menu.
1664 rai->menu = manage (new Menu);
1665 MenuList& items = rai->menu->items();
1666 rai->menu->set_name ("ArdourContextMenu");
1670 for (std::set<uint32_t>::const_iterator i = automatable.begin(); i != automatable.end(); ++i) {
1672 RedirectAutomationNode* ran;
1673 CheckMenuItem* mitem;
1675 string name = r->describe_parameter (*i);
1677 items.push_back (CheckMenuElem (name));
1678 mitem = dynamic_cast<CheckMenuItem*> (&items.back());
1680 if (has_visible_automation.find((*i)) != has_visible_automation.end()) {
1681 mitem->set_active(true);
1684 if ((ran = find_redirect_automation_node (r, *i)) == 0) {
1688 ran = new RedirectAutomationNode (*i, mitem, *this);
1690 rai->lines.push_back (ran);
1694 ran->menu_item = mitem;
1698 mitem->signal_toggled().connect (bind (mem_fun(*this, &RouteTimeAxisView::redirect_menu_item_toggled), rai, ran));
1701 /* add the menu for this redirect, because the subplugin
1702 menu is always cleared at the top of redirects_changed().
1703 this is the result of some poor design in gtkmm and/or
1707 subplugin_menu.items().push_back (MenuElem (r->name(), *rai->menu));
1712 RouteTimeAxisView::redirect_menu_item_toggled (RouteTimeAxisView::RedirectAutomationInfo* rai,
1713 RouteTimeAxisView::RedirectAutomationNode* ran)
1715 bool showit = ran->menu_item->get_active();
1716 bool redraw = false;
1718 if (ran->view == 0 && showit) {
1719 add_redirect_automation_curve (rai->redirect, ran->what);
1723 if (showit != ran->view->marked_for_display()) {
1726 ran->view->set_marked_for_display (true);
1727 ran->view->canvas_display->show();
1729 rai->redirect->mark_automation_visible (ran->what, true);
1730 ran->view->set_marked_for_display (false);
1738 if (redraw && !no_redraw) {
1740 /* now trigger a redisplay */
1742 _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
1748 RouteTimeAxisView::redirects_changed (void *src)
1750 using namespace Menu_Helpers;
1752 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ++i) {
1753 (*i)->valid = false;
1756 subplugin_menu.items().clear ();
1758 _route->foreach_redirect (this, &RouteTimeAxisView::add_redirect_to_subplugin_menu);
1759 _route->foreach_redirect (this, &RouteTimeAxisView::add_existing_redirect_automation_curves);
1761 for (list<RedirectAutomationInfo*>::iterator i = redirect_automation.begin(); i != redirect_automation.end(); ) {
1763 list<RedirectAutomationInfo*>::iterator tmp;
1771 redirect_automation.erase (i);
1778 /* change in visibility was possible */
1780 _route->gui_changed ("visible_tracks", this);
1783 RedirectAutomationLine *
1784 RouteTimeAxisView::find_redirect_automation_curve (boost::shared_ptr<Redirect> redirect, uint32_t what)
1786 RedirectAutomationNode* ran;
1788 if ((ran = find_redirect_automation_node (redirect, what)) != 0) {
1790 return dynamic_cast<RedirectAutomationLine*> (ran->view->lines.front());
1798 RouteTimeAxisView::reset_redirect_automation_curves ()
1800 for (vector<RedirectAutomationLine*>::iterator i = redirect_automation_curves.begin(); i != redirect_automation_curves.end(); ++i) {
1806 RouteTimeAxisView::update_rec_display ()
1808 RouteUI::update_rec_display ();
1809 name_entry.set_sensitive (!_route->record_enabled());
1813 RouteTimeAxisView::fast_update ()
1815 gm.get_level_meter().update_meters ();
1819 RouteTimeAxisView::hide_meter ()
1822 gm.get_level_meter().hide_meters ();
1826 RouteTimeAxisView::show_meter ()
1832 RouteTimeAxisView::reset_meter ()
1834 if (Config->get_show_track_meters()) {
1835 gm.get_level_meter().setup_meters (height-5);
1842 RouteTimeAxisView::clear_meter ()
1844 gm.get_level_meter().clear_meters ();
1848 RouteTimeAxisView::meter_changed (void *src)
1850 ENSURE_GUI_THREAD (bind (mem_fun(*this, &RouteTimeAxisView::meter_changed), src));
1855 RouteTimeAxisView::io_changed (IOChange change, void *src)