add files
git-svn-id: svn://localhost/trunk/ardour2@80 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
49e5424126
commit
bc8174cd08
|
@ -0,0 +1,270 @@
|
|||
#include "waveview.h"
|
||||
#include "waveview_p.h"
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* waveview.cc
|
||||
*
|
||||
* Copyright (C) 1998 EMC Capital Management Inc.
|
||||
* Developed by Havoc Pennington <hp@pobox.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
//#include <libgnomecanvasmm/group.h>
|
||||
|
||||
namespace Gnome
|
||||
{
|
||||
|
||||
namespace Canvas
|
||||
{
|
||||
|
||||
WaveView::WaveView(Group& parentx)
|
||||
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
|
||||
{
|
||||
item_construct(parentx);
|
||||
}
|
||||
|
||||
} /* namespace Canvas */
|
||||
} /* namespace Gnome */
|
||||
|
||||
|
||||
namespace Glib
|
||||
{
|
||||
|
||||
Gnome::Canvas::WaveView* wrap(GnomeCanvasWaveView* object, bool take_copy)
|
||||
{
|
||||
return dynamic_cast<Gnome::Canvas::WaveView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
|
||||
}
|
||||
|
||||
} /* namespace Glib */
|
||||
|
||||
namespace Gnome
|
||||
{
|
||||
|
||||
namespace Canvas
|
||||
{
|
||||
|
||||
|
||||
/* The *_Class implementation: */
|
||||
|
||||
const Glib::Class& WaveView_Class::init()
|
||||
{
|
||||
if(!gtype_) // create the GType if necessary
|
||||
{
|
||||
// Glib::Class has to know the class init function to clone custom types.
|
||||
class_init_func_ = &WaveView_Class::class_init_function;
|
||||
|
||||
// This is actually just optimized away, apparently with no harm.
|
||||
// Make sure that the parent type has been created.
|
||||
//CppClassParent::CppObjectType::get_type();
|
||||
|
||||
// Create the wrapper type, with the same class/instance size as the base type.
|
||||
register_derived_type(gnome_canvas_waveview_get_type());
|
||||
|
||||
// Add derived versions of interfaces, if the C type implements any interfaces:
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void WaveView_Class::class_init_function(void* g_class, void* class_data)
|
||||
{
|
||||
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
|
||||
CppClassParent::class_init_function(klass, class_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Glib::ObjectBase* WaveView_Class::wrap_new(GObject* o)
|
||||
{
|
||||
return manage(new WaveView((GnomeCanvasWaveView*)(o)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* The implementation: */
|
||||
|
||||
WaveView::WaveView(const Glib::ConstructParams& construct_params)
|
||||
:
|
||||
Item(construct_params)
|
||||
{
|
||||
}
|
||||
|
||||
WaveView::WaveView(GnomeCanvasWaveView* castitem)
|
||||
:
|
||||
Item((GnomeCanvasItem*)(castitem))
|
||||
{
|
||||
}
|
||||
|
||||
WaveView::~WaveView()
|
||||
{
|
||||
destroy_();
|
||||
}
|
||||
|
||||
WaveView::CppClassType WaveView::waveview_class_; // initialize static member
|
||||
|
||||
GType WaveView::get_type()
|
||||
{
|
||||
return waveview_class_.init().get_type();
|
||||
}
|
||||
|
||||
GType WaveView::get_base_type()
|
||||
{
|
||||
return gnome_canvas_waveview_get_type();
|
||||
}
|
||||
|
||||
Glib::PropertyProxy<void*> WaveView::property_data_src()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "data-src");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_data_src() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "data-src");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_channel()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "channel");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_channel() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "channel");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_length_function()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "length-function");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_length_function() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "length-function");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_sourcefile_length_function()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "sourcefile-length-function");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_sourcefile_length_function() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "sourcefile-length-function");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_peak_function()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "peak-function");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_peak_function() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "peak-function");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_gain_function()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "gain-function");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_gain_function() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "gain-function");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_gain_src()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "gain-src");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_gain_src() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "gain-src");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_cache()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "cache");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_cache() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "cache");
|
||||
}
|
||||
Glib::PropertyProxy<void*> WaveView::property_cache_updater()
|
||||
{
|
||||
return Glib::PropertyProxy<void*> (this, "cache-updater");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<void*> WaveView::property_cache_updater() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<void*> (this, "cache-updater");
|
||||
}
|
||||
Glib::PropertyProxy<double> WaveView::property_samples_per_unit()
|
||||
{
|
||||
return Glib::PropertyProxy<double> (this, "samples-per-unit");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<double> WaveView::property_samples_per_unit() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<double> (this, "samples-per-unit");
|
||||
}
|
||||
Glib::PropertyProxy<double> WaveView::property_amplitude_above_axis()
|
||||
{
|
||||
return Glib::PropertyProxy<double> (this, "amplitude-above-axis");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<double> WaveView::property_amplitude_above_axis() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<double> (this, "amplitude-above-axis");
|
||||
}
|
||||
Glib::PropertyProxy<double> WaveView::property_x()
|
||||
{
|
||||
return Glib::PropertyProxy<double> (this, "x");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<double> WaveView::property_x() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<double> (this, "x");
|
||||
}
|
||||
Glib::PropertyProxy<double> WaveView::property_y()
|
||||
{
|
||||
return Glib::PropertyProxy<double> (this, "y");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<double> WaveView::property_y() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<double> (this, "y");
|
||||
}
|
||||
Glib::PropertyProxy<double> WaveView::property_height()
|
||||
{
|
||||
return Glib::PropertyProxy<double> (this, "height");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<double> WaveView::property_height() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<double> (this, "height");
|
||||
}
|
||||
Glib::PropertyProxy<guint> WaveView::property_wave_color()
|
||||
{
|
||||
return Glib::PropertyProxy<guint> (this, "wave_color");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<guint> WaveView::property_wave_color() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<guint> (this, "wave_color");
|
||||
}
|
||||
Glib::PropertyProxy<gint> WaveView::property_rectified()
|
||||
{
|
||||
return Glib::PropertyProxy<gint> (this, "rectified");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<gint> WaveView::property_rectified() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<gint> (this, "rectified");
|
||||
}
|
||||
Glib::PropertyProxy<guint> WaveView::property_region_start()
|
||||
{
|
||||
return Glib::PropertyProxy<guint> (this, "region-start");
|
||||
}
|
||||
Glib::PropertyProxy_ReadOnly<guint> WaveView::property_region_start() const
|
||||
{
|
||||
return Glib::PropertyProxy_ReadOnly<guint> (this, "region-start");
|
||||
}
|
||||
|
||||
} // namespace Canvas
|
||||
|
||||
} // namespace Gnome
|
||||
|
||||
|
|
@ -0,0 +1,164 @@
|
|||
// -*- c++ -*-
|
||||
#ifndef _LIBGNOMECANVASMM_WAVEVIEW_H
|
||||
#define _LIBGNOMECANVASMM_WAVEVIEW_H
|
||||
|
||||
#include <glibmm.h>
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* waveview.h
|
||||
*
|
||||
* Copyright (C) 1998 EMC Capital Management Inc.
|
||||
* Developed by Havoc Pennington <hp@pobox.com>
|
||||
*
|
||||
* Copyright (C) 1999 The Gtk-- Development Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <libgnomecanvasmm/item.h>
|
||||
#include "canvas-waveview.h"
|
||||
#include <libgnomecanvas/gnome-canvas-util.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
typedef struct _GnomeCanvasWaveView GnomeCanvasWaveView;
|
||||
typedef struct _GnomeCanvasWaveViewClass GnomeCanvasWaveViewClass;
|
||||
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|
||||
|
||||
|
||||
namespace Gnome
|
||||
{
|
||||
|
||||
namespace Canvas
|
||||
{ class WaveView_Class; } // namespace Canvas
|
||||
|
||||
} // namespace Gnome
|
||||
namespace Gnome
|
||||
{
|
||||
|
||||
namespace Canvas
|
||||
{
|
||||
|
||||
class GnomeGroup;
|
||||
|
||||
class WaveView : public Item
|
||||
{
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
typedef WaveView CppObjectType;
|
||||
typedef WaveView_Class CppClassType;
|
||||
typedef GnomeCanvasWaveView BaseObjectType;
|
||||
typedef GnomeCanvasWaveViewClass BaseClassType;
|
||||
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|
||||
|
||||
virtual ~WaveView();
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
|
||||
private:
|
||||
friend class WaveView_Class;
|
||||
static CppClassType waveview_class_;
|
||||
|
||||
// noncopyable
|
||||
WaveView(const WaveView&);
|
||||
WaveView& operator=(const WaveView&);
|
||||
|
||||
protected:
|
||||
explicit WaveView(const Glib::ConstructParams& construct_params);
|
||||
explicit WaveView(GnomeCanvasWaveView* castitem);
|
||||
|
||||
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|
||||
|
||||
public:
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||
static GType get_type() G_GNUC_CONST;
|
||||
static GType get_base_type() G_GNUC_CONST;
|
||||
#endif
|
||||
|
||||
///Provides access to the underlying C GtkObject.
|
||||
GnomeCanvasWaveView* gobj() { return reinterpret_cast<GnomeCanvasWaveView*>(gobject_); }
|
||||
|
||||
///Provides access to the underlying C GtkObject.
|
||||
const GnomeCanvasWaveView* gobj() const { return reinterpret_cast<GnomeCanvasWaveView*>(gobject_); }
|
||||
|
||||
|
||||
public:
|
||||
//C++ methods used to invoke GTK+ virtual functions:
|
||||
|
||||
protected:
|
||||
//GTK+ Virtual Functions (override these to change behaviour):
|
||||
|
||||
//Default Signal Handlers::
|
||||
|
||||
|
||||
private:
|
||||
|
||||
public:
|
||||
WaveView(Group& parent);
|
||||
|
||||
Glib::PropertyProxy<void*> property_data_src();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_data_src() const;
|
||||
Glib::PropertyProxy<void*> property_channel();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_channel() const;
|
||||
Glib::PropertyProxy<void*> property_length_function();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_length_function() const;
|
||||
Glib::PropertyProxy<void*> property_sourcefile_length_function();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_sourcefile_length_function() const;
|
||||
Glib::PropertyProxy<void*> property_peak_function();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_peak_function() const;
|
||||
Glib::PropertyProxy<void*> property_gain_function();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_gain_function() const;
|
||||
Glib::PropertyProxy<void*> property_gain_src();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_gain_src() const;
|
||||
Glib::PropertyProxy<void*> property_cache();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_cache() const;
|
||||
Glib::PropertyProxy<void*> property_cache_updater();
|
||||
Glib::PropertyProxy_ReadOnly<void*> property_cache_updater() const;
|
||||
Glib::PropertyProxy<double> property_samples_per_unit();
|
||||
Glib::PropertyProxy_ReadOnly<double> property_samples_per_unit() const;
|
||||
Glib::PropertyProxy<double> property_amplitude_above_axis();
|
||||
Glib::PropertyProxy_ReadOnly<double> property_amplitude_above_axis() const;
|
||||
Glib::PropertyProxy<double> property_x();
|
||||
Glib::PropertyProxy_ReadOnly<double> property_x() const;
|
||||
Glib::PropertyProxy<double> property_y();
|
||||
Glib::PropertyProxy_ReadOnly<double> property_y() const;
|
||||
Glib::PropertyProxy<double> property_height();
|
||||
Glib::PropertyProxy_ReadOnly<double> property_height() const;
|
||||
Glib::PropertyProxy<guint> property_wave_color();
|
||||
Glib::PropertyProxy_ReadOnly<guint> property_wave_color() const;
|
||||
Glib::PropertyProxy<gint> property_rectified();
|
||||
Glib::PropertyProxy_ReadOnly<gint> property_rectified() const;
|
||||
Glib::PropertyProxy<guint> property_region_start();
|
||||
Glib::PropertyProxy_ReadOnly<guint> property_region_start() const;
|
||||
};
|
||||
|
||||
} /* namespace Canvas */
|
||||
} /* namespace Gnome */
|
||||
|
||||
|
||||
namespace Glib
|
||||
{
|
||||
/** @relates Gnome::Canvas::WaveView
|
||||
* @param object The C instance
|
||||
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
|
||||
* @result A C++ instance that wraps this C instance.
|
||||
*/
|
||||
Gnome::Canvas::WaveView* wrap(GnomeCanvasWaveView* object, bool take_copy = false);
|
||||
}
|
||||
#endif /* _LIBGNOMECANVASMM_WAVEVIEW_H */
|
||||
|
Loading…
Reference in New Issue