Ardour  9.5-48-g5dddcbb6a8
midi_selection.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2014 David Robillard <d@drobilla.net>
3  * Copyright (C) 2009 Paul Davis <paul@linuxaudiosystems.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #pragma once
21 
22 #include <set>
23 
24 #include "region_selection.h"
25 
26 class MidiRegionView;
27 class MidiCutBuffer;
28 class RegionView;
29 
31 {
32 public:
35 
37 };
38 
39 struct MidiNoteSelection : std::list<MidiCutBuffer*> {
40 public:
41  const_iterator
42  get_nth(size_t nth) const {
43  size_t count = 0;
44  for (const_iterator m = begin(); m != end(); ++m) {
45  if (count++ == nth) {
46  return m;
47  }
48  }
49  return end();
50  }
51 };
52 
53 class NoteBase;
54 
55 typedef std::set<NoteBase*> SimpleMidiNoteSelection;
MidiRegionSelection(const MidiRegionSelection &)
MidiRegionSelection & operator=(const MidiRegionSelection &)
std::set< NoteBase * > SimpleMidiNoteSelection
const_iterator get_nth(size_t nth) const