X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fghostregion.h;h=2ebd33e64e4f433503de90214c127767e910e825;hb=b15e1cba3b11f73f3155c5dbd8a162c2512f5641;hp=8b9f0d10931073d905569f2795c4c90cfc1f48ee;hpb=402cc384ced6cb152c8abe4294009fe0de0a6dea;p=ardour.git diff --git a/gtk2_ardour/ghostregion.h b/gtk2_ardour/ghostregion.h index 8b9f0d1093..2ebd33e64e 100644 --- a/gtk2_ardour/ghostregion.h +++ b/gtk2_ardour/ghostregion.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Paul Davis + Copyright (C) 2004 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,8 @@ #define __ardour_gtk_ghost_region_h__ #include -#include #include +#include "pbd/signals.h" #include "canvas.h" namespace Gnome { @@ -37,7 +37,7 @@ namespace Gnome { class MidiStreamView; class TimeAxisView; -class GhostRegion : public sigc::trackable +class GhostRegion { public: GhostRegion(ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos); @@ -52,12 +52,14 @@ public: guint source_track_color(unsigned char alpha = 0xff); bool is_automation_ghost(); - sigc::signal GoingAway; - + /** TimeAxisView that is the AutomationTimeAxisView that we are on */ TimeAxisView& trackview; + /** TimeAxisView that we are a ghost for */ TimeAxisView& source_trackview; ArdourCanvas::Group* group; ArdourCanvas::SimpleRect* base_rect; + + static PBD::Signal1 CatchDeletion; }; class AudioGhostRegion : public GhostRegion { @@ -78,7 +80,6 @@ public: Event(ArdourCanvas::CanvasNoteEvent*); virtual ~Event() {} - virtual void x_changed() = 0; ArdourCanvas::CanvasNoteEvent* event; }; @@ -87,19 +88,9 @@ public: Note(ArdourCanvas::CanvasNote*, ArdourCanvas::Group*); ~Note(); - void x_changed(); ArdourCanvas::SimpleRect* rect; }; - class Hit : public Event { - public: - Hit(ArdourCanvas::CanvasHit*, ArdourCanvas::Group*); - ~Hit(); - - void x_changed(); - ArdourCanvas::Diamond* diamond; - }; - MidiGhostRegion(TimeAxisView& tv, TimeAxisView& source_tv, double initial_unit_pos); MidiGhostRegion(MidiStreamView& msv, TimeAxisView& source_tv, double initial_unit_pos); ~MidiGhostRegion(); @@ -113,12 +104,17 @@ public: void update_range(); void add_note(ArdourCanvas::CanvasNote*); - void add_hit(ArdourCanvas::CanvasHit*); + void update_note (ArdourCanvas::CanvasNote *); void clear_events(); +private: + + MidiGhostRegion::Event* find_event (ArdourCanvas::CanvasNote *); + typedef std::list EventList; EventList events; + EventList::iterator _optimization_iterator; }; #endif /* __ardour_gtk_ghost_region_h__ */