/*
 * Copyright (C) 2003 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
 */

#include <gtkmm/widget.h>
#include <gtkmm/fontchooser.h>

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


namespace Gtk
{

/** A button to launch a font selection dialog.
 *
 * The Gtk::FontButton is a button which displays the currently selected font and
 * allows to open a font selection dialog to change the font. It is suitable widget
 * for selecting a font in a preference dialog.
 *
 * The FontButton widget looks like this:
 * @image html fontbutton1.png
 *
 * @ingroup Widgets
 */
class FontButton
  : public Widget,
    public FontChooser
{
  _CLASS_GTKOBJECT(FontButton, GtkFontButton, GTK_FONT_BUTTON, Gtk::Widget, GtkWidget)
  _IMPLEMENTS_INTERFACE(FontChooser)
public:
  _CTOR_DEFAULT()
  _WRAP_CTOR(FontButton(const Glib::ustring& font), gtk_font_button_new_with_font)

  _WRAP_METHOD(Glib::ustring get_title() const, gtk_font_button_get_title)
  _WRAP_METHOD(void set_title(const Glib::ustring& title), gtk_font_button_set_title)
  _WRAP_METHOD(bool get_use_font() const, gtk_font_button_get_use_font)
  _WRAP_METHOD(void set_use_font(bool use_font = true), gtk_font_button_set_use_font)
  _WRAP_METHOD(bool get_use_size() const, gtk_font_button_get_use_size)
  _WRAP_METHOD(void set_use_size(bool use_size = true), gtk_font_button_set_use_size)

  _WRAP_PROPERTY("title", Glib::ustring)
  _WRAP_PROPERTY("use-font", bool)
  _WRAP_PROPERTY("use-size", bool)

  _WRAP_SIGNAL(void font_set(), "font-set")
};

} // namespace Gtk
