X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fcanvas-note-event.h;h=305988667dc3e11514b4f353bcd7ab03514cf054;hb=4f3bddf7ef163c3106ba973123cbc657ebaf4b74;hp=060e4d9fa9627f5f8dea3d22b20e796476facf31;hpb=166395c96b8a85d90b9785e629c739494494130f;p=ardour.git diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h index 060e4d9fa9..305988667d 100644 --- a/gtk2_ardour/canvas-note-event.h +++ b/gtk2_ardour/canvas-note-event.h @@ -24,6 +24,8 @@ #include #include +#include "ardour/midi_model.h" + #include "rgb_macros.h" #include "ardour_ui.h" #include "ui_config.h" @@ -49,9 +51,10 @@ namespace Canvas { * * A newer, better canvas should remove the need for all the ugly here. */ -class CanvasNoteEvent : public sigc::trackable, public InteractiveItem { +class CanvasNoteEvent : virtual public sigc::trackable, public InteractiveItem { public: - typedef Evoral::Note NoteType; + typedef Evoral::Note NoteType; + CanvasNoteEvent( MidiRegionView& region, Item* item, @@ -92,8 +95,7 @@ public: const boost::shared_ptr note() const { return _note; } - inline static uint32_t meter_style_fill_color(uint8_t vel) - { + inline static uint32_t meter_style_fill_color(uint8_t vel) { if (vel < 64) { return UINT_INTERPOLATE( ARDOUR_UI::config()->canvasvar_MidiNoteMeterColorBase.get(), @@ -108,8 +110,7 @@ public: } /// calculate outline colors from fill colors of notes - inline static uint32_t calculate_outline(uint32_t color) - { + inline static uint32_t calculate_outline(uint32_t color) { return UINT_INTERPOLATE(color, 0x000000ff, 0.5); }