Logo Search packages:      
Sourcecode: ardour version File versions  Download package

curve.cc

// -*- c++ -*-
//  Generated by gtkmmproc from ./../curve.gen_h -- DO NOT MODIFY!
#include <gtk--/curve.h>
#include <gtk--/private/curve_p.h>
namespace Gtk
{

void
Curve::set_vector(const CurveArray &vect)
{
  gtk_curve_set_vector(gtkobj(), vect.size(), vect);
}

void CurveArray::a_alloc(int size)
{
  data_=new gfloat[size+1];
  data_[size]=0;
  size_=size;
  owned_=1;
}

CurveArray::~CurveArray()
{
  if (owned_) delete [] data_;
}

}

namespace Gtk {
Gtk::Curve *wrap (GtkCurve *o)
  {
    return static_cast<Gtk::Curve *> (Gtk::wrap_auto ((GtkObject *) (o)));
  }
}

namespace Gtk {
Curve_Class Curve::curve_class = {0};

Object* Curve_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Curve((GtkCurve*)(o)));
    return cpp;
  }

bool Curve::isA( Object *checkcast)
  {
    return GTK_IS_CURVE(checkcast->gtkobj());
  }

GtkType Curve::get_type()
  {
    return curve_class.get_type();
  }

GtkType Curve_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__Curve",
            sizeof(BaseObjectType),
            sizeof(BaseClassType),
            (GtkClassInitFunc) class_init_function,
            (GtkObjectInitFunc) object_init_function,
            /* reserved_1 */ NULL,
            /* reserved_2 */ NULL,
            /*base_class_init_func */ (GtkClassInitFunc) NULL
          };
        type=gtk_type_unique(gtk_curve_get_type(), &info);
      }
    return type;
  }

const char* const Curve::signal_names[]={
   "curve_type_changed",
   0};

void Curve::initialize_class()
  {

     curve_self=this;

  }

void Curve_Class::class_init_function(GtkCurveClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->curve_type_changed=curve_type_changed_callback;
  }

void Curve_Class::object_init_function(GtkCurve *)
  {}

}

Gtk::Curve::Curve()
  :     Gtk::DrawingArea((GtkDrawingArea*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::Curve::Curve(GtkCurve *castitem)
  :     Gtk::DrawingArea((GtkDrawingArea*)(castitem))
  {
    initialize_class();
  }

Gtk::Curve::~Curve() { destroy_(); }

void Gtk::Curve::reset()
  {
    gtk_curve_reset(gtkobj());
  }

void Gtk::Curve::set_gamma(gfloat gamma)
  {
    gtk_curve_set_gamma(gtkobj(),gamma);
  }

void Gtk::Curve::set_range(gfloat min_x,gfloat max_x,gfloat min_y,gfloat max_y)
  {
    gtk_curve_set_range(gtkobj(),min_x,max_x,min_y,max_y);
  }

void Gtk::Curve::get_vector(int num,gfloat* data)
  {
    gtk_curve_get_vector(gtkobj(),num,data);
  }

void Gtk::Curve::set_curve_type(GtkCurveType type)
  {
    gtk_curve_set_curve_type(gtkobj(),type);
  }

void Gtk::Curve_Class::curve_type_changed_callback(GtkCurve* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->curve_type_changed_impl();
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->curve_type_changed)
          (base->curve_type_changed)(o_);
      }

  }

void Gtk::Curve::curve_type_changed_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->curve_type_changed)
      (base->curve_type_changed)(gtkobj());

  }


namespace Gtk {
Gtk::GammaCurve *wrap (GtkGammaCurve *o)
  {
    return static_cast<Gtk::GammaCurve *> (Gtk::wrap_auto ((GtkObject *) (o)));
  }
}

namespace Gtk {
GammaCurve_Class GammaCurve::gamma_curve_class = {0};

Object* GammaCurve_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new GammaCurve((GtkGammaCurve*)(o)));
    return cpp;
  }

bool GammaCurve::isA( Object *checkcast)
  {
    return GTK_IS_GAMMA_CURVE(checkcast->gtkobj());
  }

GtkType GammaCurve::get_type()
  {
    return gamma_curve_class.get_type();
  }

GtkType GammaCurve_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__GammaCurve",
            sizeof(BaseObjectType),
            sizeof(BaseClassType),
            (GtkClassInitFunc) class_init_function,
            (GtkObjectInitFunc) object_init_function,
            /* reserved_1 */ NULL,
            /* reserved_2 */ NULL,
            /*base_class_init_func */ (GtkClassInitFunc) NULL
          };
        type=gtk_type_unique(gtk_gamma_curve_get_type(), &info);
      }
    return type;
  }

const char* const GammaCurve::signal_names[]={
   0};

void GammaCurve::initialize_class()
  {

  }

void GammaCurve_Class::class_init_function(GtkGammaCurveClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void GammaCurve_Class::object_init_function(GtkGammaCurve *)
  {}

}

Gtk::GammaCurve::GammaCurve()
  :     Gtk::VBox((GtkVBox*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::GammaCurve::GammaCurve(GtkGammaCurve *castitem)
  :     Gtk::VBox((GtkVBox*)(castitem))
  {
    initialize_class();
  }

Gtk::GammaCurve::~GammaCurve() { destroy_(); }

Generated by  Doxygen 1.6.0   Back to index