1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 a widget for selecting fonts.
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkFontSelection widget lists the available fonts, styles and sizes,
10 allowing the user to select a font.
11 It is used in the #GtkFontSelectionDialog widget to provide a dialog box for
15 To set the font which is initially selected, use
16 gtk_font_selection_set_font_name().
19 To get the selected font use gtk_font_selection_get_font()
20 or gtk_font_selection_get_font_name().
23 To change the text which is shown in the preview area, use
24 gtk_font_selection_set_preview_text().
27 <!-- ##### SECTION See_Also ##### -->
32 <term>#GtkFontSelectionDialog</term>
33 <listitem><para>a dialog box which uses #GtkFontSelection.</para></listitem>
39 <!-- ##### STRUCT GtkFontSelection ##### -->
41 The #GtkFontSelection struct contains private data only, and should
42 only be accessed using the functions below.
46 <!-- ##### ARG GtkFontSelection:font ##### -->
51 <!-- ##### ARG GtkFontSelection:font-name ##### -->
56 <!-- ##### ARG GtkFontSelection:preview-text ##### -->
61 <!-- ##### FUNCTION gtk_font_selection_new ##### -->
63 Creates a new #GtkFontSelection.
66 @Returns: a new #GtkFontSelection.
69 <!-- ##### FUNCTION gtk_font_selection_get_font ##### -->
71 Gets the currently-selected font.
74 @fontsel: a #GtkFontSelection.
75 @Returns: the currently-selected font, or NULL if no font is selected.
78 <!-- ##### FUNCTION gtk_font_selection_get_font_name ##### -->
80 Gets the currently-selected font name.
83 @fontsel: a #GtkFontSelection.
87 <!-- ##### FUNCTION gtk_font_selection_set_font_name ##### -->
89 Sets the currently-selected font.
92 @fontsel: a #GtkFontSelection.
93 @fontname: a fontname.
94 @Returns: %TRUE if the font was found.
97 <!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### -->
99 Gets the text displayed in the preview area.
102 @fontsel: a #GtkFontSelection.
103 @Returns: the text displayed in the preview area. This string is
104 owned by the widget and should not be modified or freed.
107 <!-- ##### FUNCTION gtk_font_selection_set_preview_text ##### -->
109 Sets the text displayed in the preview area.
112 @fontsel: a #GtkFontSelection.
113 @text: the text to display in the preview area.