]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkfontsel.sgml
=== Released 2.3.1 ===
[~andy/gtk] / docs / reference / gtk / tmpl / gtkfontsel.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkFontSelection
3
4 <!-- ##### SECTION Short_Description ##### -->
5 a widget for selecting fonts.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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
12 selecting fonts.
13 </para>
14 <para>
15 To set the font which is initially selected, use
16 gtk_font_selection_set_font_name().
17 </para>
18 <para>
19 To get the selected font use gtk_font_selection_get_font()
20 or gtk_font_selection_get_font_name().
21 </para>
22 <para>
23 To change the text which is shown in the preview area, use
24 gtk_font_selection_set_preview_text().
25 </para>
26
27 <!-- ##### SECTION See_Also ##### -->
28 <para>
29 <variablelist>
30
31 <varlistentry>
32 <term>#GtkFontSelectionDialog</term>
33 <listitem><para>a dialog box which uses #GtkFontSelection.</para></listitem>
34 </varlistentry>
35
36 </variablelist>
37 </para>
38
39 <!-- ##### STRUCT GtkFontSelection ##### -->
40 <para>
41 The #GtkFontSelection struct contains private data only, and should
42 only be accessed using the functions below.
43 </para>
44
45
46 <!-- ##### ARG GtkFontSelection:font ##### -->
47 <para>
48
49 </para>
50
51 <!-- ##### ARG GtkFontSelection:font-name ##### -->
52 <para>
53
54 </para>
55
56 <!-- ##### ARG GtkFontSelection:preview-text ##### -->
57 <para>
58
59 </para>
60
61 <!-- ##### FUNCTION gtk_font_selection_new ##### -->
62 <para>
63 Creates a new #GtkFontSelection.
64 </para>
65
66 @Returns: a new #GtkFontSelection.
67
68
69 <!-- ##### FUNCTION gtk_font_selection_get_font ##### -->
70 <para>
71 Gets the currently-selected font.
72 </para>
73
74 @fontsel: a #GtkFontSelection.
75 @Returns: the currently-selected font, or NULL if no font is selected.
76
77
78 <!-- ##### FUNCTION gtk_font_selection_get_font_name ##### -->
79 <para>
80 Gets the currently-selected font name.
81 </para>
82
83 @fontsel: a #GtkFontSelection.
84 @Returns: 
85
86
87 <!-- ##### FUNCTION gtk_font_selection_set_font_name ##### -->
88 <para>
89 Sets the currently-selected font.
90 </para>
91
92 @fontsel: a #GtkFontSelection.
93 @fontname: a fontname.
94 @Returns: %TRUE if the font was found.
95
96
97 <!-- ##### FUNCTION gtk_font_selection_get_preview_text ##### -->
98 <para>
99 Gets the text displayed in the preview area.
100 </para>
101
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.
105
106
107 <!-- ##### FUNCTION gtk_font_selection_set_preview_text ##### -->
108 <para>
109 Sets the text displayed in the preview area.
110 </para>
111
112 @fontsel: a #GtkFontSelection.
113 @text: the text to display in the preview area.
114
115