- /* "randomly" initialize coords */
-
- points.push_back (Gnome::Art::Point (-9383839.0, 0.0));
- points.push_back (Gnome::Art::Point (1.0, 0.0));
-
- canvas_item = new Gnome::Canvas::Line (editor.cursor_group);
- canvas_item->set_property ("points", points.gobj());
- canvas_item->set_property ("fill_color", color.c_str());
- canvas_item->set_property ("width_pixels", 1);
- canvas_item->set_property ("first_arrowhead", (gboolean) TRUE);
- canvas_item->set_property ("last_arrowhead", (gboolean) TRUE);
- canvas_item->set_property ("arrow_shape_a", 11.0);
- canvas_item->set_property ("arrow_shape_b", 0.0);
- canvas_item->set_property ("arrow_shape_c", 9.0);
-
- canvas_item->set_data ("cursor", this);
- canvas_item->signal_event().connect (slot (ed, callback));
-
+ 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));