Canvas GObject fixes
[ardour.git] / gtk2_ardour / time_axis_view_item.h
index 27f7a8de91bc46c9b3dfff8a959736329ea1d7f1..cf74736479eb76be2da3d781bd2710f4a69912ee 100644 (file)
 #define __gtk_ardour_time_axis_view_item_h__
 
 #include <sigc++/signal.h>
-#include <gtk-canvas.h>
+
 #include <jack/jack.h>
 #include <string>
 
+#include <libgnomecanvasmm/text.h>
+
 #include "selectable.h"
+#include "simplerect.h"
+#include "canvas.h"
 
 class TimeAxisView;
 
@@ -215,27 +219,28 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     /**
      * 
      */
-    void set_color(GdkColor& color) ;
+    void set_color(Gdk::Color& color) ;
     
     /**
      * 
      */
-    GtkCanvasItem* get_canvas_frame() ;
+    ArdourCanvas::Item* get_canvas_frame() ;
 
     /**
      * 
      */
-    GtkCanvasItem* get_canvas_group();
+    ArdourCanvas::Item* get_canvas_group();
 
     /**
      * 
      */
-    GtkCanvasItem* get_name_highlight();
+    ArdourCanvas::Item* get_name_highlight();
 
     /**
      * 
      */
-    GtkCanvasItem* get_name_text();
+    ArdourCanvas::Text* get_name_text();
+
 
     /**
      * Sets the samples per unit of this item.
@@ -264,7 +269,8 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     bool name_active() const { return name_connected; }
 
     // Default sizes, font and spacing
-    static std::string NAME_FONT ;
+    static Pango::FontDescription NAME_FONT ;
+    static bool have_name_font;
     static const double NAME_X_OFFSET ;
     static const double NAME_Y_OFFSET ;
     static const double NAME_HIGHLIGHT_SIZE ;
@@ -334,7 +340,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param start the start point of this item
      * @param duration the duration of this item
      */
-    TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color, 
+    TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, 
                     jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
     
     /**
@@ -342,7 +348,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      *
      * @param color the base color of the item
      */
-    virtual void compute_colors(GdkColor& color) ;
+    virtual void compute_colors(Gdk::Color& color) ;
     
     /**
      * convenience method to set the various canvas item colors
@@ -440,13 +446,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     uint32_t lock_handle_color_g ;
     uint32_t lock_handle_color_b ;
     
-    GtkCanvasItem* group ;               /* the group */
-    GtkCanvasItem* vestigial_frame ;     /* simplerect */
-    GtkCanvasItem* frame ;               /* simplerect */
-    GtkCanvasItem* name_text ;           /* text */
-    GtkCanvasItem* name_highlight ;      /* simplerect */
-    GtkCanvasItem* frame_handle_start ;  /* simplerect */
-    GtkCanvasItem* frame_handle_end ;    /* simplerect */
+    ArdourCanvas::Group*      group;
+    ArdourCanvas::SimpleRect* vestigial_frame;
+    ArdourCanvas::SimpleRect* frame;
+    ArdourCanvas::Text*       name_text;
+    ArdourCanvas::SimpleRect* name_highlight;
+    ArdourCanvas::SimpleRect* frame_handle_start;
+    ArdourCanvas::SimpleRect* frame_handle_end;
 
 }; /* class TimeAxisViewItem */