diff options
author | David Robillard <d@drobilla.net> | 2007-08-01 21:59:07 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-08-01 21:59:07 +0000 |
commit | 4d1542d1e59737fb3f6464ebb5638ca64cb985e8 (patch) | |
tree | 1a72d1deecab5ce7a443c7324122b8251a991f71 /gtk2_ardour/canvas-midi-event.h | |
parent | d7db3f757fde92126ef9886370ce604992b7e974 (diff) |
Note deleting.
Press delete on a single note to delete it.
Hold delete and mouse over a number of notes to delete them all in a single operation.
git-svn-id: svn://localhost/ardour2/trunk@2214 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-midi-event.h')
-rw-r--r-- | gtk2_ardour/canvas-midi-event.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/canvas-midi-event.h b/gtk2_ardour/canvas-midi-event.h index bd98e82efd..def2203f5c 100644 --- a/gtk2_ardour/canvas-midi-event.h +++ b/gtk2_ardour/canvas-midi-event.h @@ -21,6 +21,7 @@ #define __gtk_ardour_canvas_midi_event_h__ #include "simplerect.h" +#include <ardour/midi_model.h> class Editor; class MidiRegionView; @@ -40,17 +41,22 @@ namespace Canvas { */ class CanvasMidiEvent { public: - CanvasMidiEvent(MidiRegionView& region, Item* item); + CanvasMidiEvent(MidiRegionView& region, Item* item, const ARDOUR::MidiModel::Note* note = NULL); virtual ~CanvasMidiEvent() {} virtual bool on_event(GdkEvent* ev); + virtual void selected(bool yn) = 0; + + const ARDOUR::MidiModel::Note* note() { return _note; } + private: enum State { None, Pressed, Dragging }; - MidiRegionView& _region; - Item* const _item; - State _state; + MidiRegionView& _region; + Item* const _item; + State _state; + const ARDOUR::MidiModel::Note* _note; }; } // namespace Gnome |