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

#include <gtk--/box.h>
#include <gtk--/button.h>
#include <gtk--/entry.h>
#include <gtk--/clist.h>
#include <gtk--/radiobutton.h>


CList*
FontSelection::get_filter_list(PropertyType p)
{
  return dynamic_cast<CList*>(
           wrap(gtkobj()->filter_clists[(int)p])
         );
}


string
FontSelection::get_font_name() const
{
  gchar *tmp = gtk_font_selection_get_font_name(const_cast<GtkFontSelection*>(gtkobj()));
  string tmps(tmp);
  g_free(tmp);

  return tmps;
}

void
FontSelection::set_filter(GtkFontFilterType filter_type,
			      GtkFontType	font_type,
                              const SArray	&foundries,
                              const SArray	&weights,
                              const SArray	&slants,
                              const SArray	&setwidths,
                              const SArray	&spacings,
                              const SArray	&charsets)
{
  gtk_font_selection_set_filter(gtkobj(),
				filter_type, font_type,
				const_cast<char**>((const char**)foundries),
				const_cast<char**>((const char**)weights),
				const_cast<char**>((const char**)slants),
				const_cast<char**>((const char**)setwidths),
				const_cast<char**>((const char**)spacings),
				const_cast<char**>((const char**)charsets));
}



/////////////////////////////

FontSelectionDialog::FontSelectionDialog(const nstring& title)
  : Window((GtkWindow*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  set_title(title);
}

FontSelectionDialog::FontSelectionDialog(GtkFontSelectionDialog *castitem)
  : Window((GtkWindow*)(castitem))
{
  initialize_class();
}

nstring
FontSelectionDialog::get_font_name() const
{
  return get_font_selection()->get_font_name();
}


void
FontSelectionDialog::set_filter(GtkFontFilterType filter_type,
				    GtkFontType	font_type,
                                    const SArray	&foundries,
                                    const SArray	&weights,
                                    const SArray	&slants,
                                    const SArray	&setwidths,
                                    const SArray	&spacings,
                                    const SArray	&charsets)
{
  get_font_selection()->set_filter(filter_type,font_type,foundries,
                             weights,slants,setwidths,spacings,charsets);
}

}

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

namespace Gtk {
FontSelection_Class FontSelection::font_selection_class = {0};

Object* FontSelection_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new FontSelection((GtkFontSelection*)(o)));
    return cpp;
  }

bool FontSelection::isA( Object *checkcast)
  {
    return GTK_IS_FONT_SELECTION(checkcast->gtkobj());
  }

GtkType FontSelection::get_type()
  {
    return font_selection_class.get_type();
  }

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

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

void FontSelection::initialize_class()
  {

  }

void FontSelection_Class::class_init_function(GtkFontSelectionClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void FontSelection_Class::object_init_function(GtkFontSelection *)
  {}

}

Gtk::FontSelection::FontSelection()
  :     Gtk::Notebook((GtkNotebook*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::FontSelection::FontSelection(GtkFontSelection *castitem)
  :     Gtk::Notebook((GtkNotebook*)(castitem))
  {
    initialize_class();
  }

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

Gdk_Font Gtk::FontSelection::get_font() const
  {
    return gtk_font_selection_get_font(const_cast<GtkFontSelection*>(gtkobj()));
  }

bool Gtk::FontSelection::set_font_name(const string& fontname)
  {
    return ((gtk_font_selection_set_font_name(gtkobj(),fontname.c_str()))?true:false);
  }

string Gtk::FontSelection::get_preview_text() const
  {
    return gtk_font_selection_get_preview_text(const_cast<GtkFontSelection*>(gtkobj()));
  }

void Gtk::FontSelection::set_preview_text(const string& fontname)
  {
    gtk_font_selection_set_preview_text(gtkobj(),fontname.c_str());
  }

Gtk::Box* Gtk::FontSelection::get_font_box() const
  { return Gtk::wrap((GtkBox*)(gtkobj()->main_vbox)); }

Gtk::Label* Gtk::FontSelection::get_font_label() const
  { return Gtk::wrap((GtkLabel*)(gtkobj()->font_label)); }

Gtk::Entry* Gtk::FontSelection::get_font_entry() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->font_entry)); }

Gtk::Entry* Gtk::FontSelection::get_font_style_entry() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->font_style_entry)); }

Gtk::Entry* Gtk::FontSelection::get_size_entry() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->size_entry)); }

Gtk::Entry* Gtk::FontSelection::get_preview_entry() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->preview_entry)); }

Gtk::CList* Gtk::FontSelection::get_font_list() const
  { return Gtk::wrap((GtkCList*)(gtkobj()->font_clist)); }

