/* 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, see <https://www.gnu.org/licenses/>.
 */

_DEFS(gtkmm,gtk)
_CONFIGINCLUDE(gtkmmconfig.h)
_IS_DEPRECATED // The entire file is deprecated.

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

_PINCLUDE(gtkmm/private/widget_p.h)

#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()

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
 * @deprecated 4.10: Use Gtk::FontDialogButton instead.
 */
class GTKMM_API FontButton
  : public Widget,
    public FontChooser
{
  _CLASS_GTKOBJECT(FontButton, GtkFontButton, GTK_FONT_BUTTON, Gtk::Widget, GtkWidget, , , GTKMM_API)
  _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_modal() const, gtk_font_button_get_modal)
  _WRAP_METHOD(void set_modal(bool modal = true), gtk_font_button_set_modal)
  _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("modal", bool)
  _WRAP_PROPERTY("use-font", bool)
  _WRAP_PROPERTY("use-size", bool)

  // no_default_handler because GtkFontButtonClass is private.
  _WRAP_SIGNAL(void font_set(), "font-set", no_default_handler)
  _IGNORE_SIGNAL("activate")dnl// Action signal
};

} // namespace Gtk
