X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Faudio_time_axis.cc;h=72af2f846cec8282b9250e82bc5b995c3f4015ac;hb=ea1740d65f5f95c6fb6bd5a8700a00ef7a6e1b9d;hp=60bcf8d6af3f753d329005c0875324e9b85d5208;hpb=0f72ea4a349480cf1272571395f63c10b6152b4f;p=ardour.git diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 60bcf8d6af..72af2f846c 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -31,18 +31,16 @@ #include "pbd/stl_delete.h" #include "pbd/memento_command.h" -#include -#include -#include -#include +#include "gtkmm2ext/gtk_ui.h" +#include "gtkmm2ext/utils.h" + +#include "widgets/ardour_button.h" #include "ardour/event_type_map.h" #include "ardour/pannable.h" #include "ardour/panner.h" #include "ardour/panner_shell.h" -#include "ardour_button.h" -#include "ardour_ui.h" #include "audio_time_axis.h" #include "automation_line.h" #include "enums.h" @@ -50,23 +48,23 @@ #include "automation_time_axis.h" #include "keyboard.h" #include "playlist_selector.h" -#include "prompter.h" #include "public_editor.h" #include "audio_region_view.h" #include "audio_streamview.h" #include "utils.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; +using namespace ArdourWidgets; using namespace ARDOUR_UI_UTILS; using namespace PBD; using namespace Gtk; using namespace Editing; AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanvas::Canvas& canvas) - : AxisView(sess) + : SessionHandlePtr (sess) , RouteTimeAxisView(ed, sess, canvas) { } @@ -106,6 +104,10 @@ AudioTimeAxisView::set_route (boost::shared_ptr rt) create_automation_child (GainAutomation, false); } + if (automation_child (TrimAutomation) == 0) { + create_automation_child (TrimAutomation, false); + } + /* if set_state above didn't create a mute automation child, we need to make one */ if (automation_child (MuteAutomation) == 0) { create_automation_child (MuteAutomation, false); @@ -113,7 +115,7 @@ AudioTimeAxisView::set_route (boost::shared_ptr rt) if (_route->panner_shell()) { _route->panner_shell()->Changed.connect (*this, invalidator (*this), - boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context()); + boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false), gui_context()); } /* map current state of the route */ @@ -180,14 +182,14 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool AutomationTracks::iterator existing = _automation_tracks.find (param); if (existing != _automation_tracks.end()) { - + /* automation track created because we had existing data for * the processor, but visibility may need to be controlled * since it will have been set visible by default. */ existing->second->set_marked_for_display (show); - + if (!no_redraw) { request_redraw (); } @@ -199,9 +201,13 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool create_gain_automation_child (param, show); + } else if (param.type() == TrimAutomation) { + + create_trim_automation_child (param, show); + } else if (param.type() == PanWidthAutomation || - param.type() == PanElevationAutomation || - param.type() == PanAzimuthAutomation) { + param.type() == PanElevationAutomation || + param.type() == PanAzimuthAutomation) { ensure_pan_views (show); @@ -212,7 +218,7 @@ AudioTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool } else if (param.type() == MuteAutomation) { create_mute_automation_child (param, show); - + } else { error << "AudioTimeAxisView: unknown automation child " << EventTypeMap::instance().to_symbol(param) << endmsg; @@ -300,7 +306,7 @@ AudioTimeAxisView::update_control_names () } } - if (get_selected()) { + if (selected()) { controls_ebox.set_name (controls_base_selected_name); time_axis_frame.set_name (controls_base_selected_name); } else { @@ -314,19 +320,3 @@ AudioTimeAxisView::build_automation_action_menu (bool for_selection) { RouteTimeAxisView::build_automation_action_menu (for_selection); } - -void -AudioTimeAxisView::enter_internal_edit_mode () -{ - if (audio_view()) { - audio_view()->enter_internal_edit_mode (); - } -} - -void -AudioTimeAxisView::leave_internal_edit_mode () -{ - if (audio_view()) { - audio_view()->leave_internal_edit_mode (); - } -}