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

adjustment.cc

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

  Adjustment::Adjustment(gfloat value, gfloat lower, gfloat upper,
                   gfloat step_increment, gfloat page_increment,
                   gfloat page_size)
    : Data((GtkData*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
    GtkAdjustment *adjustment=(GtkAdjustment*)gtkobject;
    adjustment->value = value;
    adjustment->lower = lower;
    adjustment->upper = upper;
    adjustment->step_increment = step_increment;
    adjustment->page_increment = page_increment;
    adjustment->page_size = page_size;

  }

}

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

namespace Gtk {
Adjustment_Class Adjustment::adjustment_class = {0};

Object* Adjustment_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Adjustment((GtkAdjustment*)(o)));
    return cpp;
  }

bool Adjustment::isA( Object *checkcast)
  {
    return GTK_IS_ADJUSTMENT(checkcast->gtkobj());
  }

GtkType Adjustment::get_type()
  {
    return adjustment_class.get_type();
  }

GtkType Adjustment_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__Adjustment",
            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_adjustment_get_type(), &info);
      }
    return type;
  }

const char* const Adjustment::signal_names[]={
   "changed",
   "value_changed",
   0};

void Adjustment::initialize_class()
  {

     adjustment_self=this;

  }

void Adjustment_Class::class_init_function(GtkAdjustmentClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->changed=changed_callback;
    klass->value_changed=value_changed_callback;
  }

void Adjustment_Class::object_init_function(GtkAdjustment *)
  {}

}

Gtk::Adjustment::Adjustment(GtkAdjustment *castitem)
  :     Gtk::Data((GtkData*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Adjustment::clamp_page(gfloat lower,gfloat upper)
  {
    gtk_adjustment_clamp_page(gtkobj(),lower,upper);
  }

void Gtk::Adjustment::set_value(gfloat value)
  {
    gtk_adjustment_set_value(gtkobj(),value);
  }

void Gtk::Adjustment_Class::changed_callback(GtkAdjustment* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Adjustment::changed_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->changed)
      (base->changed)(gtkobj());

  }

void Gtk::Adjustment_Class::value_changed_callback(GtkAdjustment* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Adjustment::value_changed_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->value_changed)
      (base->value_changed)(gtkobj());

  }

Generated by  Doxygen 1.6.0   Back to index