* MIDI control lanes: Set Interpolationtype according to Parameter
[ardour.git] / gtk2_ardour / crossfade_view.h
index 27c182929cd1822713626e8cde9e4af9bacbf711..6d45f05e79b0495da60f07bab8d120ea4457742b 100644 (file)
     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__
 #define __gtk_ardour_crossfade_view_h__
 
 #include <vector>
-#include <gtkmm.h>
-#include <libgnomecanvas/libgnomecanvas.h>
+#include <libgnomecanvasmm.h>
 #include <sigc++/signal.h>
 #include <ardour/crossfade.h>
 
 #include "time_axis_view_item.h"
 
-class AudioTimeAxisView;
+class RouteTimeAxisView;
 class AudioRegionView;
 
 struct CrossfadeView : public TimeAxisViewItem
 {
-    CrossfadeView (Gnome::Canvas::Group*, 
-                  AudioTimeAxisView&,
-                  ARDOUR::Crossfade&,
+    CrossfadeView (ArdourCanvas::Group*, 
+                  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);
 
     bool valid() const { return _valid; }
@@ -70,15 +68,17 @@ struct CrossfadeView : public TimeAxisViewItem
     bool _visible;
 
     double spu;
+    double _height;
 
-    GnomeCanvasItem *overlap_rect;
-    GnomeCanvasItem *fade_in;
-    GnomeCanvasItem *fade_out;
-    GnomeCanvasItem *active_button;
+    ArdourCanvas::Item *overlap_rect;
+    ArdourCanvas::Line *fade_in;
+    ArdourCanvas::Line *fade_out;
+    ArdourCanvas::Item *active_button;
 
     void crossfade_changed (ARDOUR::Change);
     void active_changed ();
     void redraw_curves ();
+       void color_handler ();
 };
 
 #endif /* __gtk_ardour_crossfade_view_h__ */