- GnomeCanvasGroup *group;
- points = gnome_canvas_points_new (2);
-
- /* "randomly" initialize coords */
-
- points->coords[0] = -9383839.0;
- points->coords[1] = 0.0;
- points->coords[2] = 1.0;
- points->coords[3] = 0.0;
-
- group = GNOME_CANVAS_GROUP (editor.cursor_group);
-
- // cerr << "set cursor points, nc = " << points->num_points << endl;
- canvas_item = gnome_canvas_item_new (group,
- gnome_canvas_line_get_type(),
- "points", points,
- "fill_color", color.c_str(),
- "width_pixels", 1,
- "first_arrowhead", (gboolean) TRUE,
- "last_arrowhead", (gboolean) TRUE,
- "arrow_shape_a", 11.0,
- "arrow_shape_b", 0.0,
- "arrow_shape_c", 9.0,
- NULL);
-
- // cerr << "cursor line @ " << canvas_item << endl;
-
- gtk_object_set_data (GTK_OBJECT(canvas_item), "cursor", this);
- gtk_signal_connect (GTK_OBJECT(canvas_item), "event", callback, &editor);
-
+ points.push_back(Gnome::Art::Point(-1.0, 0.0)); // first x-coord needs to be a non-normal value
+ points.push_back(Gnome::Art::Point(1.0, 1.0));
+
+ canvas_item.property_points() = points;
+ canvas_item.property_width_pixels() = 1;
+ canvas_item.property_first_arrowhead() = TRUE;
+ canvas_item.property_last_arrowhead() = TRUE;
+ canvas_item.property_arrow_shape_a() = 11.0;
+ canvas_item.property_arrow_shape_b() = 0.0;
+ canvas_item.property_arrow_shape_c() = 9.0;
+
+ canvas_item.set_data ("cursor", this);
+ canvas_item.signal_event().connect (sigc::bind (sigc::mem_fun (ed, callbck), &canvas_item));