1 #include "canvas-note.h"
2 #include "midi_region_view.h"
3 #include "public_editor.h"
4 #include "evoral/Note.hpp"
6 using namespace ARDOUR;
11 CanvasNote::CanvasNote (MidiRegionView& region,
13 const boost::shared_ptr<NoteType> note,
15 : SimpleRect(group), CanvasNoteEvent(region, this, note)
18 signal_event().connect (sigc::mem_fun (*this, &CanvasNote::on_event));
23 CanvasNote::on_event(GdkEvent* ev)
25 if (!CanvasNoteEvent::on_event (ev)) {
26 return _region.get_time_axis_view().editor().canvas_note_event (ev, this);
33 CanvasNote::move_event(double dx, double dy)
35 property_x1() = property_x1() + dx;
36 property_y1() = property_y1() + dy;
37 property_x2() = property_x2() + dx;
38 property_y2() = property_y2() + dy;
42 _text->property_x() = _text->property_x() + dx;
43 _text->property_y() = _text->property_y() + dy;