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

scale.cc

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

// other things from range have their own get_digits
gint Scale::get_digits () const
{
  return Range::gtkobj()->digits;
}

VScale::VScale(Adjustment &adjustment)
  : Scale((GtkScale*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  set_adjustment(adjustment);
}

VScale::VScale()
  : Scale((GtkScale*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  Adjustment *adjustment = manage(new Adjustment(0.0, 0.0, 0.0,
                                      0.0, 0.0, 0.0));
  // The adjustment will be destroyed along with the object
  set_adjustment(*adjustment);
}


HScale::HScale()
  : Scale((GtkScale*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  Adjustment *adjustment = manage(new Adjustment(0.0, 0.0, 0.0,
                                      0.0, 0.0, 0.0));
  // The adjustment will be destroyed along with the object
  set_adjustment(*adjustment);
}

HScale::HScale(Adjustment &adjustment)
  : Scale((GtkScale*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  set_adjustment(adjustment);
}

}

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

namespace Gtk {
Scale_Class Scale::scale_class = {0};

Object* Scale_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Scale((GtkScale*)(o)));
    return cpp;
  }

bool Scale::isA( Object *checkcast)
  {
    return GTK_IS_SCALE(checkcast->gtkobj());
  }

GtkType Scale::get_type()
  {
    return scale_class.get_type();
  }

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

const char* const Scale::signal_names[]={
   "draw_value",
   0};

void Scale::initialize_class()
  {

     scale_self=this;

  }

void Scale_Class::class_init_function(GtkScaleClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->draw_value=draw_value_callback;
  }

void Scale_Class::object_init_function(GtkScale *)
  {}

}

Gtk::Scale::Scale(GtkScale *castitem)
  :     Gtk::Range((GtkRange*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Scale::set_digits(gint digits)
  {
    gtk_scale_set_digits(gtkobj(),digits);
  }

void Gtk::Scale::set_draw_value(gint draw_value)
  {
    gtk_scale_set_draw_value(gtkobj(),draw_value);
  }

void Gtk::Scale::set_value_pos(GtkPositionType pos)
  {
    gtk_scale_set_value_pos(gtkobj(),pos);
  }

gint Gtk::Scale::get_value_width() const
  {
    return gtk_scale_get_value_width(const_cast<GtkScale*>(gtkobj()));
  }

Gtk::Scale::Scale()
  :     Gtk::Range((GtkRange*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

void Gtk::Scale_Class::draw_value_callback(GtkScale* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Scale::draw_value_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_value)
      (base->draw_value)(gtkobj());

  }


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

namespace Gtk {
VScale_Class VScale::vscale_class = {0};

Object* VScale_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new VScale((GtkVScale*)(o)));
    return cpp;
  }

bool VScale::isA( Object *checkcast)
  {
    return GTK_IS_VSCALE(checkcast->gtkobj());
  }

GtkType VScale::get_type()
  {
    return vscale_class.get_type();
  }

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

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

void VScale::initialize_class()
  {

  }

void VScale_Class::class_init_function(GtkVScaleClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void VScale_Class::object_init_function(GtkVScale *)
  {}

}

Gtk::VScale::VScale(GtkVScale *castitem)
  :     Gtk::Scale((GtkScale*)(castitem))
  {
    initialize_class();
  }

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


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

namespace Gtk {
HScale_Class HScale::hscale_class = {0};

Object* HScale_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new HScale((GtkHScale*)(o)));
    return cpp;
  }

bool HScale::isA( Object *checkcast)
  {
    return GTK_IS_HSCALE(checkcast->gtkobj());
  }

GtkType HScale::get_type()
  {
    return hscale_class.get_type();
  }

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

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

void HScale::initialize_class()
  {

  }

void HScale_Class::class_init_function(GtkHScaleClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void HScale_Class::object_init_function(GtkHScale *)
  {}

}

Gtk::HScale::HScale(GtkHScale *castitem)
  :     Gtk::Scale((GtkScale*)(castitem))
  {
    initialize_class();
  }

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

Generated by  Doxygen 1.6.0   Back to index