2 #include "waveview_p.h"
8 * Copyright (C) 1998 EMC Capital Management Inc.
9 * Developed by Havoc Pennington <hp@pobox.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 //#include <libgnomecanvasmm/group.h>
34 WaveView::WaveView(Group& parentx)
35 : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
37 item_construct(parentx);
40 } /* namespace Canvas */
41 } /* namespace Gnome */
47 Gnome::Canvas::WaveView* wrap(GnomeCanvasWaveView* object, bool take_copy)
49 return dynamic_cast<Gnome::Canvas::WaveView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
52 } /* namespace Glib */
61 /* The *_Class implementation: */
63 const Glib::Class& WaveView_Class::init()
65 if(!gtype_) // create the GType if necessary
67 // Glib::Class has to know the class init function to clone custom types.
68 class_init_func_ = &WaveView_Class::class_init_function;
70 // This is actually just optimized away, apparently with no harm.
71 // Make sure that the parent type has been created.
72 //CppClassParent::CppObjectType::get_type();
74 // Create the wrapper type, with the same class/instance size as the base type.
75 register_derived_type(gnome_canvas_waveview_get_type());
77 // Add derived versions of interfaces, if the C type implements any interfaces:
83 void WaveView_Class::class_init_function(void* g_class, void* class_data)
85 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
86 CppClassParent::class_init_function(klass, class_data);
91 Glib::ObjectBase* WaveView_Class::wrap_new(GObject* o)
93 return manage(new WaveView((GnomeCanvasWaveView*)(o)));
98 /* The implementation: */
100 WaveView::WaveView(const Glib::ConstructParams& construct_params)
102 Item(construct_params)
106 WaveView::WaveView(GnomeCanvasWaveView* castitem)
108 Item((GnomeCanvasItem*)(castitem))
112 WaveView::~WaveView()
117 WaveView::CppClassType WaveView::waveview_class_; // initialize static member
119 GType WaveView::get_type()
121 return waveview_class_.init().get_type();
124 GType WaveView::get_base_type()
126 return gnome_canvas_waveview_get_type();
129 Glib::PropertyProxy<void*> WaveView::property_data_src()
131 return Glib::PropertyProxy<void*> (this, "data-src");
133 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_data_src() const
135 return Glib::PropertyProxy_ReadOnly<void*> (this, "data-src");
137 Glib::PropertyProxy<void*> WaveView::property_channel()
139 return Glib::PropertyProxy<void*> (this, "channel");
141 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_channel() const
143 return Glib::PropertyProxy_ReadOnly<void*> (this, "channel");
145 Glib::PropertyProxy<void*> WaveView::property_length_function()
147 return Glib::PropertyProxy<void*> (this, "length-function");
149 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_length_function() const
151 return Glib::PropertyProxy_ReadOnly<void*> (this, "length-function");
153 Glib::PropertyProxy<void*> WaveView::property_sourcefile_length_function()
155 return Glib::PropertyProxy<void*> (this, "sourcefile-length-function");
157 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_sourcefile_length_function() const
159 return Glib::PropertyProxy_ReadOnly<void*> (this, "sourcefile-length-function");
161 Glib::PropertyProxy<void*> WaveView::property_peak_function()
163 return Glib::PropertyProxy<void*> (this, "peak-function");
165 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_peak_function() const
167 return Glib::PropertyProxy_ReadOnly<void*> (this, "peak-function");
169 Glib::PropertyProxy<void*> WaveView::property_gain_function()
171 return Glib::PropertyProxy<void*> (this, "gain-function");
173 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_gain_function() const
175 return Glib::PropertyProxy_ReadOnly<void*> (this, "gain-function");
177 Glib::PropertyProxy<void*> WaveView::property_gain_src()
179 return Glib::PropertyProxy<void*> (this, "gain-src");
181 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_gain_src() const
183 return Glib::PropertyProxy_ReadOnly<void*> (this, "gain-src");
185 Glib::PropertyProxy<void*> WaveView::property_cache()
187 return Glib::PropertyProxy<void*> (this, "cache");
189 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_cache() const
191 return Glib::PropertyProxy_ReadOnly<void*> (this, "cache");
193 Glib::PropertyProxy<void*> WaveView::property_cache_updater()
195 return Glib::PropertyProxy<void*> (this, "cache-updater");
197 Glib::PropertyProxy_ReadOnly<void*> WaveView::property_cache_updater() const
199 return Glib::PropertyProxy_ReadOnly<void*> (this, "cache-updater");
201 Glib::PropertyProxy<double> WaveView::property_samples_per_unit()
203 return Glib::PropertyProxy<double> (this, "samples-per-unit");
205 Glib::PropertyProxy_ReadOnly<double> WaveView::property_samples_per_unit() const
207 return Glib::PropertyProxy_ReadOnly<double> (this, "samples-per-unit");
209 Glib::PropertyProxy<double> WaveView::property_amplitude_above_axis()
211 return Glib::PropertyProxy<double> (this, "amplitude-above-axis");
213 Glib::PropertyProxy_ReadOnly<double> WaveView::property_amplitude_above_axis() const
215 return Glib::PropertyProxy_ReadOnly<double> (this, "amplitude-above-axis");
217 Glib::PropertyProxy<double> WaveView::property_x()
219 return Glib::PropertyProxy<double> (this, "x");
221 Glib::PropertyProxy_ReadOnly<double> WaveView::property_x() const
223 return Glib::PropertyProxy_ReadOnly<double> (this, "x");
225 Glib::PropertyProxy<double> WaveView::property_y()
227 return Glib::PropertyProxy<double> (this, "y");
229 Glib::PropertyProxy_ReadOnly<double> WaveView::property_y() const
231 return Glib::PropertyProxy_ReadOnly<double> (this, "y");
233 Glib::PropertyProxy<double> WaveView::property_height()
235 return Glib::PropertyProxy<double> (this, "height");
237 Glib::PropertyProxy_ReadOnly<double> WaveView::property_height() const
239 return Glib::PropertyProxy_ReadOnly<double> (this, "height");
241 Glib::PropertyProxy<guint> WaveView::property_wave_color()
243 return Glib::PropertyProxy<guint> (this, "wave_color");
245 Glib::PropertyProxy_ReadOnly<guint> WaveView::property_wave_color() const
247 return Glib::PropertyProxy_ReadOnly<guint> (this, "wave_color");
249 Glib::PropertyProxy<gint> WaveView::property_rectified()
251 return Glib::PropertyProxy<gint> (this, "rectified");
253 Glib::PropertyProxy_ReadOnly<gint> WaveView::property_rectified() const
255 return Glib::PropertyProxy_ReadOnly<gint> (this, "rectified");
257 Glib::PropertyProxy<guint> WaveView::property_region_start()
259 return Glib::PropertyProxy<guint> (this, "region-start");
261 Glib::PropertyProxy_ReadOnly<guint> WaveView::property_region_start() const
263 return Glib::PropertyProxy_ReadOnly<guint> (this, "region-start");
266 } // namespace Canvas