+ delete group;
+ delete _line;
+}
+
+void Marker::reparent(ArdourCanvas::Group & parent)
+{
+ group->reparent (parent);
+ _parent = &parent;
+}
+
+void
+Marker::set_selected (bool s)
+{
+ _selected = s;
+ setup_line ();
+}
+
+void
+Marker::set_show_line (bool s)
+{
+ _line_shown = s;
+ setup_line ();
+}
+
+void
+Marker::setup_line ()
+{
+ if (_shown && (_selected || _line_shown)) {
+
+ if (_line == 0) {
+
+ _line = new ArdourCanvas::SimpleLine (*group);
+ _line->property_color_rgba() = ARDOUR_UI::config()->canvasvar_EditPoint.get();
+
+ _line->signal_event().connect (sigc::bind (sigc::mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+ }
+
+ /* work out where to start the line from so that it extends from the top of the canvas */
+ double yo = 0;
+ double xo = 0;
+
+ _line->i2w (xo, yo);
+
+ _line->property_x1() = _shift;
+ _line->property_x2() = _shift;
+ _line->property_y1() = -yo; // zero in world coordinates, negative in item/parent coordinate space
+ _line->property_y2() = -yo + _canvas_height;
+
+ _line->property_color_rgba() = _selected ? ARDOUR_UI::config()->canvasvar_EditPoint.get() : _color;
+ _line->raise_to_top ();
+ _line->show ();
+
+ } else {
+ if (_line) {
+ _line->hide ();
+ }
+ }
+}
+
+void
+Marker::canvas_height_set (double h)
+{
+ _canvas_height = h;
+ setup_line ();