X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fnote.cc;h=ea12712e4a313e55fe408e8c5ebdf0ebca65c5c1;hb=eeb20bc392c1aae0545010c6fcf2c7096bb9c650;hp=23358130a0dc61a03ebcf144221ac66b685488b1;hpb=6ae4f104371ed433a79c8845de97428d964edd8b;p=ardour.git diff --git a/gtk2_ardour/note.cc b/gtk2_ardour/note.cc index 23358130a0..ea12712e4a 100644 --- a/gtk2_ardour/note.cc +++ b/gtk2_ardour/note.cc @@ -19,24 +19,22 @@ */ #include "evoral/Note.hpp" + #include "canvas/rectangle.h" +#include "canvas/debug.h" + #include "note.h" -#include "midi_region_view.h" #include "public_editor.h" using namespace ARDOUR; using namespace ArdourCanvas; Note::Note ( - MidiRegionView& region, - Group* group, - const boost::shared_ptr note, - bool with_events - ) + MidiRegionView& region, Item* parent, const boost::shared_ptr note, bool with_events) : NoteBase (region, with_events, note) + , _rectangle (new ArdourCanvas::Rectangle (parent)) { - _rectangle = new Rectangle (group); - _rectangle->name = "note"; + CANVAS_DEBUG_NAME (_rectangle, "note"); set_item (_rectangle); } @@ -48,15 +46,7 @@ Note::~Note () void Note::move_event (double dx, double dy) { - _rectangle->move (Duple (dx, dy)); - - /* XXX */ - // if (_text) { - // _text->hide(); - // _text->property_x() = _text->property_x() + dx; - // _text->property_y() = _text->property_y() + dy; - // _text->show(); - // } + _rectangle->set (_rectangle->get().translate (Duple (dx, dy))); } Coord @@ -132,11 +122,17 @@ Note::set_y1 (Coord y1) } void -Note::set_outline_what (int what) +Note::set_outline_what (ArdourCanvas::Rectangle::What what) { _rectangle->set_outline_what (what); } +void +Note::set_outline_all () +{ + _rectangle->set_outline_all (); +} + void Note::set_ignore_events (bool ignore) {