diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2005-11-13 03:53:51 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2005-11-13 03:53:51 +0000 |
commit | 183f69970c6c436b102f8b2fbe1bc6070c9e9bfe (patch) | |
tree | 9e0831557d8b096605d7c80b563fec755b5cbdf0 /gtk2_ardour/marker_time_axis_view.cc | |
parent | 1a3a77607768721f6834ddae09f532cdb6aec4a6 (diff) |
some C++-ification of GnomeCanvasBlah
git-svn-id: svn://localhost/trunk/ardour2@82 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/marker_time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/marker_time_axis_view.cc | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc index bd4d8b21d7..59619626fb 100644 --- a/gtk2_ardour/marker_time_axis_view.cc +++ b/gtk2_ardour/marker_time_axis_view.cc @@ -52,18 +52,18 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv) region_color = _trackview.color(); stream_base_color = color_map[cMarkerTrackBase]; - canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0); - - canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group), - gnome_canvas_simplerect_get_type(), - "x1", 0.0, - "y1", 0.0, - "x2", 1000000.0, - "y2", (double)20, - "outline_color_rgba", color_map[cMarkerTrackOutline], - "fill_color_rgba", stream_base_color, - 0) ; - + //GTK2FIX -- how to get the group? is the canvas display really a group? + //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0); + canvas_group = new Gnome::Canvas::Group (*_trackview.canvas_display); + + canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group); + canvas_rect->set_property ("x1", 0.0); + canvas_rect->set_property ("y1", 0.0); + canvas_rect->set_property ("x2", 1000000.0); + canvas_rect->set_property ("y2", (double)20); + canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]); + canvas_rect->set_property ("fill_color_rgba", stream_base_color); + gtk_signal_connect(GTK_OBJECT(canvas_rect), "event", (GtkSignalFunc)PublicEditor::canvas_marker_time_axis_view_event, &_trackview) ; _samples_per_unit = _trackview.editor.get_current_zoom() ; @@ -142,7 +142,8 @@ MarkerTimeAxisView::set_height(gdouble h) int MarkerTimeAxisView::set_position(gdouble x, gdouble y) { - gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL); + canvas_group->set_property ("x", x); + canvas_group->set_property ("y", y); return 0; } @@ -207,7 +208,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, return(0) ; } - MarkerView* mv = new MarkerView(GNOME_CANVAS_GROUP(canvas_group), + MarkerView* mv = new MarkerView(canvas_group, &_trackview, ifv, _trackview.editor.get_current_zoom(), |