diff options
author | David Robillard <d@drobilla.net> | 2007-08-05 00:33:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-05 00:33:14 +0000 |
commit | c0e916d4dacf544e06317862ebca5d3707f6d269 (patch) | |
tree | 268ffa15285f2534c141035ba92c2c480e8428db /gtk2_ardour/midi_region_view.h | |
parent | c1b73d4a41390baed56b4af352f427fde7a2826b (diff) |
Note selection via clicking (including multi-note selection via ctrl/shift clicking).
git-svn-id: svn://localhost/ardour2/trunk@2245 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r-- | gtk2_ardour/midi_region_view.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index b54707a081..fd341ffe55 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -132,6 +132,11 @@ class MidiRegionView : public RegionView _command_mode = None; } + void unique_select(ArdourCanvas::CanvasMidiEvent* ev); + void note_selected(ArdourCanvas::CanvasMidiEvent* ev, bool add); + void note_deselected(ArdourCanvas::CanvasMidiEvent* ev, bool add); + size_t selection_size() { return _selection.size(); } + protected: /* this constructor allows derived types @@ -160,6 +165,8 @@ class MidiRegionView : public RegionView bool canvas_event(GdkEvent* ev); bool note_canvas_event(GdkEvent* ev); + + void clear_selection_except(ArdourCanvas::CanvasMidiEvent* ev); double _default_note_length; @@ -167,10 +174,12 @@ class MidiRegionView : public RegionView std::vector<ArdourCanvas::Item*> _events; ArdourCanvas::CanvasNote** _active_notes; ARDOUR::MidiModel::DeltaCommand* _delta_command; + + typedef std::set<ArdourCanvas::CanvasMidiEvent*> Selection; + Selection _selection; enum CommandMode { None, Remove, Delta }; CommandMode _command_mode; - }; #endif /* __gtk_ardour_midi_region_view_h__ */ |