1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/*
* 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/button.h>
//TODO: When we can break ABI: #include <gtkmm/fontchooser.h>
_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 FontButton
: public Button
//TODO: When we can break ABI: public FontChooser
{
_CLASS_GTKOBJECT(FontButton, GtkFontButton, GTK_FONT_BUTTON, Gtk::Button, GtkButton)
//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
|