1
2@c %start of fragment
3
4@deftp Class <gtk-font-button>
5Derives from @code{<gtk-button>}.
6
7This class defines the following slots:
8
9@table @code
10@item title
11The title of the font selection dialog
12
13@item font-name
14The name of the selected font
15
16@item use-font
17Whether the label is drawn in the selected font
18
19@item use-size
20Whether the label is drawn with the selected font size
21
22@item show-style
23Whether the selected font style is shown in the label
24
25@item show-size
26Whether selected font size is shown in the label
27
28@end table
29
30@end deftp
31
32@defop Signal <gtk-font-button> font-set
33The ::font-set signal is emitted when the user selects a font. When handling
34this signal, use @code{gtk-font-button-get-font-name} to find out which font was
35just selected.
36
37Note that this signal is only emitted when the @emph{user} changes the font. If
38you need to react to programmatic font changes as well, use the
39notify::font-name signal.
40
41Since 2.4
42
43@end defop
44
45@deffn Function gtk-font-button-new  @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
46Creates a new font picker widget.
47
48@table @var
49@item ret
50a new font picker widget.
51
52@end table
53
54Since 2.4
55
56@end deffn
57
58@deffn Function gtk-font-button-new-with-font  (fontname@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
59Creates a new font picker widget.
60
61@table @var
62@item fontname
63Name of font to display in font selection dialog
64
65@item ret
66a new font picker widget.
67
68@end table
69
70Since 2.4
71
72@end deffn
73
74@deffn Function gtk-font-button-set-font-name  (self@tie{}@code{<gtk-font-button>}) (fontname@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool})
75@deffnx Method set-font-name
76Sets or updates the currently-displayed font in font picker dialog.
77
78@table @var
79@item font-button
80a @code{<gtk-font-button>}
81
82@item fontname
83Name of font to display in font selection dialog
84
85@item ret
86Return value of @code{gtk-font-selection-dialog-set-font-name} if the font
87selection dialog exists, otherwise @samp{@code{#f}}.
88
89@end table
90
91Since 2.4
92
93@end deffn
94
95@deffn Function gtk-font-button-get-font-name  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{mchars})
96@deffnx Method get-font-name
97Retrieves the name of the currently selected font.
98
99@table @var
100@item font-button
101a @code{<gtk-font-button>}
102
103@item ret
104an internal copy of the font name which must not be freed.
105
106@end table
107
108Since 2.4
109
110@end deffn
111
112@deffn Function gtk-font-button-set-show-style  (self@tie{}@code{<gtk-font-button>}) (show_style@tie{}@code{bool})
113@deffnx Method set-show-style
114If @var{show-style} is @samp{@code{#t}}, the font style will be displayed along
115with name of the selected font.
116
117@table @var
118@item font-button
119a @code{<gtk-font-button>}
120
121@item show-style
122@samp{@code{#t}} if font style should be displayed in label.
123
124@end table
125
126Since 2.4
127
128@end deffn
129
130@deffn Function gtk-font-button-get-show-style  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{bool})
131@deffnx Method get-show-style
132Returns whether the name of the font style will be shown in the label.
133
134@table @var
135@item font-button
136a @code{<gtk-font-button>}
137
138@item ret
139whether the font style will be shown in the label.
140
141@end table
142
143Since 2.4
144
145@end deffn
146
147@deffn Function gtk-font-button-set-show-size  (self@tie{}@code{<gtk-font-button>}) (show_size@tie{}@code{bool})
148@deffnx Method set-show-size
149If @var{show-size} is @samp{@code{#t}}, the font size will be displayed along
150with the name of the selected font.
151
152@table @var
153@item font-button
154a @code{<gtk-font-button>}
155
156@item show-size
157@samp{@code{#t}} if font size should be displayed in dialog.
158
159@end table
160
161Since 2.4
162
163@end deffn
164
165@deffn Function gtk-font-button-get-show-size  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{bool})
166@deffnx Method get-show-size
167Returns whether the font size will be shown in the label.
168
169@table @var
170@item font-button
171a @code{<gtk-font-button>}
172
173@item ret
174whether the font size will be shown in the label.
175
176@end table
177
178Since 2.4
179
180@end deffn
181
182@deffn Function gtk-font-button-set-use-font  (self@tie{}@code{<gtk-font-button>}) (use_font@tie{}@code{bool})
183@deffnx Method set-use-font
184If @var{use-font} is @samp{@code{#t}}, the font name will be written using the
185selected font.
186
187@table @var
188@item font-button
189a @code{<gtk-font-button>}
190
191@item use-font
192If @samp{@code{#t}}, font name will be written using font chosen.
193
194@end table
195
196Since 2.4
197
198@end deffn
199
200@deffn Function gtk-font-button-get-use-font  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{bool})
201@deffnx Method get-use-font
202Returns whether the selected font is used in the label.
203
204@table @var
205@item font-button
206a @code{<gtk-font-button>}
207
208@item ret
209whether the selected font is used in the label.
210
211@end table
212
213Since 2.4
214
215@end deffn
216
217@deffn Function gtk-font-button-set-use-size  (self@tie{}@code{<gtk-font-button>}) (use_size@tie{}@code{bool})
218@deffnx Method set-use-size
219If @var{use-size} is @samp{@code{#t}}, the font name will be written using the
220selected size.
221
222@table @var
223@item font-button
224a @code{<gtk-font-button>}
225
226@item use-size
227If @samp{@code{#t}}, font name will be written using the selected size.
228
229@end table
230
231Since 2.4
232
233@end deffn
234
235@deffn Function gtk-font-button-get-use-size  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{bool})
236@deffnx Method get-use-size
237Returns whether the selected size is used in the label.
238
239@table @var
240@item font-button
241a @code{<gtk-font-button>}
242
243@item ret
244whether the selected size is used in the label.
245
246@end table
247
248Since 2.4
249
250@end deffn
251
252@deffn Function gtk-font-button-set-title  (self@tie{}@code{<gtk-font-button>}) (title@tie{}@code{mchars})
253@deffnx Method set-title
254Sets the title for the font selection dialog.
255
256@table @var
257@item font-button
258a @code{<gtk-font-button>}
259
260@item title
261a string containing the font selection dialog title
262
263@end table
264
265Since 2.4
266
267@end deffn
268
269@deffn Function gtk-font-button-get-title  (self@tie{}@code{<gtk-font-button>}) @result{}@tie{} (ret@tie{}@code{mchars})
270@deffnx Method get-title
271Retrieves the title of the font selection dialog.
272
273@table @var
274@item font-button
275a @code{<gtk-font-button>}
276
277@item ret
278an internal copy of the title string which must not be freed.
279
280@end table
281
282Since 2.4
283
284@end deffn
285
286
287@c %end of fragment
288