Merged with trunk (painfully)
[ardour.git] / gtk2_ardour / time_axis_view_item.h
index ff651b96490267131a955c637aab6083fe5846cb..c9e4fd5dd5883243966cf7f7a6841a114c60567b 100644 (file)
 #define __gtk_ardour_time_axis_view_item_h__
 
 #include <sigc++/signal.h>
-#include <libgnomecanvas/libgnomecanvas.h>
+
 #include <jack/jack.h>
 #include <string>
 
+#include <libgnomecanvasmm/text.h>
+
 #include "selectable.h"
+#include "simplerect.h"
+#include "canvas.h"
 
 class TimeAxisView;
 
@@ -220,22 +224,23 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     /**
      * 
      */
-    GnomeCanvasItem* get_canvas_frame() ;
+    ArdourCanvas::Item* get_canvas_frame() ;
 
     /**
      * 
      */
-    GnomeCanvasItem* get_canvas_group();
+    ArdourCanvas::Item* get_canvas_group();
 
     /**
      * 
      */
-    GnomeCanvasItem* get_name_highlight();
+    ArdourCanvas::Item* get_name_highlight();
 
     /**
      * 
      */
-    GnomeCanvasItem* get_name_text();
+    ArdourCanvas::Text* get_name_text();
+
 
     /**
      * Sets the samples per unit of this item.
@@ -267,10 +272,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     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 ;
-    static const double NAME_HIGHLIGHT_THRESH ;
     static const double GRAB_HANDLE_LENGTH ;
+    /* these are not constant, but vary with the pixel size
+       of the font used to display the item name.
+    */
+    static double NAME_Y_OFFSET ;
+    static double NAME_HIGHLIGHT_SIZE ;
+    static double NAME_HIGHLIGHT_THRESH ;
 
     /**
      * Handles the Removal of this time axis item
@@ -321,7 +329,10 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
            ShowFrame = 0x1,
            ShowNameHighlight = 0x2,
            ShowNameText = 0x4,
-           ShowHandles = 0x8
+           ShowHandles = 0x8,
+           HideFrameLR = 0x10,
+           HideFrameTB = 0x20,
+           FullWidthNameHighlight = 0x40
     };
 
     /**
@@ -335,7 +346,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, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, 
+    TimeAxisViewItem(const 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));
     
     /**
@@ -441,13 +452,15 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     uint32_t lock_handle_color_g ;
     uint32_t lock_handle_color_b ;
     
-    GnomeCanvasItem* group ;               /* the group */
-    GnomeCanvasItem* vestigial_frame ;     /* simplerect */
-    GnomeCanvasItem* frame ;               /* simplerect */
-    GnomeCanvasItem* name_text ;           /* text */
-    GnomeCanvasItem* name_highlight ;      /* simplerect */
-    GnomeCanvasItem* frame_handle_start ;  /* simplerect */
-    GnomeCanvasItem* 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;
+
+    Visibility visibility;
 
 }; /* class TimeAxisViewItem */