*/
#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<NoteType> note,
- bool with_events
- )
+ MidiRegionView& region, Item* parent, const boost::shared_ptr<NoteType> note, bool with_events)
: NoteBase (region, with_events, note)
+ , _rectangle (new ArdourCanvas::Rectangle (parent))
{
- _rectangle = new ArdourCanvas::Rectangle (group);
- _rectangle->name = "note";
+ CANVAS_DEBUG_NAME (_rectangle, "note");
set_item (_rectangle);
}
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
_rectangle->hide ();
}
+void
+Note::set (ArdourCanvas::Rect rect)
+{
+ _rectangle->set (rect);
+}
+
void
Note::set_x0 (Coord x0)
{
}
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)
{