some C++-ification of GnomeCanvasBlah
[ardour.git] / gtk2_ardour / imageframe_time_axis_view.cc
index 20ccb7d61f23bf8b719d220336e9bf912ea7cb7f..32ac72531858fc9842aa605d77070c0f9855ea7c 100644 (file)
@@ -20,9 +20,9 @@
 
 #include <algorithm>
 
-#include <gtk--.h>
+#include <gtkmm.h>
 
-#include <gtkmmext/gtk_ui.h>
+#include <gtkmm2ext/gtk_ui.h>
 
 #include "imageframe_time_axis_view.h"
 #include "imageframe_time_axis_group.h"
@@ -53,10 +53,10 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
        region_color = _trackview.color() ;
        stream_base_color = color_map[cImageTrackBase] ;
 
-       canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display), gtk_canvas_group_get_type (), 0) ;
+       canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0) ;
 
-       canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
-               gtk_canvas_simplerect_get_type(),
+       canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
+               gnome_canvas_simplerect_get_type(),
                "x1", 0.0,
                "y1", 0.0,
                "x2", 1000000.0,
@@ -69,7 +69,7 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
 
        _samples_per_unit = _trackview.editor.get_current_zoom() ;
 
-       _trackview.editor.ZoomChanged.connect (slot (*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ;
+       _trackview.editor.ZoomChanged.connect (mem_fun(*this, &ImageFrameTimeAxisView::reset_samples_per_unit)) ;
 
        selected_imageframe_group = 0 ;
        selected_imageframe_view = 0 ;
@@ -154,7 +154,7 @@ int
 ImageFrameTimeAxisView::set_position (gdouble x, gdouble y)
 
 {
-       gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
+       gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
        return 0;
 }
 
@@ -187,7 +187,7 @@ ImageFrameTimeAxisView::set_samples_per_unit (gdouble spp)
  * @param color the new base color
  */
 void
-ImageFrameTimeAxisView::apply_color(GdkColor& color)
+ImageFrameTimeAxisView::apply_color(Gdk::Color& color)
 {
        region_color = color ;
        for(ImageFrameGroupList::const_iterator citer = imageframe_groups.begin(); citer != imageframe_groups.end(); citer++)
@@ -234,7 +234,7 @@ ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src)
 
                imageframe_groups.push_front(iftag) ;
        
-               iftag->GoingAway.connect(bind(slot (*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ;
+               iftag->GoingAway.connect(bind(mem_fun(*this,&ImageFrameTimeAxisView::remove_imageframe_group), iftag, (void*)this)) ;
        
                 ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */
        }
@@ -310,7 +310,7 @@ ImageFrameTimeAxisView::remove_named_imageframe_group(std::string group_id, void
 void
 ImageFrameTimeAxisView::remove_imageframe_group(ImageFrameTimeAxisGroup* iftag, void* src)
 {
-       ENSURE_GUI_THREAD(bind (slot (*this, &ImageFrameTimeAxisView::remove_imageframe_group), iftag, src));
+       ENSURE_GUI_THREAD(bind (mem_fun(*this, &ImageFrameTimeAxisView::remove_imageframe_group), iftag, src));
 
        ImageFrameGroupList::iterator i;
        if((i = find (imageframe_groups.begin(), imageframe_groups.end(), iftag)) != imageframe_groups.end())