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

}

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

namespace Gtk {
HandleBox_Class HandleBox::handle_box_class = {0};

Object* HandleBox_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new HandleBox((GtkHandleBox*)(o)));
    return cpp;
  }

bool HandleBox::isA( Object *checkcast)
  {
    return GTK_IS_HANDLE_BOX(checkcast->gtkobj());
  }

GtkType HandleBox::get_type()
  {
    return handle_box_class.get_type();
  }

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

const char* const HandleBox::signal_names[]={
   "child_attached",
   "child_detached",
   0};

void HandleBox::initialize_class()
  {

     handle_box_self=this;

  }

void HandleBox_Class::class_init_function(GtkHandleBoxClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->child_attached=child_attached_callback;
    klass->child_detached=child_detached_callback;
  }

void HandleBox_Class::object_init_function(GtkHandleBox *)
  {}

}

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

Gtk::HandleBox::HandleBox(GtkHandleBox *castitem)
  :     Gtk::Bin((GtkBin*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::HandleBox::set_shadow_type(GtkShadowType type)
  {
    gtk_handle_box_set_shadow_type(gtkobj(),type);
  }

void Gtk::HandleBox::set_handle_position(GtkPositionType position)
  {
    gtk_handle_box_set_handle_position(gtkobj(),position);
  }

void Gtk::HandleBox::set_snap_edge(GtkPositionType edge)
  {
    gtk_handle_box_set_snap_edge(gtkobj(),edge);
  }

void Gtk::HandleBox_Class::child_attached_callback(GtkHandleBox* p0,GtkWidget* p1)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)p0,Gtk::quark_)));

    if (obj)
      obj->child_attached_impl(Gtk::wrap(p1));
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)p0)->klass->type));
        if (base->child_attached)
          (base->child_attached)(p0,p1);
      }

  }

void Gtk::HandleBox::child_attached_impl(Gtk::Widget* p0)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->child_attached)
      (base->child_attached)(gtkobj(),(GtkWidget*)Gtk::unwrap(p0));

  }

namespace {
static void child_attached_convert_func(SigC::Callback1<void,Gtk::Widget*> *s,GtkWidget* p1)
  {
     s->call(Gtk::wrap(p1));
  }

}

SigC::Connection
Gtk::HandleBox::Proxy_child_attached::connect(const SigC::Slot1<void,Gtk::Widget*> &s)
   {
    return BaseType::connect(SigC::convert(s,&child_attached_convert_func));
   }

void Gtk::HandleBox_Class::child_detached_callback(GtkHandleBox* p0,GtkWidget* p1)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)p0,Gtk::quark_)));

    if (obj)
      obj->child_detached_impl(Gtk::wrap(p1));
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)p0)->klass->type));
        if (base->child_detached)
          (base->child_detached)(p0,p1);
      }

  }

void Gtk::HandleBox::child_detached_impl(Gtk::Widget* p0)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->child_detached)
      (base->child_detached)(gtkobj(),(GtkWidget*)Gtk::unwrap(p0));

  }

namespace {
static void child_detached_convert_func(SigC::Callback1<void,Gtk::Widget*> *s,GtkWidget* p1)
  {
     s->call(Gtk::wrap(p1));
  }

}

SigC::Connection
Gtk::HandleBox::Proxy_child_detached::connect(const SigC::Slot1<void,Gtk::Widget*> &s)
   {
    return BaseType::connect(SigC::convert(s,&child_detached_convert_func));
   }

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

GtkPositionType Gtk::HandleBox::get_handle_position() const
  { return (GtkPositionType)gtkobj()->handle_position; }

GtkPositionType Gtk::HandleBox::get_snap_edge() const
  { return (GtkPositionType)gtkobj()->snap_edge; }
