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

Entry::Entry(guint max)
  :     Editable((GtkEditable*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  set_max_length(max);
}

}

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

namespace Gtk {
Entry_Class Entry::entry_class = {0};

Object* Entry_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Entry((GtkEntry*)(o)));
    return cpp;
  }

bool Entry::isA( Object *checkcast)
  {
    return GTK_IS_ENTRY(checkcast->gtkobj());
  }

GtkType Entry::get_type()
  {
    return entry_class.get_type();
  }

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

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

void Entry::initialize_class()
  {

  }

void Entry_Class::class_init_function(GtkEntryClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Entry_Class::object_init_function(GtkEntry *)
  {}

}

Gtk::Entry::Entry()
  :     Gtk::Editable((GtkEditable*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::Entry::Entry(GtkEntry *castitem)
  :     Gtk::Editable((GtkEditable*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Entry::set_text(const string& text)
  {
    gtk_entry_set_text(gtkobj(),text.c_str());
  }

string Gtk::Entry::get_text() const
  {
    return gtk_entry_get_text(const_cast<GtkEntry*>(gtkobj()));
  }

void Gtk::Entry::append_text(const string& text)
  {
    gtk_entry_append_text(gtkobj(),text.c_str());
  }

void Gtk::Entry::prepend_text(const string& text)
  {
    gtk_entry_prepend_text(gtkobj(),text.c_str());
  }

void Gtk::Entry::select_region(gint start,gint end)
  {
    gtk_entry_select_region(gtkobj(),start,end);
  }

void Gtk::Entry::set_position(gint position)
  {
    gtk_entry_set_position(gtkobj(),position);
  }

void Gtk::Entry::set_visibility(bool visible)
  {
    gtk_entry_set_visibility(gtkobj(),(gint)visible);
  }

void Gtk::Entry::set_max_length(guint16 max)
  {
    gtk_entry_set_max_length(gtkobj(),max);
  }

unsigned int Gtk::Entry::get_text_length() const
  { return gtkobj()->text_length; }
