- GtkCanvasItem *wave = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
- gtk_canvas_waveview_get_type (),
- "data_src", (gpointer) ®ion,
- "cache", wave_caches[which],
- "cache_updater", (gboolean) true,
- "channel", (guint32) which,
- "length_function", (gpointer) region_length_from_c,
- "sourcefile_length_function",(gpointer) sourcefile_length_from_c,
- "peak_function", (gpointer) region_read_peaks_from_c,
- "x", 0.0,
- "y", yoff,
- "height", (double) ht,
- "samples_per_unit", samples_per_unit,
- "amplitude_above_axis", _amplitude_above_axis,
- "wave_color", (guint32) (region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm]),
- "region_start",(guint32) region.start(),
- NULL);
-
+ WaveView *wave = new WaveView(*group);
+
+ wave->property_data_src() = (gpointer) ®ion;
+ wave->property_cache() = wave_caches[which];
+ wave->property_cache_updater() = true;
+ wave->property_channel() = which;
+ wave->property_length_function() = (gpointer) region_length_from_c;
+ wave->property_sourcefile_length_function() = (gpointer) sourcefile_length_from_c;
+ wave->property_peak_function() = (gpointer) region_read_peaks_from_c;
+ wave->property_x() = 0.0;
+ wave->property_y() = yoff;
+ wave->property_height() = (double) ht;
+ wave->property_samples_per_unit() = samples_per_unit;
+ wave->property_amplitude_above_axis() = _amplitude_above_axis;
+ wave->property_wave_color() = region.muted() ? color_map[cMutedWaveForm] : color_map[cWaveForm];
+ wave->property_region_start() = region.start();
+