Reintroduce crossfade views for tracks in stacked region mode.
[ardour.git] / gtk2_ardour / crossfade_view.h
index 2294671de3dd743fb27b18bfa2a39808291020ed..2d9c5e4b2df4af623ea61246637dc3c68bbaaa52 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __gtk_ardour_crossfade_view_h__
 #include <vector>
 #include <libgnomecanvasmm.h>
 #include <sigc++/signal.h>
-#include <ardour/crossfade.h>
+#include "ardour/crossfade.h"
 
 #include "time_axis_view_item.h"
 
-class AudioTimeAxisView;
+class RouteTimeAxisView;
 class AudioRegionView;
 
 struct CrossfadeView : public TimeAxisViewItem
 {
     CrossfadeView (ArdourCanvas::Group*, 
-                  AudioTimeAxisView&,
-                  ARDOUR::Crossfade&,
+                  RouteTimeAxisView&,
+                  boost::shared_ptr<ARDOUR::Crossfade>,
                   double initial_samples_per_unit, 
                   Gdk::Color& basic_color,
                   AudioRegionView& leftview,
                   AudioRegionView& rightview);
     ~CrossfadeView ();
 
-    ARDOUR::Crossfade& crossfade;  // ok, let 'em have it
+    boost::shared_ptr<ARDOUR::Crossfade> crossfade;  // ok, let 'em have it
+
     AudioRegionView& left_view;    // and these too
     AudioRegionView& right_view;
 
-    std::string get_item_name();
-    void set_height (double h);
+    void set_height (double);
 
     bool valid() const { return _valid; }
     bool visible() const { return _visible; }
@@ -69,6 +68,7 @@ struct CrossfadeView : public TimeAxisViewItem
     bool _visible;
 
     double spu;
+    double _height;
 
     ArdourCanvas::Item *overlap_rect;
     ArdourCanvas::Line *fade_in;
@@ -77,7 +77,8 @@ struct CrossfadeView : public TimeAxisViewItem
 
     void crossfade_changed (ARDOUR::Change);
     void active_changed ();
-    void redraw_curves ();
+       void redraw_curves ();
+       void color_handler ();
 };
 
 #endif /* __gtk_ardour_crossfade_view_h__ */