/* 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 . */ #include //TODO: When we can break ABI: #include _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/button_p.h) #m4 _PUSH(SECTION_CC_PRE_INCLUDES) #undef GTK_DISABLE_DEPRECATED #define GDK_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() // gtk_font_button_set/get_font_name() and property font-name are deprecated // in gtk+ 3.22 in favor of gtk_font_chooser_set/get_font() and // GtkFontChooser:font. They can't be deprecated here because FontChooser // is not a base cvlass. 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 GTKMM_API FontButton : public Button //TODO: When we can break ABI: public FontChooser { _CLASS_GTKOBJECT(FontButton, GtkFontButton, GTK_FONT_BUTTON, Gtk::Button, GtkButton, , , GTKMM_API) //TODO: When we can break ABI: _IMPLEMENTS_INTERFACE(FontChooser) public: _CTOR_DEFAULT() _WRAP_CTOR(FontButton(const Glib::ustring& font_name), 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_METHOD(Glib::ustring get_font_name() const, gtk_font_button_get_font_name) _WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname), gtk_font_button_set_font_name) _WRAP_METHOD(bool get_show_style() const, gtk_font_button_get_show_style) _WRAP_METHOD(void set_show_style(bool show_style = true), gtk_font_button_set_show_style) _WRAP_METHOD(bool get_show_size() const, gtk_font_button_get_show_size) _WRAP_METHOD(void set_show_size(bool show_size = true), gtk_font_button_set_show_size) _WRAP_PROPERTY("title", Glib::ustring) _WRAP_PROPERTY("font-name", Glib::ustring) _WRAP_PROPERTY("use-font", bool) _WRAP_PROPERTY("use-size", bool) _WRAP_PROPERTY("show-style", bool) _WRAP_PROPERTY("show-size", bool) _WRAP_SIGNAL(void font_set(), "font-set") }; } // namespace Gtk