X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcanvas-note.h;h=49a37c17c9a4e6cc988eb5109fe0c3534f4bf41f;hb=b15e1cba3b11f73f3155c5dbd8a162c2512f5641;hp=cd3c1669515dcee1e59476f555b746678f61dbfe;hpb=1bf79fa88502a156a71cd3d2de35aa234950c40c;p=ardour.git diff --git a/gtk2_ardour/canvas-note.h b/gtk2_ardour/canvas-note.h index cd3c166951..49a37c17c9 100644 --- a/gtk2_ardour/canvas-note.h +++ b/gtk2_ardour/canvas-note.h @@ -29,10 +29,16 @@ namespace Gnome { namespace Canvas { -class CanvasNote : public SimpleRect, public CanvasNoteEvent { -public: +class CanvasNote : public SimpleRect, public CanvasNoteEvent +{ + public: typedef Evoral::Note NoteType; + CanvasNote (MidiRegionView& region, + Group& group, + const boost::shared_ptr note = boost::shared_ptr(), + bool with_events = true); + double x1() { return property_x1(); } double y1() { return property_y1(); } double x2() { return property_x2(); } @@ -45,12 +51,20 @@ public: void hide() { SimpleRect::hide(); } bool on_event(GdkEvent* ev); + void move_event(double dx, double dy); +}; - CanvasNote (MidiRegionView& region, - Group& group, - const boost::shared_ptr note = boost::shared_ptr()) - : SimpleRect(group), CanvasNoteEvent(region, this, note) - { +class NoEventCanvasNote : public CanvasNote +{ + public: + NoEventCanvasNote (MidiRegionView& region, + Group& group, + const boost::shared_ptr note = boost::shared_ptr()) + : CanvasNote (region, group, note, false) {} + + double point_vfunc(double, double, int, int, GnomeCanvasItem**) { + /* return a huge value to tell the canvas that we're never the item for an event */ + return 9999999999999.0; } };