Fix Pane size allocation:
[ardour.git] / gtk2_ardour / ghostregion.h
index f4848fd3ccd2f659e2d7d7e18ff83e80b109d751..aa4ec8b2f32b8cfd944cdb186a66070da00ef8ab 100644 (file)
@@ -21,6 +21,7 @@
 #define __ardour_gtk_ghost_region_h__
 
 #include <vector>
+#include <boost/unordered_map.hpp>
 #include "pbd/signals.h"
 
 namespace ArdourCanvas {
@@ -86,6 +87,7 @@ public:
 
            NoteBase* event;
            ArdourCanvas::Item* item;
+           bool is_hit;
        };
 
        MidiGhostRegion(RegionView& rv,
@@ -106,25 +108,25 @@ public:
        void set_samples_per_pixel (double spu);
        void set_colors();
 
-       void update_range();
-       void set_contents_height();
+       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<Evoral::Beats> NoteType;
+       MidiGhostRegion::GhostEvent* find_event (boost::shared_ptr<NoteType>);
 
-       typedef std::map<boost::shared_ptr<NoteType>, MidiGhostRegion::GhostEvent* > EventList;
+       typedef boost::unordered_map<boost::shared_ptr<NoteType>, MidiGhostRegion::GhostEvent* > EventList;
        EventList events;
        EventList::iterator _optimization_iterator;
 };