File: class-gtktoolbar.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (449 lines) | stat: -rw-r--r-- 105,364 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Toolbar</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><link rel="next" href="class-gtktoolbutton.html" title="gtk.ToolButton"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Toolbar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktoggletoolbutton.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktoolbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktoolbar"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Toolbar</h2><p>gtk.Toolbar &#8212; a bar holding buttons and other widgets.</p></div><div class="refsect1" lang="en"><a name="id3563198"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Toolbar</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtktoolbar.html#constructor-gtktoolbar" title="Constructor">gtk.Toolbar</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert" title="gtk.Toolbar.insert">insert</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pos</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-item-index" title="gtk.Toolbar.get_item_index">get_item_index</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>item</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-n-items" title="gtk.Toolbar.get_n_items">get_n_items</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-nth-item" title="gtk.Toolbar.get_nth_item">get_nth_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>n</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-drop-index" title="gtk.Toolbar.get_drop_index">get_drop_index</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>x</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>y</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-drop-highlight-item" title="gtk.Toolbar.set_drop_highlight_item">set_drop_highlight_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tool_item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-show-arrow" title="gtk.Toolbar.set_show_arrow">set_show_arrow</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>show_arrow</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-show-arrow" title="gtk.Toolbar.get_show_arrow">get_show_arrow</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-relief-style" title="gtk.Toolbar.get_relief_style">get_relief_style</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--append-item" title="gtk.Toolbar.append_item">append_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--prepend-item" title="gtk.Toolbar.prepend_item">prepend_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert-item" title="gtk.Toolbar.insert_item">insert_item</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert-stock" title="gtk.Toolbar.insert_stock">insert_stock</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--append-space" title="gtk.Toolbar.append_space">append_space</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--prepend-space" title="gtk.Toolbar.prepend_space">prepend_space</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert-space" title="gtk.Toolbar.insert_space">insert_space</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--remove-space" title="gtk.Toolbar.remove_space">remove_space</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--append-element" title="gtk.Toolbar.append_element">append_element</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--prepend-element" title="gtk.Toolbar.prepend_element">prepend_element</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert-element" title="gtk.Toolbar.insert_element">insert_element</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--append-widget" title="gtk.Toolbar.append_widget">append_widget</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--prepend-widget" title="gtk.Toolbar.prepend_widget">prepend_widget</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--insert-widget" title="gtk.Toolbar.insert_widget">insert_widget</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-orientation" title="gtk.Toolbar.set_orientation">set_orientation</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>orientation</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-style" title="gtk.Toolbar.set_style">set_style</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>style</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-icon-size" title="gtk.Toolbar.set_icon_size">set_icon_size</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--set-tooltips" title="gtk.Toolbar.set_tooltips">set_tooltips</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>enable</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--unset-style" title="gtk.Toolbar.unset_style">unset_style</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--unset-icon-size" title="gtk.Toolbar.unset_icon_size">unset_icon_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-orientation" title="gtk.Toolbar.get_orientation">get_orientation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-style" title="gtk.Toolbar.get_style">get_style</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-icon-size" title="gtk.Toolbar.get_icon_size">get_icon_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoolbar.html#method-gtktoolbar--get-tooltips" title="gtk.Toolbar.get_tooltips">get_tooltips</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3564251"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a href="class-gtktoolbar.html" title="gtk.Toolbar">gtk.Toolbar</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3564293"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"orientation"</td><td valign="top">Read-Write</td><td valign="top">The orientation of the toolbar:
<tt class="literal">gtk.ORIENTATION_HORIZONTAL</tt> or
<tt class="literal">gtk.ORIENTATION_VERTICAL</tt></td></tr><tr valign="top"><td valign="top">"show-arrow"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt> an arrow should be shown
if the toolbar doesn't fit. Available in GTK+ 2.4 and above.</td></tr><tr valign="top"><td valign="top">"toolbar-style"</td><td valign="top">Read-Write</td><td valign="top">The toolbar style:
<tt class="literal">gtk.TOOLBAR_ICONS</tt>, <tt class="literal">gtk.TOOLBAR_TEXT</tt>,
<tt class="literal">gtk.TOOLBAR_BOTH</tt> or
<tt class="literal">gtk.TOOLBAR_BOTH_HORIZ</tt></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3564424"></a><h2>Child Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"expand"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the item should receive
extra space when the toolbar grows. Available in GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3564521"></a><h2>Style Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"button-relief"</td><td valign="top">Read</td><td valign="top">The type of bevel around toolbar buttons:
<tt class="literal">gtk.RELIEF_NORMAL</tt>, <tt class="literal">gtk.RELIEF_HALF</tt> or
<tt class="literal">gtk.RELIEF_NONE</tt></td></tr><tr valign="top"><td valign="top">"internal-padding"</td><td valign="top">Read</td><td valign="top">The amount of border space between the toolbar shadow
and the buttons</td></tr><tr valign="top"><td valign="top">"shadow-type"</td><td valign="top">Read</td><td valign="top">The style of bevel around the toolbar:
<tt class="literal">gtk.SHADOW_NONE</tt>, <tt class="literal">gtk.SHADOW_IN</tt>,
<tt class="literal">gtk.SHADOW_OUT</tt>, <tt class="literal">gtk.SHADOW_ETCHED_IN</tt>
or <tt class="literal">gtk.SHADOW_ETCHED_OUT</tt></td></tr><tr valign="top"><td valign="top">"space-size"</td><td valign="top">Read</td><td valign="top">The size of spacers</td></tr><tr valign="top"><td valign="top">"space-style"</td><td valign="top">Read</td><td valign="top">The spacer style:
<tt class="literal">gtk.TOOLBAR_SPACE_EMPTY</tt> or
<tt class="literal">gtk.TOOLBAR_SPACE_LINE</tt></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3564698"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtktoolbar.html#signal-gtktoolbar--orientation-changed" title='The "orientation-changed" gtk.Toolbar Signal'>orientation-changed</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>orientation</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktoolbar.html#signal-gtktoolbar--popup-context-menu" title='The "popup-context-menu" gtk.Toolbar Signal'>popup-context-menu</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>x</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>y</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>button</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtktoolbar.html#signal-gtktoolbar--style-changed" title='The "style-changed" gtk.Toolbar Signal'>style-changed</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>style</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3564857"></a><h2>Description</h2><p>A <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a> is a
subclass of <a href="class-gtkcontainer.html" title="gtk.Container"><tt class="classname">gtk.Container</tt></a>
that holds and manages a set of buttons and widgets in a horizontal or
vertical bar. A <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a> is
usually used in an application as an alternative to a menu to provide a more
direct means to activate dialogs or set options. Items in the toolbar can be
visibly grouped by adding space between the elements. The toolbar style can
be set to display only icons, only text or both icons and text. Each toolbar
item has an associated <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> to
provide a brief description of the items purpose.</p><p>In <tt class="literal">PyGTK</tt> 2.4 the interface of the <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a> has
changed to take advantage of the new <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
widgets.  The following describes the new features.</p><p>A toolbar can contain instances of a subclass of <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
(<a href="class-gtktoolbutton.html" title="gtk.ToolButton"><tt class="classname">gtk.ToolButton</tt></a>,
<a href="class-gtkradiotoolbutton.html" title="gtk.RadioToolButton"><tt class="classname">gtk.RadioToolButton</tt></a>,
<a href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><tt class="classname">gtk.ToggleToolButton</tt></a>
and <a href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><tt class="classname">gtk.SeparatorToolItem</tt></a>). To
add a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a> to
the a toolbar, use the <a href="class-gtktoolbar.html#method-gtktoolbar--insert" title="gtk.Toolbar.insert"><tt class="methodname">insert</tt>()</a>
method. To remove an item from the toolbar use the <a href="class-gtkcontainer.html#method-gtkcontainer--remove" title="gtk.Container.remove"><tt class="methodname">gtk.Container.remove</tt>()</a>
method. To add a button to the toolbar, add an instance of <a href="class-gtktoolbutton.html" title="gtk.ToolButton"><tt class="classname">gtk.ToolButton</tt></a>. Toolbar
items can be visually grouped by adding instances of <a href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><tt class="classname">gtk.SeparatorToolItem</tt></a>
to the toolbar. If a <a href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><tt class="classname">gtk.SeparatorToolItem</tt></a>
has the "expand" property set to <tt class="literal">TRUE</tt> and the "draw"
property set to <tt class="literal">FALSE</tt> the effect is to force all
following items to the end of the toolbar. Creating a context menu for the
toolbar can be done by connecting to the "popup-context-menu" signal.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktoolbar"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.Toolbar</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a>
widget</td></tr></tbody></table><p>Creates a new <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a>
widget.</p></div><div class="refsect1" lang="en"><a name="id3565094"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert"></a><h3>gtk.Toolbar.insert</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>pos</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>item</tt></b>:</span></td><td>a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>pos</tt></b>:</span></td><td>the position of the new item</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert</tt>() method inserts the <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
specified by <i class="parameter"><tt>item</tt></i> into the toolbar at the position
specified by <i class="parameter"><tt>pos</tt></i>. If <i class="parameter"><tt>pos</tt></i> is 0
<i class="parameter"><tt>item</tt></i> is prepended to the start of the toolbar. If
<i class="parameter"><tt>pos</tt></i> is negative, <i class="parameter"><tt>item</tt></i> is
appended to the end of the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-item-index"></a><h3>gtk.Toolbar.get_item_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_item_index</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>item</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>item</tt></b>:</span></td><td>a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
	  that is a child of the toolbar</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the position of item on the
	  toolbar.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_item_index</tt>() method returns the
