/* Copyright (C) 2011 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/box_p.h)


#include <gtkmm/box.h>


namespace Gtk
{

/** A widget for selecting fonts.
 *
 * The Gtk::FontChooser widget lists the available fonts, styles and
 * sizes, allowing the user to select a font. It is used in the
 * Gtk::FontChooserDialog widget to provide a dialog box for selecting
 * fonts.
 *
 * To set the font which is initially selected, use set_font_name().
 *
 * To get the selected font use get_font_name().
 *
 * To change the text which is shown in the preview area, use set_preview_text().
 * 
 * @ingroup Widgets
 * @newin{3,2}
 */
class FontChooser : public Box
{
  _CLASS_GTKOBJECT(FontChooser, GtkFontChooser, GTK_FONT_CHOOSER, Gtk::Box, GtkBox)
  _IGNORE(gtk_font_chooser_get_font) //deprecated
public:
  _CTOR_DEFAULT()

  _WRAP_METHOD(Glib::RefPtr<Pango::FontFamily> get_family(), gtk_font_chooser_get_family, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Pango::FontFamily> get_family() const, gtk_font_chooser_get_family, refreturn, constversion)

  _WRAP_METHOD(Glib::RefPtr<Pango::FontFace> get_face(), gtk_font_chooser_get_face, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Pango::FontFace> get_face() const, gtk_font_chooser_get_face, refreturn, constversion)

  _WRAP_METHOD(int get_size() const, gtk_font_chooser_get_size)

  _WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_chooser_get_font_name)
  _WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname), gtk_font_chooser_set_font_name)
  _WRAP_METHOD(Glib::ustring get_preview_text() const, gtk_font_chooser_get_preview_text)
  _WRAP_METHOD(void set_preview_text(const Glib::ustring& fontname),gtk_font_chooser_set_preview_text)
  
  _WRAP_METHOD(bool get_show_preview_entry() const, gtk_font_chooser_get_show_preview_entry)
  _WRAP_METHOD(void set_show_preview_entry(bool show_preview_entry = true), gtk_font_chooser_set_show_preview_entry)


  //Note: The GdkFont "font" property is deprecated, or should be.
  _WRAP_PROPERTY("font_name", Glib::ustring)
  _WRAP_PROPERTY("preview_text", Glib::ustring)
  _WRAP_PROPERTY("show-preview-entry", bool)
};

} // namespace Gtk
