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

}

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

namespace Gtk {
Item_Class Item::item_class = {0};

Object* Item_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Item((GtkItem*)(o)));
    return cpp;
  }

bool Item::isA( Object *checkcast)
  {
    return GTK_IS_ITEM(checkcast->gtkobj());
  }

GtkType Item::get_type()
  {
    return item_class.get_type();
  }

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

const char* const Item::signal_names[]={
   "select",
   "deselect",
   "toggle",
   0};

void Item::initialize_class()
  {

     item_self=this;

  }

void Item_Class::class_init_function(GtkItemClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->select=select_callback;
    klass->deselect=deselect_callback;
    klass->toggle=toggle_callback;
  }

void Item_Class::object_init_function(GtkItem *)
  {}

}

Gtk::Item::Item(GtkItem *castitem)
  :     Gtk::Bin((GtkBin*)(castitem))
  {
    initialize_class();
  }

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

Gtk::Item::Item()
  :     Gtk::Bin((GtkBin*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

void Gtk::Item_Class::select_callback(GtkItem* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Item::select_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->select)
      (base->select)(gtkobj());

  }

void Gtk::Item_Class::deselect_callback(GtkItem* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Item::deselect_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->deselect)
      (base->deselect)(gtkobj());

  }

void Gtk::Item_Class::toggle_callback(GtkItem* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::Item::toggle_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->toggle)
      (base->toggle)(gtkobj());

  }