position (starting from 0) on the toolbar of the <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
specified by <i class="parameter"><tt>item</tt></i>.  It is an error
if <i class="parameter"><tt>item</tt></i> is not a child of the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-n-items"></a><h3>gtk.Toolbar.get_n_items</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_n_items</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the number of items on the
	  toolbar</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_n_items</tt>() method returns the
number of items on the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-nth-item"></a><h3>gtk.Toolbar.get_nth_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_nth_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>n</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>n</tt></b>:</span></td><td>a position on the toolbar</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>The <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
	  on the toolbar at position <i class="parameter"><tt>n</tt></i>, or
	  <tt class="literal">None</tt> if there isn't an item at position
	  <i class="parameter"><tt>n</tt></i></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_nth_item</tt>() method returns the
toolbar <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a> at
the position specified by <i class="parameter"><tt>n</tt></i>, or
<tt class="literal">None</tt> if the toolbar does not contain an item at position
<i class="parameter"><tt>n</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-drop-index"></a><h3>gtk.Toolbar.get_drop_index</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_drop_index</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>x</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>y</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>x</tt></b>:</span></td><td>the x coordinate of a point on the
	  toolbar</td></tr><tr><td><span class="term"><b class="parameter"><tt>y</tt></b>:</span></td><td>the y coordinate of a point on the
	  toolbar</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>The toolbar position corresponding to the point
	  (<i class="parameter"><tt>x</tt></i>,
	  <i class="parameter"><tt>y</tt></i>).</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_drop_index</tt>() method returns the
