Merge with 2.0-ongoing R2885.
[ardour.git] / gtk2_ardour / marker.h
index 13e80ef51279d411bf31e67c05194fc0a1677489..1a53726ede0992833ce38f438a06b335b2dcd0b2 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __gtk_ardour_marker_h__
@@ -24,7 +23,7 @@
 #include <string>
 #include <glib.h>
 #include <ardour/ardour.h>
-#include <sigc++/signal.h>
+#include <pbd/destructible.h>
 
 #include "canvas.h"
 
@@ -35,7 +34,7 @@ namespace ARDOUR {
 
 class PublicEditor;
 
-class Marker : public sigc::trackable
+class Marker : public PBD::Destructible
 {
   public:
        enum Type {
@@ -52,33 +51,46 @@ class Marker : public sigc::trackable
 
 
        Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type, 
-               jack_nframes_t frame = 0, bool handle_events = true);
+               nframes_t frame = 0, bool handle_events = true);
 
        virtual ~Marker ();
 
        ArdourCanvas::Item& the_item() const;
 
-       void set_position (jack_nframes_t);
+       void add_line (ArdourCanvas::Group*, double y_origin, double initial_height);
+       void show_line ();
+       void hide_line ();
+       void set_line_vpos (double y_origin, double height);
+
+       void set_position (nframes_t);
        void set_name (const string&);
        void set_color_rgba (uint32_t rgba);
+       
+       nframes64_t position() const { return frame_position; }
 
+       ArdourCanvas::Group * get_parent() { return _parent; }
+       void reparent (ArdourCanvas::Group & parent);
+       
        void hide ();
        void show ();
 
        Type type () { return _type; }
-       
+
   protected:
        PublicEditor& editor;
 
+       ArdourCanvas::Group * _parent;
        ArdourCanvas::Group *group;
        ArdourCanvas::Polygon *mark;
        ArdourCanvas::Text *text;
        ArdourCanvas::Points *points;
+       ArdourCanvas::SimpleLine *line;
+       ArdourCanvas::Points *line_points;
 
-       double    unit_position;
-       jack_nframes_t frame_position;
-       unsigned char      shift; /* should be double, but its always small and integral */
-       Type      _type;
+       double        unit_position;
+       nframes64_t   frame_position;
+       unsigned char shift; /* should be double, but its always small and integral */
+       Type         _type;
        
        void reposition ();
 };