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

spinbutton.cc

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

SpinButton::SpinButton(gfloat climb_rate, gint digits) :
  Entry((GtkEntry*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  gtk_spin_button_configure(gtkobj(),
                      0,
                      climb_rate, digits);

}

SpinButton::SpinButton(Adjustment &adjustment,
                         gfloat climb_rate, gint digits) :
  Entry((GtkEntry*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  gtk_spin_button_configure(gtkobj(),
                      adjustment.gtkobj(),
                      climb_rate, digits);
}

}

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

namespace Gtk {
SpinButton_Class SpinButton::spin_button_class = {0};

Object* SpinButton_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new SpinButton((GtkSpinButton*)(o)));
    return cpp;
  }

bool SpinButton::isA( Object *checkcast)
  {
    return GTK_IS_SPIN_BUTTON(checkcast->gtkobj());
  }

GtkType SpinButton::get_type()
  {
    return spin_button_class.get_type();
  }

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

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

void SpinButton::initialize_class()
  {

  }

void SpinButton_Class::class_init_function(GtkSpinButtonClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void SpinButton_Class::object_init_function(GtkSpinButton *)
  {}

}

Gtk::SpinButton::SpinButton(GtkSpinButton *castitem)
  :     Gtk::Entry((GtkEntry*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::SpinButton::set_adjustment(Gtk::Adjustment& adjustment)
  {
    gtk_spin_button_set_adjustment(gtkobj(),adjustment.gtkobj());
  }

void Gtk::SpinButton::set_adjustment(Gtk::Adjustment* adjustment)
  {
    gtk_spin_button_set_adjustment(gtkobj(),(GtkAdjustment*)Gtk::unwrap(adjustment));
  }

void Gtk::SpinButton::set_digits(gint digits)
  {
    gtk_spin_button_set_digits(gtkobj(),digits);
  }

gfloat Gtk::SpinButton::get_value_as_float() const
  {
    return gtk_spin_button_get_value_as_float(const_cast<GtkSpinButton*>(gtkobj()));
  }

gint Gtk::SpinButton::get_value_as_int() const
  {
    return gtk_spin_button_get_value_as_int(const_cast<GtkSpinButton*>(gtkobj()));
  }

void Gtk::SpinButton::set_value(gfloat value)
  {
    gtk_spin_button_set_value(gtkobj(),value);
  }

void Gtk::SpinButton::set_update_policy(GtkSpinButtonUpdatePolicy policy)
  {
    gtk_spin_button_set_update_policy(gtkobj(),policy);
  }

void Gtk::SpinButton::set_wrap(bool wrap)
  {
    gtk_spin_button_set_wrap(gtkobj(),wrap);
  }

void Gtk::SpinButton::set_numeric(bool numeric)
  {
    gtk_spin_button_set_numeric(gtkobj(),numeric);
  }

void Gtk::SpinButton::spin(GtkSpinType direction,gfloat step)
  {
    gtk_spin_button_spin(gtkobj(),direction,step);
  }

void Gtk::SpinButton::set_shadow_type(GtkShadowType shadow_type)
  {
    gtk_spin_button_set_shadow_type(gtkobj(),shadow_type);
  }

void Gtk::SpinButton::set_snap_to_ticks(bool snap_to_ticks)
  {
    gtk_spin_button_set_snap_to_ticks(gtkobj(),snap_to_ticks);
  }

void Gtk::SpinButton::update()
  {
    gtk_spin_button_update(gtkobj());
  }

GtkSpinButtonUpdatePolicy Gtk::SpinButton::get_update_policy() const
  { return gtkobj()->update_policy; }

guint Gtk::SpinButton::get_digits() const
  { return gtkobj()->digits; }

bool Gtk::SpinButton::get_numeric() const
  { return gtkobj()->numeric; }

bool Gtk::SpinButton::get_wrap() const
  { return gtkobj()->wrap; }

GtkShadowType Gtk::SpinButton::get_shadow_type() const
  { return gtkobj()->shadow_type; }

bool Gtk::SpinButton::get_snap_to_ticks() const
  { return gtkobj()->snap_to_ticks; }

Gtk::Adjustment* Gtk::SpinButton::get_adjustment() const
  { return Gtk::wrap(gtkobj()->adjustment); }

Generated by  Doxygen 1.6.0   Back to index