]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkfontseldlg.sgml
Check that the fontsel has a screen assigned before doing anything. This
[~andy/gtk] / docs / reference / gtk / tmpl / gtkfontseldlg.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkFontSelectionDialog
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A dialog box for selecting fonts
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkFontSelectionDialog widget is a dialog box for selecting a font.
10 </para>
11 <para>
12 To set the font which is initially selected, use
13 gtk_font_selection_dialog_set_font_name().
14 </para>
15 <para>
16 To get the selected font use gtk_font_selection_dialog_get_font_name().
17 </para>
18 <para>
19 To change the text which is shown in the preview area, use
20 gtk_font_selection_dialog_set_preview_text().
21 </para>
22
23 <!-- ##### SECTION See_Also ##### -->
24 <para>
25 <variablelist>
26
27 <varlistentry>
28 <term>#GtkFontSelection</term>
29 <listitem><para>the underlying widget for selecting
30 fonts.</para></listitem>
31 <term>#GtkDialog</term>
32 <listitem><para>the parent class of GtkFontSelectionDialog</para></listitem>
33 </varlistentry>
34
35 </variablelist>
36 </para>
37
38 <!-- ##### SECTION Stability_Level ##### -->
39
40
41 <!-- ##### STRUCT GtkFontSelectionDialog ##### -->
42
43
44 @ok_button: The OK button of the dialog
45 @apply_button: The Apply button of the dialog. This button is hidden
46 by default but you can show/hide it
47 @cancel_button: The Cancel button of the dialog
48
49 <!-- ##### FUNCTION gtk_font_selection_dialog_new ##### -->
50 <para>
51 Creates a new #GtkFontSelectionDialog.
52 </para>
53
54 @title: the title of the dialog box.
55 @Returns: a new #GtkFontSelectionDialog.
56
57
58 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font ##### -->
59 <para>
60 Gets the currently-selected font.
61 </para>
62
63 @fsd: a #GtkFontSelectionDialog.
64 @Returns: the currently-selected font, or %NULL if no font is selected.
65
66
67 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### -->
68 <para>
69 </para>
70
71 @fsd: 
72 @Returns: 
73
74
75 <!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### -->
76 <para>
77 Sets the currently-selected font.
78 </para>
79
80 @fsd: a #GtkFontSelectionDialog.
81 @fontname: a fontname.
82 @Returns: %TRUE if the font was found.
83
84
85 <!-- ##### FUNCTION gtk_font_selection_dialog_get_preview_text ##### -->
86 <para>
87 Gets the text displayed in the preview area.
88 </para>
89
90 @fsd: a #GtkFontSelectionDialog.
91 @Returns: the text displayed in the preview area. This string is owned
92    by the widget and should not be modified or freed.
93
94
95 <!-- ##### FUNCTION gtk_font_selection_dialog_set_preview_text ##### -->
96 <para>
97 Sets the text displayed in the preview area.
98 </para>
99
100 @fsd: a #GtkFontSelectionDialog.
101 @text: the text to display in the preview area.
102
103