// -*- c++ -*-
//  Generated by gtkmmproc from ./../range.gen_h -- DO NOT MODIFY!
#include <gtk--/range.h>
#include <gtk--/private/range_p.h>
#include <gtk--/adjustment.h>

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

namespace Gtk {
Range_Class Range::range_class = {0};

Object* Range_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Range((GtkRange*)(o)));
    return cpp;
  }

bool Range::isA( Object *checkcast)
  {
    return GTK_IS_RANGE(checkcast->gtkobj());
  }

GtkType Range::get_type()
  {
    return range_class.get_type();
  }

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

const char* const Range::signal_names[]={
   "draw_background",
   "clear_background",
   "draw_trough",
   "draw_slider",
   "draw_step_forw",
   "draw_step_back",
   "slider_update",
   "trough_click",
   "motion",
   "trough_keys",
   "timer",
   0};

void Range::initialize_class()
  {

     range_self=this;

  }

void Range_Class::class_init_function(GtkRangeClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->draw_background=draw_background_callback;
    klass->clear_background=clear_background_callback;
    klass->draw_trough=draw_trough_callback;
    klass->draw_slider=draw_slider_callback;
    klass->draw_step_forw=draw_step_forw_callback;
    klass->draw_step_back=draw_step_back_callback;
    klass->slider_update=slider_update_callback;
    klass->trough_click=trough_click_callback;
    klass->motion=motion_callback;
    klass->trough_keys=trough_keys_callback;
    klass->timer=timer_callback;
  }

void Range_Class::object_init_function(GtkRange *)
  {}

}

Gtk::Range::Range(GtkRange *castitem)
  :     Gtk::Widget((GtkWidget*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Range::set_adjustment(Gtk::Adjustment& adjustment)
  {
    gtk_range_set_adjustment(gtkobj(),adjustment.gtkobj());
  }

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

void Gtk::Range::set_update_policy(GtkUpdateType policy)
  {
    gtk_range_set_update_policy(gtkobj(),policy);
  }

void Gtk::Range::draw_background()
  {
    gtk_range_draw_background(gtkobj());
  }

void Gtk::Range::clear_background()
  {
    gtk_range_clear_background(gtkobj());
  }

void Gtk::Range::draw_trough()
  {
    gtk_range_draw_trough(gtkobj());
  }

void Gtk::Range::draw_slider()
  {
    gtk_range_draw_slider(gtkobj());
  }

void Gtk::Range::draw_step_forw()
  {
    gtk_range_draw_step_forw(gtkobj());
  }

void Gtk::Range::draw_step_back()
  {
    gtk_range_draw_step_back(gtkobj());
  }

void Gtk::Range::slider_update()
  {
    gtk_range_slider_update(gtkobj());
  }

gint Gtk::Range::trough_click(gint p0,gint p1,gfloat* p2)
  {
    return gtk_range_trough_click(gtkobj(),p0,p1,p2);
  }

void Gtk::Range::default_hslider_update()
  {
    gtk_range_default_hslider_update(gtkobj());
  }

void Gtk::Range::default_vslider_update()
  {
    gtk_range_default_vslider_update(gtkobj());
  }

void Gtk::Range::default_htrough_click(gint x,gint y,gfloat* jump_perc)
  {
    gtk_range_default_htrough_click(gtkobj(),x,y,jump_perc);
  }

void Gtk::Range::default_vtrough_click(gint x,gint y,gfloat* jump_perc)
  {
    gtk_range_default_vtrough_click(gtkobj(),x,y,jump_perc);
  }

void Gtk::Range::default_hmotion(gint xdelta,gint ydelta)
  {
    gtk_range_default_hmotion(gtkobj(),xdelta,ydelta);
  }

void Gtk::Range::default_vmotion(gint xdelta,gint ydelta)
  {
    gtk_range_default_vmotion(gtkobj(),xdelta,ydelta);
  }

Gtk::Range::Range()
  :     Gtk::Widget((GtkWidget*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

void Gtk::Range_Class::draw_background_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::draw_background_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_background)
      (base->draw_background)(gtkobj());

  }

void Gtk::Range_Class::clear_background_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::clear_background_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->clear_background)
      (base->clear_background)(gtkobj());

  }

void Gtk::Range_Class::draw_trough_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::draw_trough_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_trough)
      (base->draw_trough)(gtkobj());

  }

void Gtk::Range_Class::draw_slider_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::draw_slider_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_slider)
      (base->draw_slider)(gtkobj());

  }

void Gtk::Range_Class::draw_step_forw_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::draw_step_forw_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_step_forw)
      (base->draw_step_forw)(gtkobj());

  }

void Gtk::Range_Class::draw_step_back_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::draw_step_back_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_step_back)
      (base->draw_step_back)(gtkobj());

  }

void Gtk::Range_Class::slider_update_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Range::slider_update_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->slider_update)
      (base->slider_update)(gtkobj());

  }

gint Gtk::Range_Class::trough_click_callback(GtkRange* o_,gint p0,gint p1,gfloat* p2)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      return obj->trough_click_impl(p0,p1,p2);
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->trough_click)
          return (base->trough_click)(o_,p0,p1,p2);
        gtkmm_set_ignore();
      }
    return 0;

  }

gint Gtk::Range::trough_click_impl(gint p0,gint p1,gfloat* p2)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->trough_click)
      return (base->trough_click)(gtkobj(),p0,p1,p2);
    gtkmm_set_ignore();
    return 0;

  }

void Gtk::Range_Class::motion_callback(GtkRange* o_,gint p0,gint p1)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->motion_impl(p0,p1);
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->motion)
          (base->motion)(o_,p0,p1);
      }

  }

void Gtk::Range::motion_impl(gint p0,gint p1)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->motion)
      (base->motion)(gtkobj(),p0,p1);

  }

gint Gtk::Range_Class::trough_keys_callback(GtkRange* o_,GdkEventKey* p0,GtkScrollType* p1,GtkTroughType* p2)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      return obj->trough_keys_impl(p0,p1,p2);
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->trough_keys)
          return (base->trough_keys)(o_,p0,p1,p2);
        gtkmm_set_ignore();
      }
    return 0;

  }

gint Gtk::Range::trough_keys_impl(GdkEventKey* p0,GtkScrollType* p1,GtkTroughType* p2)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->trough_keys)
      return (base->trough_keys)(gtkobj(),p0,p1,p2);
    gtkmm_set_ignore();
    return 0;

  }

gint Gtk::Range_Class::timer_callback(GtkRange* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      return obj->timer_impl();
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->timer)
          return (base->timer)(o_);
        gtkmm_set_ignore();
      }
    return 0;

  }

gint Gtk::Range::timer_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->timer)
      return (base->timer)(gtkobj());
    gtkmm_set_ignore();
    return 0;

  }

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