]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkbutton.sgml
2.7.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtkbutton.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkButton
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A widget that creates a signal when clicked on
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkButton widget is generally used to attach a function to that
10 is called when the button is pressed.  The various signals and how to use
11 them are outlined below.
12 </para>
13 <para>
14 The #GtkButton widget can hold any valid child widget.  That is it can
15 hold most any other standard #GtkWidget.  The most commonly used child is
16 the #GtkLabel.
17 </para>
18
19 <!-- ##### SECTION See_Also ##### -->
20 <para>
21
22 </para>
23
24 <!-- ##### SECTION Stability_Level ##### -->
25
26
27 <!-- ##### STRUCT GtkButton ##### -->
28 <para>
29 This should not be accessed directly.  Use the accessor functions below.
30 </para>
31
32
33 <!-- ##### SIGNAL GtkButton::activate ##### -->
34 <para>
35
36 </para>
37
38 @button: the object which received the signal.
39
40 <!-- ##### SIGNAL GtkButton::clicked ##### -->
41 <para>
42 Emitted when a button clicked on by the mouse and the cursor stays on the
43 button.  If the cursor is not on the button when the mouse button is released,
44 the signal is not emitted.
45 </para>
46
47 @button: the object which received the signal.
48
49 <!-- ##### SIGNAL GtkButton::enter ##### -->
50 <para>
51 Emitted when the mouse cursor enters the region of the button.
52 </para>
53
54 @button: the object which received the signal.
55
56 <!-- ##### SIGNAL GtkButton::leave ##### -->
57 <para>
58 Emitted when the mouse cursor leaves the region of the button.
59 </para>
60
61 @button: the object which received the signal.
62
63 <!-- ##### SIGNAL GtkButton::pressed ##### -->
64 <para>
65 Emitted when the button is initially pressed.
66 </para>
67
68 @button: the object which received the signal.
69
70 <!-- ##### SIGNAL GtkButton::released ##### -->
71 <para>
72 Emitted when a button which is pressed is released, no matter where the
73 mouse cursor is.
74 </para>
75
76 @button: the object which received the signal.
77
78 <!-- ##### ARG GtkButton:focus-on-click ##### -->
79 <para>
80
81 </para>
82
83 <!-- ##### ARG GtkButton:image ##### -->
84 <para>
85
86 </para>
87
88 <!-- ##### ARG GtkButton:label ##### -->
89 <para>
90
91 </para>
92
93 <!-- ##### ARG GtkButton:relief ##### -->
94 <para>
95
96 </para>
97
98 <!-- ##### ARG GtkButton:use-stock ##### -->
99 <para>
100
101 </para>
102
103 <!-- ##### ARG GtkButton:use-underline ##### -->
104 <para>
105
106 </para>
107
108 <!-- ##### ARG GtkButton:xalign ##### -->
109 <para>
110
111 </para>
112
113 <!-- ##### ARG GtkButton:yalign ##### -->
114 <para>
115
116 </para>
117
118 <!-- ##### ARG GtkButton:child-displacement-x ##### -->
119 <para>
120
121 </para>
122
123 <!-- ##### ARG GtkButton:child-displacement-y ##### -->
124 <para>
125
126 </para>
127
128 <!-- ##### ARG GtkButton:default-border ##### -->
129 <para>
130
131 </para>
132
133 <!-- ##### ARG GtkButton:default-outside-border ##### -->
134 <para>
135
136 </para>
137
138 <!-- ##### ARG GtkButton:displace-focus ##### -->
139 <para>
140
141 </para>
142
143 <!-- ##### FUNCTION gtk_button_new ##### -->
144 <para>
145 Creates a new #GtkButton widget. To add a child widget to the button,
146 use gtk_container_add().
147 </para>
148
149 @Returns: The newly created #GtkButton widget.
150
151
152 <!-- ##### FUNCTION gtk_button_new_with_label ##### -->
153 <para>
154 Creates a #GtkButton widget with a #GtkLabel child containing the given
155 text.
156 </para>
157
158 @label: The text you want the #GtkLabel to hold.
159 @Returns: The newly created #GtkButton widget.
160
161
162 <!-- ##### FUNCTION gtk_button_new_with_mnemonic ##### -->
163 <para>
164
165 </para>
166
167 @label: 
168 @Returns: 
169
170
171 <!-- ##### FUNCTION gtk_button_new_from_stock ##### -->
172 <para>
173
174 </para>
175
176 @stock_id: 
177 @Returns: 
178
179
180 <!-- ##### FUNCTION gtk_button_pressed ##### -->
181 <para>
182 Emits a #GtkButton::pressed signal to the given #GtkButton.
183 </para>
184
185 @button: The #GtkButton you want to send the signal to.
186
187
188 <!-- ##### FUNCTION gtk_button_released ##### -->
189 <para>
190 Emits a #GtkButton::released signal to the given #GtkButton.
191 </para>
192
193 @button: The #GtkButton you want to send the signal to.
194
195
196 <!-- ##### FUNCTION gtk_button_clicked ##### -->
197 <para>
198 Emits a #GtkButton::clicked signal to the given #GtkButton.
199 </para>
200
201 @button: The #GtkButton you want to send the signal to.
202
203
204 <!-- ##### FUNCTION gtk_button_enter ##### -->
205 <para>
206 Emits a #GtkButton::enter signal to the given #GtkButton.
207 </para>
208
209 @button: The #GtkButton you want to send the signal to.
210
211
212 <!-- ##### FUNCTION gtk_button_leave ##### -->
213 <para>
214 Emits a #GtkButton::leave signal to the given #GtkButton.
215 </para>
216
217 @button: The #GtkButton you want to send the signal to.
218
219
220 <!-- ##### FUNCTION gtk_button_set_relief ##### -->
221 <para>
222 Sets the relief style of the edges of the given #GtkButton widget.
223 Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
224 The default style is, as one can guess, GTK_RELIEF_NORMAL.
225
226 <!-- FIXME: put pictures of each style -->
227 </para>
228
229 @button: The #GtkButton you want to set relief styles of.
230 @newstyle: The GtkReliefStyle as described above.
231
232
233 <!-- ##### FUNCTION gtk_button_get_relief ##### -->
234 <para>
235 Returns the current relief style of the given #GtkButton.
236 </para>
237
238 @button: The #GtkButton you want the #GtkReliefStyle from.
239 @Returns: The current #GtkReliefStyle
240
241
242 <!-- ##### FUNCTION gtk_button_get_label ##### -->
243 <para>
244
245 </para>
246
247 @button: 
248 @Returns: 
249
250
251 <!-- ##### FUNCTION gtk_button_set_label ##### -->
252 <para>
253
254 </para>
255
256 @button: 
257 @label: 
258
259
260 <!-- ##### FUNCTION gtk_button_get_use_stock ##### -->
261 <para>
262
263 </para>
264
265 @button: 
266 @Returns: 
267
268
269 <!-- ##### FUNCTION gtk_button_set_use_stock ##### -->
270 <para>
271
272 </para>
273
274 @button: 
275 @use_stock: 
276 <!-- # Unused Parameters # -->
277 @value: 
278
279
280 <!-- ##### FUNCTION gtk_button_get_use_underline ##### -->
281 <para>
282
283 </para>
284
285 @button: 
286 @Returns: 
287
288
289 <!-- ##### FUNCTION gtk_button_set_use_underline ##### -->
290 <para>
291
292 </para>
293
294 @button: 
295 @use_underline: 
296 <!-- # Unused Parameters # -->
297 @value: 
298
299
300 <!-- ##### FUNCTION gtk_button_set_focus_on_click ##### -->
301 <para>
302
303 </para>
304
305 @button: 
306 @focus_on_click: 
307
308
309 <!-- ##### FUNCTION gtk_button_get_focus_on_click ##### -->
310 <para>
311
312 </para>
313
314 @button: 
315 @Returns: 
316
317
318 <!-- ##### FUNCTION gtk_button_set_alignment ##### -->
319 <para>
320
321 </para>
322
323 @button: 
324 @xalign: 
325 @yalign: 
326
327
328 <!-- ##### FUNCTION gtk_button_get_alignment ##### -->
329 <para>
330
331 </para>
332
333 @button: 
334 @xalign: 
335 @yalign: 
336
337
338 <!-- ##### FUNCTION gtk_button_set_image ##### -->
339 <para>
340
341 </para>
342
343 @button: 
344 @image: 
345
346
347 <!-- ##### FUNCTION gtk_button_get_image ##### -->
348 <para>
349
350 </para>
351
352 @button: 
353 @Returns: 
354
355