2008-03-14 20:47:30 -04:00
|
|
|
#include "canvas-note.h"
|
|
|
|
#include "midi_region_view.h"
|
|
|
|
#include "public_editor.h"
|
2008-09-18 20:47:49 -04:00
|
|
|
#include "evoral/Note.hpp"
|
2008-03-14 20:47:30 -04:00
|
|
|
|
|
|
|
using namespace ARDOUR;
|
|
|
|
|
|
|
|
namespace Gnome {
|
|
|
|
namespace Canvas {
|
|
|
|
|
|
|
|
bool
|
|
|
|
CanvasNote::on_event(GdkEvent* ev)
|
|
|
|
{
|
2009-09-08 17:45:44 -04:00
|
|
|
if (!_region.get_trackview().editor().canvas_note_event (ev, this)) {
|
|
|
|
return CanvasNoteEvent::on_event (ev);
|
|
|
|
} else {
|
|
|
|
return true;
|
2008-03-14 20:47:30 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-06 18:07:10 -04:00
|
|
|
void
|
|
|
|
CanvasNote::move_event(double dx, double dy)
|
|
|
|
{
|
|
|
|
property_x1() = property_x1() + dx;
|
|
|
|
property_y1() = property_y1() + dy;
|
|
|
|
property_x2() = property_x2() + dx;
|
|
|
|
property_y2() = property_y2() + dy;
|
|
|
|
|
|
|
|
if (_text) {
|
|
|
|
_text->hide();
|
|
|
|
_text->property_x() = _text->property_x() + dx;
|
|
|
|
_text->property_y() = _text->property_y() + dy;
|
|
|
|
_text->show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-03-14 20:47:30 -04:00
|
|
|
} // namespace Gnome
|
|
|
|
} // namespace Canvas
|