insufficient attempt to drop references to a shadow MIDI port
[ardour.git] / gtk2_ardour / midi_selection.h
index bd6851870e14166808911eac22f3bf452eb75cba..6ee26e4487c549cf118a669019fe9b9b7122674d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2009 Paul Davis 
+    Copyright (C) 2009 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #ifndef __ardour_gtk_midi_selection_h__
 #define __ardour_gtk_midi_selection_h__
 
-#include <list>
+#include "region_selection.h"
 
 class MidiRegionView;
 class MidiCutBuffer;
-
-struct MidiRegionSelection : std::list<MidiRegionView*> {};
-struct MidiNoteSelection   : std::list<MidiCutBuffer*> {};
+class RegionView;
+
+class MidiRegionSelection : public RegionSelection
+{
+public:
+       MidiRegionSelection ();
+       MidiRegionSelection (const MidiRegionSelection&);
+
+       MidiRegionSelection& operator= (const MidiRegionSelection&);
+};
+
+struct MidiNoteSelection : std::list<MidiCutBuffer*> {
+public:
+       const_iterator
+       get_nth(size_t nth) const {
+               size_t count = 0;
+               for (const_iterator m = begin(); m != end(); ++m) {
+                       if (count++ == nth) {
+                               return m;
+                       }
+               }
+               return end();
+       }
+};
 
 #endif /* __ardour_gtk_midi_selection_h__ */