2 * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
4 * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __ardour_gtk_track_selection_h__
22 #define __ardour_gtk_track_selection_h__
24 #include "track_view_list.h"
26 #include "audio_time_axis.h"
27 #include "midi_time_axis.h"
31 class TrackSelection : public TrackViewList
34 TrackSelection (PublicEditor const * e) : _editor (e) {}
35 TrackSelection (PublicEditor const *, TrackViewList const &);
37 virtual ~TrackSelection ();
39 template <typename Function>
40 void foreach_time_axis (Function f) {
41 for (iterator i = begin(); i != end(); ++i) {
46 template <typename Function>
47 void foreach_route_ui (Function f) {
48 for (iterator i = begin(); i != end(); ) {
52 RouteUI* t = dynamic_cast<RouteUI*> (*i);
60 template <typename Function>
61 void foreach_route_time_axis (Function f) {
62 for (iterator i = begin(); i != end(); ) {
65 RouteTimeAxisView* t = dynamic_cast<RouteTimeAxisView*> (*i);
73 template <typename Function>
74 void foreach_audio_time_axis (Function f) {
75 for (iterator i = begin(); i != end(); ) {
78 AudioTimeAxisView* t = dynamic_cast<AudioTimeAxisView*> (*i);
86 template <typename Function>
87 void foreach_midi_time_axis (Function f) {
88 for (iterator i = begin(); i != end(); ) {
91 MidiTimeAxisView* t = dynamic_cast<MidiTimeAxisView*> (*i);
100 PublicEditor const * _editor;
103 #endif /* __ardour_gtk_track_selection_h__ */