]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkfontseldlg.sgml
Document GtkBuilder UI definitions
[~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 <refsect2 id="GtkFontSelectionDialog-BUILDER-UI">
24 <title>GtkFontSelectionDialog as GtkBuildable</title>
25 <para>
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".
30 </para>
31 </refsect2>
32
33 <!-- ##### SECTION See_Also ##### -->
34 <para>
35 <variablelist>
36
37 <varlistentry>
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>
43 </varlistentry>
44
45 </variablelist>
46 </para>
47
48 <!-- ##### SECTION Stability_Level ##### -->
49
50
51 <!-- ##### STRUCT GtkFontSelectionDialog ##### -->
52
53
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
58
59 <!-- ##### FUNCTION gtk_font_selection_dialog_new ##### -->
60 <para>
61 Creates a new #GtkFontSelectionDialog.
62 </para>
63
64 @title: the title of the dialog box.
65 @Returns: a new #GtkFontSelectionDialog.
66
67
68 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font ##### -->
69 <para>
70 Gets the currently-selected font.
71 </para>
72
73 @fsd: a #GtkFontSelectionDialog.
74 @Returns: the currently-selected font, or %NULL if no font is selected.
75
76
77 <!-- ##### FUNCTION gtk_font_selection_dialog_get_font_name ##### -->
78 <para>
79 </para>
80
81 @fsd: 
82 @Returns: 
83
84
85 <!-- ##### FUNCTION gtk_font_selection_dialog_set_font_name ##### -->
86 <para>
87 Sets the currently-selected font.
88 </para>
89
90 @fsd: a #GtkFontSelectionDialog.
91 @fontname: a fontname.
92 @Returns: %TRUE if the font was found.
93
94
95 <!-- ##### FUNCTION gtk_font_selection_dialog_get_preview_text ##### -->
96 <para>
97 Gets the text displayed in the preview area.
98 </para>
99
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.
103
104
105 <!-- ##### FUNCTION gtk_font_selection_dialog_set_preview_text ##### -->
106 <para>
107 Sets the text displayed in the preview area.
108 </para>
109
110 @fsd: a #GtkFontSelectionDialog.
111 @text: the text to display in the preview area.
112
113