| 1 |
/* Copyright (C) 1998-2002 The gtkmm Development Team |
| 2 |
* |
| 3 |
* This library is free software; you can redistribute it and/or |
| 4 |
* modify it under the terms of the GNU Lesser General Public |
| 5 |
* License as published by the Free Software Foundation; either |
| 6 |
* version 2.1 of the License, or (at your option) any later version. |
| 7 |
* |
| 8 |
* This library is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
* Lesser General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Lesser General Public |
| 14 |
* License along with this library; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
// To exclude this file from the documentation when build-deprecated-api=false. |
| 18 |
_CONFIGINCLUDE(gtkmmconfig.h) |
| 19 |
|
| 20 |
_DEFS(gtkmm,gtk) |
| 21 |
_PINCLUDE(gtkmm/private/hvbox_p.h) |
| 22 |
_PINCLUDE(gtkmm/private/dialog_p.h) |
| 23 |
|
| 24 |
#m4 _PUSH(SECTION_CC_PRE_INCLUDES) |
| 25 |
#undef GTK_DISABLE_DEPRECATED |
| 26 |
#define GDK_DISABLE_DEPRECATION_WARNINGS 1 |
| 27 |
#m4 _POP() |
| 28 |
|
| 29 |
#include <gtkmm/dialog.h> |
| 30 |
#include <gtkmm/box.h> |
| 31 |
|
| 32 |
namespace Gtk |
| 33 |
{ |
| 34 |
|
| 35 |
class GTKMM_API Button; |
| 36 |
class GTKMM_API Entry; |
| 37 |
class GTKMM_API TreeView; |
| 38 |
class GTKMM_API RadioButton; |
| 39 |
|
| 40 |
|
| 41 |
/** A widget for selecting fonts. |
| 42 |
* |
| 43 |
* The Gtk::FontSelection widget lists the available fonts, styles and |
| 44 |
* sizes, allowing the user to select a font. It is used in the |
| 45 |
* Gtk::FontSelectionDialog widget to provide a dialog box for selecting |
| 46 |
* fonts. |
| 47 |
* |
| 48 |
* @deprecated Use FontChooser instead. |
| 49 |
* @ingroup Widgets |
| 50 |
*/ |
| 51 |
class GTKMM_API FontSelection : public VBox |
| 52 |
{ |
| 53 |
_CLASS_GTKOBJECT(FontSelection,GtkFontSelection,GTK_FONT_SELECTION,Gtk::VBox,GtkVBox,,,GTKMM_API) |
| 54 |
_IS_DEPRECATED |
| 55 |
public: |
| 56 |
_CTOR_DEFAULT() |
| 57 |
|
| 58 |
_WRAP_METHOD(TreeView* get_family_list(), gtk_font_selection_get_family_list) |
| 59 |
_WRAP_METHOD(const TreeView* get_family_list() const, gtk_font_selection_get_family_list, constversion) |
| 60 |
|
| 61 |
_WRAP_METHOD(TreeView* get_face_list(), gtk_font_selection_get_face_list) |
| 62 |
_WRAP_METHOD(const TreeView* get_face_list() const, gtk_font_selection_get_face_list, constversion) |
| 63 |
|
| 64 |
_WRAP_METHOD(Entry* get_size_entry(), gtk_font_selection_get_size_entry) |
| 65 |
_WRAP_METHOD(const Entry* get_size_entry() const, gtk_font_selection_get_size_entry, constversion) |
| 66 |
|
| 67 |
_WRAP_METHOD(TreeView* get_size_list(), gtk_font_selection_get_size_list) |
| 68 |
_WRAP_METHOD(const TreeView* get_size_list() const, gtk_font_selection_get_size_list, constversion) |
| 69 |
|
| 70 |
_WRAP_METHOD(Entry* get_preview_entry(), gtk_font_selection_get_preview_entry) |
| 71 |
_WRAP_METHOD(const Entry* get_preview_entry() const, gtk_font_selection_get_preview_entry) |
| 72 |
|
| 73 |
_WRAP_METHOD(Glib::RefPtr<Pango::FontFamily> get_family(), gtk_font_selection_get_family, refreturn) |
| 74 |
_WRAP_METHOD(Glib::RefPtr<const Pango::FontFamily> get_family() const, gtk_font_selection_get_family, refreturn, constversion) |
| 75 |
|
| 76 |
_WRAP_METHOD(Glib::RefPtr<Pango::FontFace> get_face(), gtk_font_selection_get_face, refreturn) |
| 77 |
_WRAP_METHOD(Glib::RefPtr<const Pango::FontFace> get_face() const, gtk_font_selection_get_face, refreturn, constversion) |
| 78 |
|
| 79 |
_WRAP_METHOD(int get_size() const, gtk_font_selection_get_size) |
| 80 |
|
| 81 |
_WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_selection_get_font_name) |
| 82 |
_WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname), gtk_font_selection_set_font_name) |
| 83 |
_WRAP_METHOD(Glib::ustring get_preview_text() const, gtk_font_selection_get_preview_text) |
| 84 |
_WRAP_METHOD(void set_preview_text(const Glib::ustring& text),gtk_font_selection_set_preview_text) |
| 85 |
|
| 86 |
//TODO: Remove these accessors when we can break ABI. |
| 87 |
//They probably all return null now anyway. |
| 88 |
|
| 89 |
//Note: The GdkFont "font" property is deprecated, or should be. |
| 90 |
_WRAP_PROPERTY("font_name", Glib::ustring) |
| 91 |
_WRAP_PROPERTY("preview_text", Glib::ustring) |
| 92 |
}; |
| 93 |
|
| 94 |
/** A dialog box for selecting fonts. |
| 95 |
* |
| 96 |
* The Gtk::FontSelectionDialog widget is a dialog box for selecting a font. |
| 97 |
* |
| 98 |
* A FontSelectionDialog looks like this: |
| 99 |
* @image html fontselectiondialog1.png |
| 100 |
* |
| 101 |
* @deprecated Use FontChooserDialog instead. |
| 102 |
* @ingroup Dialogs |
| 103 |
*/ |
| 104 |
class GTKMM_API FontSelectionDialog : public Dialog |
| 105 |
{ |
| 106 |
_CLASS_GTKOBJECT(FontSelectionDialog,GtkFontSelectionDialog,GTK_FONT_SELECTION_DIALOG,Gtk::Dialog,GtkDialog,,,GTKMM_API) |
| 107 |
_IS_DEPRECATED |
| 108 |
_IGNORE(gtk_font_selection_dialog_get_font_selection) |
| 109 |
_UNMANAGEABLE() |
| 110 |
public: |
| 111 |
|
| 112 |
_CTOR_DEFAULT() |
| 113 |
_WRAP_CTOR(FontSelectionDialog(const Glib::ustring& title), gtk_font_selection_dialog_new) |
| 114 |
|
| 115 |
_WRAP_METHOD(bool set_font_name(const Glib::ustring& fontname),gtk_font_selection_dialog_set_font_name) |
| 116 |
_WRAP_METHOD(Glib::ustring get_font_name() const, gtk_font_selection_dialog_get_font_name) |
| 117 |
_WRAP_METHOD(Glib::ustring get_preview_text() const,gtk_font_selection_dialog_get_preview_text) |
| 118 |
_WRAP_METHOD(void set_preview_text(const Glib::ustring& text), gtk_font_selection_dialog_set_preview_text) |
| 119 |
|
| 120 |
_WRAP_METHOD(Button* get_ok_button(), gtk_font_selection_dialog_get_ok_button) |
| 121 |
_WRAP_METHOD(const Button* get_ok_button() const, gtk_font_selection_dialog_get_ok_button, constversion) |
| 122 |
|
| 123 |
_WRAP_METHOD(Button* get_cancel_button(), gtk_font_selection_dialog_get_cancel_button) |
| 124 |
_WRAP_METHOD(const Button* get_cancel_button() const, gtk_font_selection_dialog_get_cancel_button, constversion) |
| 125 |
}; |
| 126 |
|
| 127 |
} // namespace Gtk |