Remove excess menu separator.
[ardour.git] / gtk2_ardour / canvas-note.h
index 30cbad6c25a9d0f0a6e9f6e7f356ba555d733ff0..cd3c1669515dcee1e59476f555b746678f61dbfe 100644 (file)
@@ -31,6 +31,8 @@ namespace Canvas {
 
 class CanvasNote : public SimpleRect, public CanvasNoteEvent {
 public:
+       typedef Evoral::Note<Evoral::MusicalTime> NoteType;
+
        double x1() { return property_x1(); }
        double y1() { return property_y1(); }
        double x2() { return property_x2(); }
@@ -39,33 +41,17 @@ public:
        void set_outline_color(uint32_t c) { property_outline_color_rgba() = c; hide(); show(); }
        void set_fill_color(uint32_t c)    { property_fill_color_rgba()    = c; hide(); show(); }
 
-       bool on_event(GdkEvent* ev);
-
-       enum NoteEnd {
-               NOTE_ON,
-               NOTE_OFF
-       };
-
-       enum NoteState {
-               None,
-               RelativeResize,
-               AbsoluteResize
-       };
+       void show() { SimpleRect::show(); }
+       void hide() { SimpleRect::hide(); }
 
-       CanvasNote(
-                       MidiRegionView&                       region,
-                       Group&                                group,
-                       const boost::shared_ptr<Evoral::Note> note = boost::shared_ptr<Evoral::Note>())
+       bool on_event(GdkEvent* ev);
 
-               : SimpleRect(group), CanvasNoteEvent(region, this, note), _note_state(None)
+       CanvasNote (MidiRegionView&                   region,
+                   Group&                            group,
+                   const boost::shared_ptr<NoteType> note = boost::shared_ptr<NoteType>())
+               : SimpleRect(group), CanvasNoteEvent(region, this, note)
        {
        }
-
-protected:
-       NoteState _note_state;
-
-private:
-
 };
 
 } // namespace Gnome