- group = gnome_canvas_item_new (parent,
- gnome_canvas_group_get_type(),
- "x", unit_position,
- "y", 1.0,
- NULL);
-
- // cerr << "set mark al points, nc = " << points->num_points << endl;
- mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
- gnome_canvas_polygon_get_type(),
- "points", points,
- "fill_color_rgba", rgba,
- "outline_color", "black",
- NULL);
-
- string fontname = get_font_for_style (N_("MarkerText"));
-
- text = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
- gnome_canvas_text_get_type (),
- "text", annotation.c_str(),
- "x", label_offset,
- "y", 0.0,
- "font", fontname.c_str(),
- "anchor", GTK_ANCHOR_NW,
- "fill_color", "black",
- NULL);
-
- gtk_object_set_data (GTK_OBJECT(group), "marker", this);
- gtk_signal_connect (GTK_OBJECT(group), "event", (GtkSignalFunc) callback, &editor);
-
- editor.ZoomChanged.connect (mem_fun(*this, &Marker::reposition));
+ group = new Group (parent, unit_position, 1.0);
+
+ mark = new Polygon (*group);
+ mark->property_points() = *points;
+ mark->property_fill_color_rgba() = rgba;
+ mark->property_outline_color_rgba() = rgba;
+ mark->property_width_pixels() = 1;
+ Pango::FontDescription* font = get_font_for_style (N_("MarkerText"));
+
+ text = new Text (*group);
+ text->property_text() = annotation.c_str();
+ text->property_font_desc() = *font;
+
+ delete font;
+
+ if (annotate_left) {
+ text->property_x() = -(text->property_text_width());
+ } else {
+ text->property_x() = label_offset;
+ }
+ text->property_y() = 0.0;
+ text->property_anchor() = Gtk::ANCHOR_NW;
+ text->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerLabel.get();
+
+ editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
+
+ mark->set_data ("marker", this);
+
+ if (handle_events) {
+ group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+ }
+
+ line = 0;
+ line_points = 0;
+