position on the toolbar corresponding to the point specified by
<i class="parameter"><tt>x</tt></i> and <i class="parameter"><tt>y</tt></i>. This is useful when
dragging items to the toolbar. This method returns the position index where
a new item should be inserted.</p><p>The <i class="parameter"><tt>x</tt></i> and <i class="parameter"><tt>y</tt></i>
coordinates are relative to the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-drop-highlight-item"></a><h3>gtk.Toolbar.set_drop_highlight_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_drop_highlight_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>tool_item</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>index</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>tool_item</tt></b>:</span></td><td>a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>,
	  or <tt class="literal">None</tt> to turn off
	  highlighting</td></tr><tr><td><span class="term"><b class="parameter"><tt>index</tt></b>:</span></td><td>a position index on the toolbar</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">set_drop_highlight_item</tt>() method
highlights the toolbar to give an idea of what it would look like if the
<a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
specified by <i class="parameter"><tt>tool_item</tt></i> was added at the position
specified by <i class="parameter"><tt>index</tt></i>. If
<i class="parameter"><tt>tool_item</tt></i> is <tt class="literal">None</tt>, highlighting is
turned off and <i class="parameter"><tt>index</tt></i> is ignored.</p><p>The <i class="parameter"><tt>tool_item</tt></i> passed to this method must
not be part of any widget hierarchy. When an item is set as drop highlight
item it can not added to any widget hierarchy or used as highlight item for
another toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-show-arrow"></a><h3>gtk.Toolbar.set_show_arrow</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_show_arrow</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>show_arrow</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>show_arrow</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, show an arrow to
	  indicate menu overflow</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">set_show_arrow</tt>() method sets the
"show-arrow" property to the value of <i class="parameter"><tt>show_arrow</tt></i>. If
<i class="parameter"><tt>show_arrow</tt></i> is <tt class="literal">TRUE</tt> an arrow is
displayed (for an overflow menu) when the toolbar doesn't have room for all
items on it. Items that are not displayed due to a lack of room are
available through the overflow menu.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-show-arrow"></a><h3>gtk.Toolbar.get_show_arrow</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_show_arrow</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if an overflow menu can
	  be used</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_show_arrow</tt>() method returns the
