2 Copyright (C) 2000-2007 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.
20 #include <ardour/location.h>
21 #include <ardour/audio_diskstream.h>
25 #include "audio_time_axis.h"
26 #include "audio_region_view.h"
27 #include "selection.h"
31 using namespace ARDOUR;
35 Editor::set_loop_from_selection (bool play)
37 if (session == 0 || selection->time.empty()) {
41 nframes_t start = selection->time[clicked_selection].start;
42 nframes_t end = selection->time[clicked_selection].end;
44 set_loop_range (start, end, _("set loop range from selection"));
47 session->request_play_loop (true);
48 session->request_locate (start, true);
53 Editor::set_punch_from_selection ()
55 if (session == 0 || selection->time.empty()) {
59 nframes_t start = selection->time[clicked_selection].start;
60 nframes_t end = selection->time[clicked_selection].end;
62 set_punch_range (start, end, _("set punch range from selection"));
66 Editor::set_show_waveforms (bool yn)
68 AudioTimeAxisView* atv;
70 if (_show_waveforms != yn) {
72 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
73 if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
74 atv->set_show_waveforms (yn);
81 Editor::set_show_waveforms_recording (bool yn)
83 AudioTimeAxisView* atv;
85 if (_show_waveforms_recording != yn) {
86 _show_waveforms_recording = yn;
87 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
88 if ((atv = dynamic_cast<AudioTimeAxisView*>(*i)) != 0) {
89 atv->set_show_waveforms_recording (yn);