add new swedish translation
[ardour.git] / gtk2_ardour / time_axis_view_item.h
index b1e993944940e407cb0ecd982aa92738055b237b..e27b944e2a6c59597301c1b50ea183ef96edbd1f 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef __gtk_ardour_time_axis_view_item_h__
 #define __gtk_ardour_time_axis_view_item_h__
 
-#include <sigc++/signal.h>
-
 #include <jack/jack.h>
 #include <string>
 
@@ -38,7 +36,7 @@ class TimeAxisView;
  * A base class for 'items' that may appear upon a TimeAxisView
  *
  */
-class TimeAxisViewItem : public sigc::trackable, public Selectable
+class TimeAxisViewItem : public Selectable
 {
    public:
        virtual ~TimeAxisViewItem() ;
@@ -50,14 +48,14 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param src the identity of the object that initiated the change
      * @return true if the position change was a success, false otherwise
      */
-    virtual bool set_position(jack_nframes_t pos, void* src, double* delta = 0) ;
+    virtual bool set_position(nframes_t pos, void* src, double* delta = 0) ;
     
     /**
      * Return the position of this item upon the timeline
      *
      * @return the position of this item
      */
-    jack_nframes_t get_position() const ; 
+    nframes_t get_position() const ; 
     
     /**
      * Sets the duration of this item
@@ -66,13 +64,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param src the identity of the object that initiated the change
      * @return true if the duration change was succesful, false otherwise
      */
-    virtual bool set_duration(jack_nframes_t dur, void* src) ;
+    virtual bool set_duration(nframes_t dur, void* src) ;
     
     /**
      * Returns the duration of this item
      *
      */
-    jack_nframes_t get_duration() const ;
+    nframes_t get_duration() const ;
     
     /**
      * Sets the maximum duration that this item make have.
@@ -80,14 +78,14 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param dur the new maximum duration
      * @param src the identity of the object that initiated the change
      */
-    virtual void set_max_duration(jack_nframes_t dur, void* src) ;
+    virtual void set_max_duration(nframes_t dur, void* src) ;
     
     /**
      * Returns the maxmimum duration that this item may be set to
      *
      * @return the maximum duration that this item may be set to
      */
-    jack_nframes_t get_max_duration() const ;
+    nframes_t get_max_duration() const ;
     
     /**
      * Sets the minimu duration that this item may be set to
@@ -95,14 +93,14 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param the minimum duration that this item may be set to
      * @param src the identity of the object that initiated the change
      */
-    virtual void set_min_duration(jack_nframes_t dur, void* src) ;
+    virtual void set_min_duration(nframes_t dur, void* src) ;
     
     /**
      * Returns the minimum duration that this item mey be set to
      *
      * @return the nimum duration that this item mey be set to
      */
-    jack_nframes_t get_min_duration() const ;
+    nframes_t get_min_duration() const ;
     
     /**
      * Sets whether the position of this Item is locked to its current position
@@ -170,9 +168,8 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * Set to true to indicate that this item is currently selected
      *
      * @param yn true if this item is currently selected
-     * @param src the identity of the object that initiated the change
      */
-    virtual void set_selected(bool yn, void* src) ;
+    virtual void set_selected(bool yn) ;
 
     /**
      * Set to true to indicate that this item should show its selection status
@@ -181,13 +178,6 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      */
     virtual void set_should_show_selection (bool yn) ;
     
-    /**
-     * Returns whether this item is currently selected.
-     *
-     * @return true if this item is currently selected, false otherwise
-     */
-    bool get_selected() const ; 
-    
     //---------------------------------------------------------------------------------------//
     // Parent Component Methods
     
@@ -272,10 +262,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
@@ -302,24 +295,20 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     sigc::signal<void,std::string,std::string,void*> NameChanged ;
     
     /** Emiited when the position of this item changes */
-    sigc::signal<void,jack_nframes_t,void*> PositionChanged ;
+    sigc::signal<void,nframes_t,void*> PositionChanged ;
     
     /** Emitted when the position lock of this item is changed */
     sigc::signal<void,bool,void*> PositionLockChanged ;
     
     /** Emitted when the duration of this item changes */
-    sigc::signal<void,jack_nframes_t,void*> DurationChanged ;
+    sigc::signal<void,nframes_t,void*> DurationChanged ;
     
     /** Emitted when the maximum item duration is changed */
-    sigc::signal<void,jack_nframes_t,void*> MaxDurationChanged ;
+    sigc::signal<void,nframes_t,void*> MaxDurationChanged ;
     
     /** Emitted when the mionimum item duration is changed */
-    sigc::signal<void,jack_nframes_t,void*> MinDurationChanged ;
+    sigc::signal<void,nframes_t,void*> MinDurationChanged ;
     
-    /** Emitted when the selected status of this item changes */
-    sigc::signal<void, bool> Selected ;
-    
-
   protected:
     
     enum Visibility {
@@ -327,9 +316,10 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
            ShowNameHighlight = 0x2,
            ShowNameText = 0x4,
            ShowHandles = 0x8,
-           HideFrameLR = 0x10,
-           HideFrameTB = 0x20,
-           FullWidthNameHighlight = 0x40
+           HideFrameLeft = 0x10,
+           HideFrameRight = 0x20,
+           HideFrameTB = 0x40,
+           FullWidthNameHighlight = 0x80
     };
 
     /**
@@ -344,7 +334,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
      * @param duration the duration of this item
      */
     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));
+                    nframes_t start, nframes_t duration, Visibility v = Visibility (0));
     
     /**
      * Calculates some contrasting color for displaying various parts of this item, based upon the base color
@@ -389,16 +379,16 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
     bool position_locked ;
     
     /** The posotion of this item on the timeline */
-    jack_nframes_t frame_position ;
+    nframes_t frame_position ;
     
     /** the duration of this item upon the timeline */
-    jack_nframes_t item_duration ;
+    nframes_t item_duration ;
     
     /** the maximum duration that we allow this item to take */
-    jack_nframes_t max_item_duration ;
+    nframes_t max_item_duration ;
     
     /** the minimu duration that we allow this item to take */
-    jack_nframes_t min_item_duration ;
+    nframes_t min_item_duration ;
     
     /** indicates whether this Max Duration constraint is active */
     bool max_duration_active ;