/* Copyright (C) 1998-2002 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 . */ // To exclude this file from the documentation when build-deprecated-api=false. _CONFIGINCLUDE(gtkmmconfig.h) _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/hvbox_p.h) _PINCLUDE(gtkmm/private/dialog_p.h) #m4 _PUSH(SECTION_CC_PRE_INCLUDES) #undef GTK_DISABLE_DEPRECATED #define GDK_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() #include #include namespace Gtk { class GTKMM_API Button; class GTKMM_API Entry; class GTKMM_API TreeView; class GTKMM_API RadioButton; /** A widget for selecting fonts. * * The Gtk::FontSelection widget lists the available fonts, styles and * sizes, allowing the user to select a font. It is used in the * Gtk::FontSelectionDialog widget to provide a dialog box for selecting * fonts. * * @deprecated Use FontChooser instead. * @ingroup Widgets */ class GTKMM_API FontSelection : public VBox { _CLASS_GTKOBJECT(FontSelection,GtkFontSelection,GTK_FONT_SELECTION,Gtk::VBox,GtkVBox,,,GTKMM_API) _IS_DEPRECATED public: _CTOR_DEFAULT() _WRAP_METHOD(TreeView* get_family_list(), gtk_font_selection_get_family_list) _WRAP_METHOD(const TreeView* get_family_list() const, gtk_font_selection_get_family_list, constversion) _WRAP_METHOD(TreeView* get_face_list(), gtk_font_selection_get_face_list) _WRAP_METHOD(const TreeView* get_face_list() const, gtk_font_selection_get_face_list, constversion) _WRAP_METHOD(Entry* get_size_entry(), gtk_font_selection_get_size_entry) _WRAP_METHOD(const Entry* get_size_entry() const, gtk_font_selection_get_size_entry, constversion) _WRAP_METHOD(TreeView* get_size_list(), gtk_font_selection_get_size_list) _WRAP_METHOD(const TreeView* get_size_list() const, gtk_font_selection_get_size_list, constversion) _WRAP_METHOD(Entry* get_preview_entry(), gtk_font_selection_get_preview_entry) _WRAP_METHOD(const Entry* get_preview_entry() const, gtk_font_selection_get_preview_entry) _WRAP_METHOD(Glib::RefPtr get_family(), gtk_font_selection_get_family, refreturn) _WRAP_METHOD(Glib::RefPtr get_family() const, gtk_font_selection_get_family, refreturn, constversion) _WRAP_METHOD(Glib::RefPtr get_face(), gtk_font_selection_get_face, refreturn) _WRAP_METHOD(Glib::RefPtr get_face() const, gtk_font_selection_get_face, refreturn, constversion) _WRAP_METHOD(int get_size() const, gtk_font_selection_get_size) _WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_selection_get_font_name) _WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname), gtk_font_selection_set_font_name) _WRAP_METHOD(Glib::ustring get_preview_text() const, gtk_font_selection_get_preview_text) _WRAP_METHOD(void set_preview_text(const Glib::ustring& text),gtk_font_selection_set_preview_text) //TODO: Remove these accessors when we can break ABI. //They probably all return null now anyway. //Note: The GdkFont "font" property is deprecated, or should be. _WRAP_PROPERTY("font_name", Glib::ustring) _WRAP_PROPERTY("preview_text", Glib::ustring) }; /** A dialog box for selecting fonts. * * The Gtk::FontSelectionDialog widget is a dialog box for selecting a font. * * A FontSelectionDialog looks like this: * @image html fontselectiondialog1.png * * @deprecated Use FontChooserDialog instead. * @ingroup Dialogs */ class GTKMM_API FontSelectionDialog : public Dialog { _CLASS_GTKOBJECT(FontSelectionDialog,GtkFontSelectionDialog,GTK_FONT_SELECTION_DIALOG,Gtk::Dialog,GtkDialog,,,GTKMM_API) _IS_DEPRECATED _IGNORE(gtk_font_selection_dialog_get_font_selection) _UNMANAGEABLE() public: _CTOR_DEFAULT() _WRAP_CTOR(FontSelectionDialog(const Glib::ustring& title), gtk_font_selection_dialog_new) _WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname),gtk_font_selection_dialog_set_font_name) _WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_selection_dialog_get_font_name) _WRAP_METHOD(Glib::ustring get_preview_text() const,gtk_font_selection_dialog_get_preview_text) _WRAP_METHOD(void set_preview_text(const Glib::ustring& text), gtk_font_selection_dialog_set_preview_text) _WRAP_METHOD(Button* get_ok_button(), gtk_font_selection_dialog_get_ok_button) _WRAP_METHOD(const Button* get_ok_button() const, gtk_font_selection_dialog_get_ok_button, constversion) _WRAP_METHOD(Button* get_cancel_button(), gtk_font_selection_dialog_get_cancel_button) _WRAP_METHOD(const Button* get_cancel_button() const, gtk_font_selection_dialog_get_cancel_button, constversion) }; } // namespace Gtk