Gtk::CList* Gtk::FontSelection::get_font_style_list() const
  { return Gtk::wrap((GtkCList*)(gtkobj()->font_style_clist)); }

Gtk::CList* Gtk::FontSelection::get_size_list() const
  { return Gtk::wrap((GtkCList*)(gtkobj()->size_clist)); }

Gtk::RadioButton* Gtk::FontSelection::get_pixels_button() const
  { return Gtk::wrap((GtkRadioButton*)(gtkobj()->pixels_button)); }

Gtk::RadioButton* Gtk::FontSelection::get_points_button() const
  { return Gtk::wrap((GtkRadioButton*)(gtkobj()->points_button)); }

Gtk::Button* Gtk::FontSelection::get_filter_button() const
  { return Gtk::wrap((GtkButton*)(gtkobj()->filter_button)); }

Gtk::Label* Gtk::FontSelection::get_message_label() const
  { return Gtk::wrap((GtkLabel*)(gtkobj()->message_label)); }

Gtk::Box* Gtk::FontSelection::get_info_box() const
  { return Gtk::wrap((GtkBox*)(gtkobj()->info_vbox)); }

Gtk::CList* Gtk::FontSelection::get_info_list() const
  { return Gtk::wrap((GtkCList*)(gtkobj()->info_clist)); }

Gtk::Entry* Gtk::FontSelection::get_requested_font_name() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->requested_font_name)); }

Gtk::Entry* Gtk::FontSelection::get_actual_font_name() const
  { return Gtk::wrap((GtkEntry*)(gtkobj()->actual_font_name)); }

Gtk::Box* Gtk::FontSelection::get_filter_box() const
  { return Gtk::wrap((GtkBox*)(gtkobj()->filter_vbox)); }

Gtk::CheckButton* Gtk::FontSelection::get_type_bitmaps_button() const
  { return Gtk::wrap((GtkCheckButton*)(gtkobj()->type_bitmaps_button)); }

Gtk::CheckButton* Gtk::FontSelection::get_type_scalable_button() const
  { return Gtk::wrap((GtkCheckButton*)(gtkobj()->type_scalable_button)); }

Gtk::CheckButton* Gtk::FontSelection::get_type_scaled_bitmaps_button() const
  { return Gtk::wrap((GtkCheckButton*)(gtkobj()->type_scaled_bitmaps_button)); }


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

namespace Gtk {
FontSelectionDialog_Class FontSelectionDialog::font_selection_dialog_class = {0};

Object* FontSelectionDialog_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new FontSelectionDialog((GtkFontSelectionDialog*)(o)));
    return cpp;
  }

bool FontSelectionDialog::isA( Object *checkcast)
  {
    return GTK_IS_FONT_SELECTION_DIALOG(checkcast->gtkobj());
  }

GtkType FontSelectionDialog::get_type()
  {
    return font_selection_dialog_class.get_type();
  }

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

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

void FontSelectionDialog::initialize_class()
  {

  }

void FontSelectionDialog_Class::class_init_function(GtkFontSelectionDialogClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void FontSelectionDialog_Class::object_init_function(GtkFontSelectionDialog *)
  {}

}

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

bool Gtk::FontSelectionDialog::set_font_name(const string& fontname)
  {
    return ((gtk_font_selection_dialog_set_font_name(gtkobj(),fontname.c_str()))?true:false);
  }

Gdk_Font Gtk::FontSelectionDialog::get_font() const
  {
    return gtk_font_selection_dialog_get_font(const_cast<GtkFontSelectionDialog*>(gtkobj()));
  }

string Gtk::FontSelectionDialog::get_preview_text() const
  {
    return gtk_font_selection_dialog_get_preview_text(const_cast<GtkFontSelectionDialog*>(gtkobj()));
  }

void Gtk::FontSelectionDialog::set_preview_text(const string& fontname)
  {
    gtk_font_selection_dialog_set_preview_text(gtkobj(),fontname.c_str());
  }

Gtk::FontSelection* Gtk::FontSelectionDialog::get_font_selection() const
  { return Gtk::wrap((GtkFontSelection*)(gtkobj()->fontsel)); }

Gtk::Button* Gtk::FontSelectionDialog::get_ok_button() const
  { return Gtk::wrap((GtkButton*)(gtkobj()->ok_button)); }

Gtk::Button* Gtk::FontSelectionDialog::get_apply_button() const
  { return Gtk::wrap((GtkButton*)(gtkobj()->apply_button)); }

Gtk::Button* Gtk::FontSelectionDialog::get_cancel_button() const
  { return Gtk::wrap((GtkButton*)(gtkobj()->cancel_button)); }
