1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A dialog box for selecting fonts
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkFontSelectionDialog widget is a dialog box for selecting a font.
12 To set the font which is initially selected, use
13 gtk_font_selection_dialog_set_font_name().
16 To get the selected font use gtk_font_selection_dialog_get_font_name().
19 To change the text which is shown in the preview area, use
20 gtk_font_selection_dialog_set_preview_text().
23 <refsect2 id="GtkFontSelectionDialog-BUILDER-UI">
24 <title>GtkFontSelectionDialog as GtkBuildable</title>
26 The GtkFontSelectionDialog implementation of the GtkBuildable interface
27 exposes the embedded #GtkFontSelection as internal child with the
28 name "font_selection". It also exposes the buttons with the names
29 "ok_button", "cancel_button" and "apply_button".
33 <!-- ##### SECTION See_Also ##### -->
38 <term>#GtkFontSelection</term>
39 <listitem><para>the underlying widget for selecting
40 fonts.</para></listitem>
41 <term>#GtkDialog</term>
42 <listitem><para>the parent class of GtkFontSelectionDialog</para></listitem>
48 <!-- ##### SECTION Stability_Level ##### -->
51 <!-- ##### STRUCT GtkFontSelectionDialog ##### -->
54 @ok_button: The OK button of the dialog
55 @apply_button: The Apply button of the dialog. This button is hidden
56 by default but you can show/hide it
57 @cancel_button: The Cancel button of the dialog
59 <!-- ##### FUNCTION gtk_font_selection_dialog_new ##### -->
61 Creates a new #GtkFontSelectionDialog.
64 @title: the title of the dialog box.
65 @Returns: a new #GtkFontSelectionDialog.
68 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font ##### -->
70 Gets the currently-selected font.
73 @fsd: a #GtkFontSelectionDialog.
74 @Returns: the currently-selected font, or %NULL if no font is selected.
77 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### -->
85 <!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### -->
87 Sets the currently-selected font.
90 @fsd: a #GtkFontSelectionDialog.
91 @fontname: a fontname.
92 @Returns: %TRUE if the font was found.
95 <!-- ##### FUNCTION gtk_font_selection_dialog_get_preview_text ##### -->
97 Gets the text displayed in the preview area.
100 @fsd: a #GtkFontSelectionDialog.
101 @Returns: the text displayed in the preview area. This string is owned
102 by the widget and should not be modified or freed.
105 <!-- ##### FUNCTION gtk_font_selection_dialog_set_preview_text ##### -->
107 Sets the text displayed in the preview area.
110 @fsd: a #GtkFontSelectionDialog.
111 @text: the text to display in the preview area.