value of the "show-arrow" property. If "show-arrow" is
<tt class="literal">TRUE</tt> the toolbar has an overflow menu.  See the <a href="class-gtktoolbar.html#method-gtktoolbar--set-show-arrow" title="gtk.Toolbar.set_show_arrow"><tt class="methodname">set_show_arrow()</tt></a>
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-relief-style"></a><h3>gtk.Toolbar.get_relief_style</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_relief_style</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the relief style of buttons on the
	  toolbar</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">get_relief_style</tt>() method returns
the relief style of buttons on the toolbar. See the <a href="class-gtkbutton.html#method-gtkbutton--set-relief" title="gtk.Button.set_relief"><tt class="methodname">gtk.Button.set_relief()</tt></a>
method for more information. The return value will be one of:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">gtk.RELIEF_NORMAL</tt></li><li><tt class="literal">gtk.RELIEF_HALF</tt></li><li><tt class="literal">gtk.RELIEF_NONE</tt></li></ul></div></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--append-item"></a><h3>gtk.Toolbar.append_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span><span class="initializer">=None</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a>
widget</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">append_item</tt>() method adds a new
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> to
the end (right or bottom) of the toolbar with:</p><div class="itemizedlist"><ul type="disc"><li>the label specified by
<i class="parameter"><tt>text</tt></i>,</li><li>the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively and</li><li>an icon (or any <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>)
specified by <i class="parameter"><tt>icon</tt></i>.</li></ul></div><p>A reference to the new button is returned. When the button is
clicked the function or method specified by <i class="parameter"><tt>callback</tt></i>
will be called with the user data specified by
<i class="parameter"><tt>user_data</tt></i>. All or any of the arguments can have the
value <i class="parameter"><tt>None</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--prepend-item"></a><h3>gtk.Toolbar.prepend_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">prepend_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a>
widget</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">prepend_item</tt>() method adds a new
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> to
the beginning (left or top) of the toolbar with:</p><div class="itemizedlist"><ul type="disc"><li>the label specified by
<i class="parameter"><tt>text</tt></i>,</li><li>the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively and</li><li>an icon (or any <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>)
specified by <i class="parameter"><tt>icon</tt></i>.</li></ul></div><p>A reference to the new button is returned. When the button is
clicked the function or method specified by <i class="parameter"><tt>callback</tt></i>
will be called with the user data specified by
<i class="parameter"><tt>user_data</tt></i>. All or any of the arguments can have the
value <i class="parameter"><tt>None</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert-item"></a><h3>gtk.Toolbar.insert_item</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_item</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>The position to insert the button or -1 to
append</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a>
widget</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert_item</tt>() method inserts a new
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> the
toolbar at the position specified by <i class="parameter"><tt>position</tt></i>
with:</p><div class="itemizedlist"><ul type="disc"><li>the label specified by
<i class="parameter"><tt>text</tt></i>,</li><li>the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively and</li><li>an icon (or any <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>)
specified by <i class="parameter"><tt>icon</tt></i>.</li></ul></div><p>A reference to the new button is returned. When the button is
clicked the function or method specified by <i class="parameter"><tt>callback</tt></i>
will be called with the user data specified by
<i class="parameter"><tt>user_data</tt></i>. All or any of the arguments (except
<i class="parameter"><tt>position</tt></i>) can have the value
<i class="parameter"><tt>None</tt></i>. If <i class="parameter"><tt>position</tt></i> is negative
the button will be appended to the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert-stock"></a><h3>gtk.Toolbar.insert_stock</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_stock</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>stock_id</tt></b>:</span></td><td>the ID of the stock item to use as the button
label and icon</td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>The position to insert the button or -1 to
append</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a>
widget</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert_stock</tt>() method inserts a new
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> the
toolbar at the position specified by <i class="parameter"><tt>position</tt></i>
with:</p><div class="itemizedlist"><ul type="disc"><li>the stock item specified by
<i class="parameter"><tt>stock_id</tt></i> used for the label text and icon,</li><li>the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively.</li></ul></div><p>A reference to the new button is returned. When the button is
clicked the function or method specified by <i class="parameter"><tt>callback</tt></i>
will be called with the user data specified by
<i class="parameter"><tt>user_data</tt></i>. All or any of the arguments (except
<i class="parameter"><tt>position</tt></i>) can have the value
<i class="parameter"><tt>None</tt></i>. If <i class="parameter"><tt>position</tt></i> is negative
the button will be appended to the toolbar. If
<i class="parameter"><tt>stock_id</tt></i> is not a known stock item ID, it's inserted
verbatim, except that underscores are used to mark mnemonic
accelerators.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--append-space"></a><h3>gtk.Toolbar.append_space</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_space</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">append_space</tt>() method appends a
space to the end of the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--prepend-space"></a><h3>gtk.Toolbar.prepend_space</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">prepend_space</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">prepend_space</tt>() method prepends a
space to the beginning of the toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert-space"></a><h3>gtk.Toolbar.insert_space</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_space</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>The position to insert the space or -1 to
append</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert_space</tt>() method inserts a
space at the specified <i class="parameter"><tt>position</tt></i> in the
toolbar.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--remove-space"></a><h3>gtk.Toolbar.remove_space</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">remove_space</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the index of the space to
remove.</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">remove_space</tt>() method removes a
space from the specified <i class="parameter"><tt>position</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--append-element"></a><h3>gtk.Toolbar.append_element</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_element</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>type</tt></b>:</span></td><td>the type of <i class="parameter"><tt>widget</tt></i> - one
of: <tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt> or
<tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a widget or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new toolbar element as a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>.</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">append_element</tt>() method adds a new
element of the specified <i class="parameter"><tt>type</tt></i> to the end (right or
bottom) of the toolbar with the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively. The behavior of
the method depends on the type of element being added:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></span></td><td>The specified <i class="parameter"><tt>widget</tt></i> is the
element added to the toolbar. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>callback</tt></i> and
<i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> to
add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtktogglebutton.html" title="gtk.ToggleButton"><tt class="classname">gtk.ToggleButton</tt></a> 
to add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
to add to the toolbar. The <a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
specified by <i class="parameter"><tt>widget</tt></i> is used to set the group for the
radiobutton. If <i class="parameter"><tt>widget</tt></i> is <tt class="literal">None</tt> a
new radiobutton group is created. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt></span></td><td>A space element is added to the toolbar. The
<i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>tooltip_text</tt></i>,
<i class="parameter"><tt>tooltip_private_text</tt></i>, <i class="parameter"><tt>callback</tt></i>
and <i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr></tbody></table><p>The <i class="parameter"><tt>text</tt></i>, <i class="parameter"><tt>icon</tt></i>,
<i class="parameter"><tt>callback</tt></i>, <i class="parameter"><tt>user_data</tt></i>,
<i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> arguments may have the value
<i class="parameter"><tt>None</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--prepend-element"></a><h3>gtk.Toolbar.prepend_element</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">prepend_element</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>type</tt></b>:</span></td><td>the type of <i class="parameter"><tt>widget</tt></i> - one
of: <tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt> or
<tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a widget or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new toolbar element as a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>.</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">prepend_element</tt>() method adds a new
element of the specified <i class="parameter"><tt>type</tt></i> to the beginning (left
or top) of the toolbar with the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively. The behavior of
the method depends on the type of element being added:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></span></td><td>The widget specified by <i class="parameter"><tt>widget</tt></i>
is the element added to the toolbar, otherwise <i class="parameter"><tt>widget</tt></i>
should be <tt class="literal">None</tt>. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>callback</tt></i> and
<i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> to
add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtktogglebutton.html" title="gtk.ToggleButton"><tt class="classname">gtk.ToggleButton</tt></a> 
to add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
to add to the toolbar. The <a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
specified by <i class="parameter"><tt>widget</tt></i> is used to set the group for the
radiobutton. If <i class="parameter"><tt>widget</tt></i> is <tt class="literal">None</tt> a
new radiobutton group is created. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt></span></td><td>A space element is added to the toolbar. The
<i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>tooltip_text</tt></i>,
<i class="parameter"><tt>tooltip_private_text</tt></i>, <i class="parameter"><tt>callback</tt></i>
and <i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr></tbody></table><p>The <i class="parameter"><tt>text</tt></i>, <i class="parameter"><tt>icon</tt></i>,
<i class="parameter"><tt>callback</tt></i>, <i class="parameter"><tt>user_data</tt></i>,
<i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> arguments may have the value
<i class="parameter"><tt>None</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert-element"></a><h3>gtk.Toolbar.insert_element</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_element</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>type</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>callback</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>user_data</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>type</tt></b>:</span></td><td>the type of <i class="parameter"><tt>widget</tt></i> - one
of: <tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt>,
<tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt> or
<tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a widget or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the text label or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>icon</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>callback</tt></b>:</span></td><td>a callback function or method or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>user_data</tt></b>:</span></td><td>a user data object or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the position to insert the new element
at.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the new toolbar element as a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>.</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert_element</tt>() method adds a new
element of the specified <i class="parameter"><tt>type</tt></i> at the specified
<i class="parameter"><tt>position</tt></i> in the toolbar with the <a href="class-gtktooltips.html" title="gtk.Tooltips"><tt class="classname">gtk.Tooltips</tt></a> text
and private text specified by <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> respectively. The behavior of
the method depends on the type of element being added:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_WIDGET</tt></span></td><td>The widget specified by <i class="parameter"><tt>widget</tt></i>
is the element added to the toolbar, otherwise <i class="parameter"><tt>widget</tt></i>
should be <tt class="literal">None</tt>. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>callback</tt></i> and
<i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_BUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkbutton.html" title="gtk.Button"><tt class="classname">gtk.Button</tt></a> to
add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_TOGGLEBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtktogglebutton.html" title="gtk.ToggleButton"><tt class="classname">gtk.ToggleButton</tt></a> 
to add to the toolbar. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal. The <i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_RADIOBUTTON</tt></span></td><td>The string specified by <i class="parameter"><tt>text</tt></i> and
the <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a>
specified by <i class="parameter"><tt>icon</tt></i> are used to create the label for a
<a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
to add to the toolbar. The <a href="class-gtkradiobutton.html" title="gtk.RadioButton"><tt class="classname">gtk.RadioButton</tt></a>
specified by <i class="parameter"><tt>widget</tt></i> is used to set the group for the
radiobutton. If <i class="parameter"><tt>widget</tt></i> is <tt class="literal">None</tt> a
new radiobutton group is created. The function or method specified by
<i class="parameter"><tt>callback</tt></i> and the object specified by
<i class="parameter"><tt>user_data</tt></i> are connected to the button's "clicked"
signal.</td></tr><tr><td><span class="term"><tt class="literal">gtk.TOOLBAR_CHILD_SPACE</tt></span></td><td>A space element is added to the toolbar. The
<i class="parameter"><tt>widget</tt></i> argument must have the value
<tt class="literal">None</tt>. The <i class="parameter"><tt>text</tt></i>,
<i class="parameter"><tt>icon</tt></i>, <i class="parameter"><tt>tooltip_text</tt></i>,
<i class="parameter"><tt>tooltip_private_text</tt></i>, <i class="parameter"><tt>callback</tt></i>
and <i class="parameter"><tt>user_data</tt></i> arguments are ignored.</td></tr></tbody></table><p>The <i class="parameter"><tt>text</tt></i>, <i class="parameter"><tt>icon</tt></i>,
<i class="parameter"><tt>callback</tt></i>, <i class="parameter"><tt>user_data</tt></i>,
<i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> arguments may have the value
<i class="parameter"><tt>None</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--append-widget"></a><h3>gtk.Toolbar.append_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">append_widget</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> to add to
the toolbar.</td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">append_widget</tt>() method adds the
specified <i class="parameter"><tt>widget</tt></i> to the end (right or bottom) of the
toolbar. <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> specify the tooltip text and
private text respectively.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--prepend-widget"></a><h3>gtk.Toolbar.prepend_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">prepend_widget</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> to add to
the toolbar.</td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">prepend_widget</tt>() method adds the
specified <i class="parameter"><tt>widget</tt></i> to the start (left or top) of the
toolbar. <i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> specify the tooltip text and
private text respectively.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--insert-widget"></a><h3>gtk.Toolbar.insert_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">insert_widget</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>widget</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>tooltip_private_text</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>position</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>widget</tt></b>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a> to add to
the toolbar.</td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_text</tt></b>:</span></td><td>the tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>tooltip_private_text</tt></b>:</span></td><td>the private tooltip text or
<tt class="literal">None</tt></td></tr><tr><td><span class="term"><b class="parameter"><tt>position</tt></b>:</span></td><td>the position to insert this widget
at.</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">insert_widget</tt>() method adds the
specified <i class="parameter"><tt>widget</tt></i> at the specified
<i class="parameter"><tt>position</tt></i> in the toolbar.
<i class="parameter"><tt>tooltip_text</tt></i> and
<i class="parameter"><tt>tooltip_private_text</tt></i> specify the tooltip text and
private text respectively.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-orientation"></a><h3>gtk.Toolbar.set_orientation</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_orientation</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>orientation</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>orientation</tt></b>:</span></td><td>the new orientation either
<tt class="literal">gtk.ORIENTATION_HORIZONTAL</tt> or
<tt class="literal">gtk.ORIENTATION_VERTICAL</tt></td></tr></tbody></table><p>The <tt class="methodname">set_orientation</tt>() method sets the
"orientation" property to the value of <i class="parameter"><tt>orientation</tt></i>.
The value of orientation is either
<tt class="literal">gtk.ORIENTATION_HORIZONTAL</tt> or
<tt class="literal">gtk.ORIENTATION_VERTICAL</tt></p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-style"></a><h3>gtk.Toolbar.set_style</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_style</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>style</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>style</tt></b>:</span></td><td>the new style - one of:
<tt class="literal">gtk.TOOLBAR_ICONS</tt>, <tt class="literal">gtk.TOOLBAR_TEXT</tt>,
<tt class="literal">gtk.TOOLBAR_BOTH</tt> or
<tt class="literal">gtk.TOOLBAR_BOTH_HORIZ</tt></td></tr></tbody></table><p>The <tt class="methodname">set_style</tt>() method sets the
"toolbar-style" property to the value of <i class="parameter"><tt>style</tt></i>. The
value of <i class="parameter"><tt>style</tt></i> must be one of the <a href="gtk-constants.html#gtk-toolbar-style-constants">GTK Toolbar Style Constants</a>. Setting the style
overrides the user preferences for the toolbar style.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>A <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a> label
will not be displayed if the toolbar style is
<tt class="literal">gtk.TOOLBAR_BOTH_HORIZ</tt> and the <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
"is-important" property is <tt class="literal">FALSE</tt> (the default). See the
<a href="class-gtktoolitem.html#method-gtktoolitem--set-is-important" title="gtk.ToolItem.set_is_important"><tt class="methodname">gtk.ToolItem.set_is_important</tt>()</a>
method for more information.</p></div></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-icon-size"></a><h3>gtk.Toolbar.set_icon_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_icon_size</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>icon_size</tt></b>:</span></td><td>The size of stock icons in the toolbar - one
of: <tt class="literal">gtk.ICON_SIZE_MENU</tt>,
<tt class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</tt>,
<tt class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</tt>,
<tt class="literal">gtk.ICON_SIZE_BUTTON</tt>,
<tt class="literal">gtk.ICON_SIZE_DND</tt> or
<tt class="literal">gtk.ICON_SIZE_DIALOG</tt></td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">set_icon_size</tt>() method sets the
size of stock icons in the toolbar to the value specified by
<i class="parameter"><tt>icon_size</tt></i>. The value of
<i class="parameter"><tt>icon_size</tt></i> must be one of:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">gtk.ICON_SIZE_MENU</tt></li><li><tt class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_BUTTON</tt></li><li><tt class="literal">gtk.ICON_SIZE_DND</tt>, or</li><li><tt class="literal">gtk.ICON_SIZE_DIALOG</tt></li></ul></div><p>This method can be called both before and after adding the
icons. Setting the icon size will override the user preferences for the
default icon size.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--set-tooltips"></a><h3>gtk.Toolbar.set_tooltips</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_tooltips</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>enable</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>enable</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> tooltips should be
used</td></tr></tbody></table><p>The <tt class="methodname">set_tooltips</tt>() method enables or
disables tooltips for the toolbar depending on the value of
<i class="parameter"><tt>enable</tt></i>. If <i class="parameter"><tt>enable</tt></i> is
<tt class="literal">TRUE</tt>, tooltips will be used.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--unset-style"></a><h3>gtk.Toolbar.unset_style</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unset_style</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">unset_style</tt>() method unsets a
toolbar style set with the <a href="class-gtktoolbar.html#method-gtktoolbar--set-style" title="gtk.Toolbar.set_style"><tt class="methodname">set_style</tt>()</a> 
method, allowing the user preferences to determine the toolbar style.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--unset-icon-size"></a><h3>gtk.Toolbar.unset_icon_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">unset_icon_size</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.4 and above</p></div><p>The <tt class="methodname">unset_icon_size</tt>() method unsets
toolbar icon size set with the <a href="class-gtktoolbar.html#method-gtktoolbar--set-icon-size" title="gtk.Toolbar.set_icon_size"><tt class="methodname">set_icon_size</tt>()</a>, 
allowing the user preferences to determine the icon size.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-orientation"></a><h3>gtk.Toolbar.get_orientation</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_orientation</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the orientation</td></tr></tbody></table><p>The <tt class="methodname">get_orientation</tt>() method returns
the value of the "orientation" property that determines the current
orientation of the toolbar. See the <a href="class-gtktoolbar.html#method-gtktoolbar--set-orientation" title="gtk.Toolbar.set_orientation"><tt class="methodname">set_orientation</tt>()</a> 
method for more details.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-style"></a><h3>gtk.Toolbar.get_style</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_style</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the current toolbar style</td></tr></tbody></table><p>The <tt class="methodname">get_style</tt>() method returns the
value of the "toolbar-style" property. See the <a href="class-gtktoolbar.html#method-gtktoolbar--set-style" title="gtk.Toolbar.set_style"><tt class="methodname">set_style</tt>()</a> 
method for more details.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-icon-size"></a><h3>gtk.Toolbar.get_icon_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon_size</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the current icon size for the icons on the
toolbar.</td></tr></tbody></table><p>The <tt class="methodname">get_icon_size</tt>() method returns the
current icon size for the toolbar. See the <a href="class-gtktoolbar.html#method-gtktoolbar--set-icon-size" title="gtk.Toolbar.set_icon_size"><tt class="methodname">set_icon_size</tt>()</a> 
method for more details.</p></div><div class="refsect2" lang="en"><a name="method-gtktoolbar--get-tooltips"></a><h3>gtk.Toolbar.get_tooltips</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_tooltips</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if tooltips are
enabled</td></tr></tbody></table><p>The <tt class="methodname">get_tooltips</tt>() method returns
<tt class="literal">TRUE</tt> if tooltips are enabled. See the <a href="class-gtktoolbar.html#method-gtktoolbar--set-tooltips" title="gtk.Toolbar.set_tooltips"><tt class="methodname">set_tooltips</tt>()</a> 
method for more details.</p></div></div><div class="refsect1" lang="en"><a name="id3570767"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktoolbar--orientation-changed"></a><h3>The "orientation-changed" gtk.Toolbar Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>orientation</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>toolbar</tt></i>:</span></td><td>the toolbar that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>orientation</tt></i>:</span></td><td>the new orientation</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "orientation-changed" signal is emitted when the
<i class="parameter"><tt>orientation</tt></i> of <i class="parameter"><tt>toolbar</tt></i> is
changed.</p></div><div class="refsect2" lang="en"><a name="signal-gtktoolbar--popup-context-menu"></a><h3>The "popup-context-menu" gtk.Toolbar Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>x</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>y</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>button</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>toolbar</tt></i>:</span></td><td>the toolbar that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>x</tt></i>:</span></td><td>the x coordinate of the mouse
event</td></tr><tr><td><span class="term"><i class="parameter"><tt>y</tt></i>:</span></td><td>the u coordinate of the mouse
event</td></tr><tr><td><span class="term"><i class="parameter"><tt>button</tt></i>:</span></td><td>the number of the mouse button</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal was
	  handled</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in GTK+ 2.4 and above.</p></div><p>The "popup-context-menu" signal is emitted when the user
right-clicks the toolbar or uses the keybinding to display a popup
menu. Application developers should handle this signal if they want to
display a context menu on the toolbar. The context-menu should appear at the
coordinates given by <i class="parameter"><tt>x</tt></i> and
<i class="parameter"><tt>y</tt></i>. The mouse button number is given by the
<i class="parameter"><tt>button</tt></i> parameter. If the menu was popped up using the
keyboard, <i class="parameter"><tt>button</tt></i> is -1.</p></div><div class="refsect2" lang="en"><a name="signal-gtktoolbar--style-changed"></a><h3>The "style-changed" gtk.Toolbar Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toolbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>style</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>toolbar</tt></i>:</span></td><td>the toolbar that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>style</tt></i>:</span></td><td>the new style</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "style-changed" signal is emitted when the
<i class="parameter"><tt>style</tt></i> of <i class="parameter"><tt>toolbar</tt></i> is
changed.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtktoggletoolbutton.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtktoolbutton.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ToggleToolButton</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.ToolButton</td></tr></table></div></body></html>