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)
27 if (!CanvasNoteEvent::on_event (ev)) {
28 r = _region.get_time_axis_view().editor().canvas_note_event (ev, this);
31 if (ev->type == GDK_BUTTON_RELEASE) {
32 _region.note_button_release ();
39 CanvasNote::move_event(double dx, double dy)
41 property_x1() = property_x1() + dx;
42 property_y1() = property_y1() + dy;
43 property_x2() = property_x2() + dx;
44 property_y2() = property_y2() + dy;
48 _text->property_x() = _text->property_x() + dx;
49 _text->property_y() = _text->property_y() + dy;