X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fghostregion.h;h=aa4ec8b2f32b8cfd944cdb186a66070da00ef8ab;hb=66e580d683a1bd7e63ee159f40e8e16a4fc0bf7f;hp=a46ab8fe111825ecc656312b160935aafc4fd4ea;hpb=c876aea64dc57f59937f8bb2337f6ffc19b98c0d;p=ardour.git diff --git a/gtk2_ardour/ghostregion.h b/gtk2_ardour/ghostregion.h index a46ab8fe11..aa4ec8b2f3 100644 --- a/gtk2_ardour/ghostregion.h +++ b/gtk2_ardour/ghostregion.h @@ -21,6 +21,7 @@ #define __ardour_gtk_ghost_region_h__ #include +#include #include "pbd/signals.h" namespace ArdourCanvas { @@ -86,6 +87,7 @@ public: NoteBase* event; ArdourCanvas::Item* item; + bool is_hit; }; MidiGhostRegion(RegionView& rv, @@ -106,21 +108,25 @@ public: void set_samples_per_pixel (double spu); void set_colors(); - void update_range(); + void update_contents_height(); void add_note(NoteBase*); - void update_note (Note*); - void update_hit (Hit*); + void update_note (Note* note, bool hide); + void update_hit (Hit* hit, bool hide); void remove_note (NoteBase*); void clear_events(); private: + ArdourCanvas::Container* _note_group; ArdourCanvas::Color _outline; + ArdourCanvas::Rectangle* _tmp_rect; + ArdourCanvas::Polygon* _tmp_poly; - MidiGhostRegion::GhostEvent* find_event (NoteBase*); + typedef Evoral::Note NoteType; + MidiGhostRegion::GhostEvent* find_event (boost::shared_ptr); - typedef std::list EventList; + typedef boost::unordered_map, MidiGhostRegion::GhostEvent* > EventList; EventList events; EventList::iterator _optimization_iterator; };