/usr/share/gtk-doc/html/pygtk/class-gtktoolitem.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ToolItem</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" href="class-gtktoolbutton.html" title="gtk.ToolButton"><link rel="next" href="class-gtktoolitemgroup.html" title="gtk.ToolItemGroup"></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.ToolItem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktoolbutton.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktoolitemgroup.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.ToolItem"><a name="class-gtktoolitem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ToolItem</h2><p>gtk.ToolItem — the base class of widgets
that can be added to <a class="link" href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.Toolbar</code></a>
(new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id4001826"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ToolItem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtktoolitem.html#constructor-gtktoolitem" title="Constructor">gtk.ToolItem</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-homogeneous" title="gtk.ToolItem.set_homogeneous">set_homogeneous</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>homogeneous</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-homogeneous" title="gtk.ToolItem.get_homogeneous">get_homogeneous</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-expand" title="gtk.ToolItem.set_expand">set_expand</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-expand" title="gtk.ToolItem.get_expand">get_expand</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-tooltip" title="gtk.ToolItem.set_tooltip">set_tooltip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltips</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_text</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_private</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-use-drag-window" title="gtk.ToolItem.set_use_drag_window">set_use_drag_window</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_drag_window</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-use-drag-window" title="gtk.ToolItem.get_use_drag_window">get_use_drag_window</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-visible-horizontal" title="gtk.ToolItem.set_visible_horizontal">set_visible_horizontal</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_horizontal</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-visible-horizontal" title="gtk.ToolItem.get_visible_horizontal">get_visible_horizontal</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-visible-vertical" title="gtk.ToolItem.set_visible_vertical">set_visible_vertical</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_vertical</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-visible-vertical" title="gtk.ToolItem.get_visible_vertical">get_visible_vertical</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-is-important" title="gtk.ToolItem.set_is_important">set_is_important</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_important</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-is-important" title="gtk.ToolItem.get_is_important">get_is_important</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-icon-size" title="gtk.ToolItem.get_icon_size">get_icon_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-orientation" title="gtk.ToolItem.get_orientation">get_orientation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-toolbar-style" title="gtk.ToolItem.get_toolbar_style">get_toolbar_style</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-relief-style" title="gtk.ToolItem.get_relief_style">get_relief_style</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--retrieve-proxy-menu-item" title="gtk.ToolItem.retrieve_proxy_menu_item">retrieve_proxy_menu_item</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-proxy-menu-item" title="gtk.ToolItem.set_proxy_menu_item">set_proxy_menu_item</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-proxy-menu-item" title="gtk.ToolItem.get_proxy_menu_item">get_proxy_menu_item</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--rebuild-menu" title="gtk.ToolItem.rebuild_menu">rebuild_menu</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-tooltip-markup" title="gtk.ToolItem.set_tooltip_markup">set_tooltip_markup</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>markup</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-tooltip-text" title="gtk.ToolItem.set_tooltip_text">set_tooltip_text</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--toolbar-reconfigured" title="gtk.ToolItem.toolbar_reconfigured">toolbar_reconfigured</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-ellipsize-mode" title="gtk.ToolItem.get_ellipsize_mode">get_ellipsize_mode</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-text-alignment" title="gtk.ToolItem.get_text_alignment">get_text_alignment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-text-orientation" title="gtk.ToolItem.get_text_orientation">get_text_orientation</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-text-size-group" title="gtk.ToolItem.get_text_size_group">get_text_size_group</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id4002578"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
+-- <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem">gtk.ToolItem</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id4002629"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.ToolItem Properties"><a name="properties-gtktoolitem"></a><h2>gtk.ToolItem Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>These properties are available in GTK+ 2.4 and above.</p></div><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"is-important"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toolbar item is
considered important and the toolbar buttons show text in
<code class="literal">gtk.TOOLBAR_BOTH_HORIZ</code> mode. Default value:
<code class="literal">False</code></td></tr><tr valign="top"><td valign="top">"visible-horizontal"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toolbar item is visible
when the toolbar is in a horizontal orientation. Default value:
<code class="literal">True</code></td></tr><tr valign="top"><td valign="top">"visible-vertical"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toolbar item is visible
when the toolbar is in a vertical orientation. Default value:
<code class="literal">True</code></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.ToolItem Style Properties"><a name="style-properties-gtktoolitem"></a><h2>gtk.ToolItem Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.ToolItem Signal Prototypes"><a name="signal-prototypes-gtktoolitem"></a><h2>gtk.ToolItem Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--create-menu-proxy" title='The "create-menu-proxy" gtk.ToolItem Signal'>create-menu-proxy</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--set-tooltip" title='The "set-tooltip" gtk.ToolItem Signal'>set-tooltip</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tooltips</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tip_text</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tip_private</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--toolbar-reconfigured" title='The "toolbar-reconfigured" gtk.ToolItem Signal'>toolbar-reconfigured</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id4003124"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a> is a
widget that can appear on a <a class="link" href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.Toolbar</code></a>. To
create a toolbar item that contains something else than a button, use the
<a class="link" href="class-gtktoolitem.html#constructor-gtktoolitem" title="Constructor">gtk.ToolItem</a>() constructor
then use the <a class="link" href="class-gtkcontainer.html#method-gtkcontainer--add" title="gtk.Container.add"><code class="methodname">gtk.Container.add</code>()</a>
method to add a child widget to the tool item.</p><p>To create and use toolbar items that contain buttons, see the
<a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>,
<a class="link" href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><code class="classname">gtk.ToggleToolButton</code></a>
and <a class="link" href="class-gtkradiotoolbutton.html" title="gtk.RadioToolButton"><code class="classname">gtk.RadioToolButton</code></a>
classes. See the <a class="link" href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.Toolbar</code></a> class
for a description of the toolbar widget.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtktoolitem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.ToolItem</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new empty <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a></p></div><div class="refsect1" title="Methods"><a name="id4003285"></a><h2>Methods</h2><div class="refsect2" title="gtk.ToolItem.set_homogeneous"><a name="method-gtktoolitem--set-homogeneous"></a><h3>gtk.ToolItem.set_homogeneous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_homogeneous</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>homogeneous</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>homogeneous</code></strong> :</span></p></td><td>if <code class="literal">True</code> the tool item is the
same size as other homogeneous items</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_homogeneous</code>() method sets the
homogeneous setting of the tool item to the value of
<em class="parameter"><code>homogeneous</code></em>. If <em class="parameter"><code>homogeneous</code></em> is
<code class="literal">True</code> the tool item is to be allocated the same size as
other homogeneous items. The effect is that all homogeneous items will have
the same width as the widest of the items.</p></div><div class="refsect2" title="gtk.ToolItem.get_homogeneous"><a name="method-gtktoolitem--get-homogeneous"></a><h3>gtk.ToolItem.get_homogeneous</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_homogeneous</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the item is the same
size as other homogeneous items.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_homogeneous</code>() method returns
the setting of the homogeneous setting of the tool item. If
<code class="literal">True</code> the tool item is the same size as other homogeneous
items. See the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-homogeneous" title="gtk.ToolItem.set_homogeneous"><code class="methodname">set_homogeneous()</code></a>
method for more detail.</p></div><div class="refsect2" title="gtk.ToolItem.set_expand"><a name="method-gtktoolitem--set-expand"></a><h3>gtk.ToolItem.set_expand</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_expand</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>If <code class="literal">True</code> the tool item is
allocated extra space when available</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_expand</code>() method sets the expand
setting of the tool item to the value of <em class="parameter"><code>expand</code></em>. If
<em class="parameter"><code>expand</code></em> is <code class="literal">True</code> the tool item is
allocated extra space when there is more room on the toolbar than needed for
the items. The effect is that the item gets bigger when the toolbar gets
bigger and smaller when the toolbar gets smaller.</p></div><div class="refsect2" title="gtk.ToolItem.get_expand"><a name="method-gtktoolitem--get-expand"></a><h3>gtk.ToolItem.get_expand</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_expand</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the tool item is
allocated extra space when available.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_expand</code>() method returns the
value of the expand setting of the tool item. If <code class="literal">True</code> the
tool item is allocated extra space. See the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-expand" title="gtk.ToolItem.set_expand"><code class="methodname">gtk.ToolItem.set_expand()</code></a>
method for more detail.</p></div><div class="refsect2" title="gtk.ToolItem.set_tooltip"><a name="method-gtktoolitem--set-tooltip"></a><h3>gtk.ToolItem.set_tooltip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tooltip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltips</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_text</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_private</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tooltips</code></strong> :</span></p></td><td>The <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
object to be used</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>tip_text</code></strong> :</span></p></td><td>the text to be used as tooltip text for the
tool item or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>tip_private</code></strong> :</span></p></td><td>the text to be used as private tooltip
text or <code class="literal">None</code></td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_tooltip</code>() method sets the <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
object specified by <em class="parameter"><code>tooltips</code></em> to be used for the tool
item with the tooltip text specified by <em class="parameter"><code>tip_text</code></em> and
the private text specified by <em class="parameter"><code>tip_private</code></em>. See the
<a class="link" href="class-gtktooltips.html#method-gtktooltips--set-tip" title="gtk.Tooltips.set_tip"><code class="methodname">gtk.Tooltips.set_tip()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.ToolItem.set_use_drag_window"><a name="method-gtktoolitem--set-use-drag-window"></a><h3>gtk.ToolItem.set_use_drag_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_use_drag_window</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_drag_window</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>use_drag_window</code></strong> :</span></p></td><td>if <code class="literal">True</code> the tool item has a
drag window.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_use_drag_window</code>() method
determines whether the tool item has a drag window according to the value of
<em class="parameter"><code>use_drag_window</code></em>. If
<em class="parameter"><code>use_drag_window</code></em> is <code class="literal">True</code> the
toolitem can be used as a drag source through the <a class="link" href="class-gtkwidget.html#method-gtkwidget--drag-source-set" title="gtk.Widget.drag_source_set"><code class="methodname">gtk.Widget.drag_source_set()</code></a>
method. When the tool item has a drag window it will intercept all events,
even those that would otherwise be sent to a child of the tool item</p></div><div class="refsect2" title="gtk.ToolItem.get_use_drag_window"><a name="method-gtktoolitem--get-use-drag-window"></a><h3>gtk.ToolItem.get_use_drag_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_use_drag_window</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the tool item uses a
drag window.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_use_drag_window</code>() returns the
setting that determines if the tool item has a drag window. See the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-use-drag-window" title="gtk.ToolItem.set_use_drag_window"><code class="methodname">set_use_drag_window()</code></a>
for more information.</p></div><div class="refsect2" title="gtk.ToolItem.set_visible_horizontal"><a name="method-gtktoolitem--set-visible-horizontal"></a><h3>gtk.ToolItem.set_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_horizontal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_horizontal</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_horizontal</code></strong> :</span></p></td><td>if <code class="literal">True</code> the tool item is
visible when in horizontal mode</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_visible_horizontal</code>() method
sets the "visible-horizontal" property to the value of
<em class="parameter"><code>visible_horizontal</code></em>. If
<em class="parameter"><code>visible_horizontal</code></em> is <code class="literal">True</code>, the
tool item is visible when the toolbar is docked horizontally.</p></div><div class="refsect2" title="gtk.ToolItem.get_visible_horizontal"><a name="method-gtktoolitem--get-visible-horizontal"></a><h3>gtk.ToolItem.get_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_horizontal</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the tool item is
visible on toolbars that are docked
horizontally.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_visible_horizontal</code>() method
returns the value of the "visible-horizontal" property. If
"visible-horizontal" is <code class="literal">True</code>, the tool item is visible on
toolbars that are docked horizontally.</p></div><div class="refsect2" title="gtk.ToolItem.set_visible_vertical"><a name="method-gtktoolitem--set-visible-vertical"></a><h3>gtk.ToolItem.set_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_vertical</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_vertical</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_vertical</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the tool item is
visible when the toolbar is in vertical mode</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_visible_vertical</code>() method sets
the "visible-vertical" property to the value of
<em class="parameter"><code>visible_vertical</code></em>. If
<em class="parameter"><code>visible_vertical</code></em> is <code class="literal">True</code>, the tool
item is visible when the toolbar is docked vertically. Some tool items, such
as text entries, are too wide to be useful on a vertically docked
toolbar. If <em class="parameter"><code>visible_vertical</code></em> is
<code class="literal">False</code> the tool item will not appear on toolbars that are
docked vertically.</p></div><div class="refsect2" title="gtk.ToolItem.get_visible_vertical"><a name="method-gtktoolitem--get-visible-vertical"></a><h3>gtk.ToolItem.get_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_vertical</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>True if the tool item is visible when the
toolbar is docked vertically</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_visible_vertical</code>() method
returns the value of the "visible-vertical" property. If "visible-vertical"
is <code class="literal">True</code>, the tool item is visible when the toolbar is
docked vertically. See the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-visible-vertical" title="gtk.ToolItem.set_visible_vertical"><code class="methodname">set_visible_vertical()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.ToolItem.set_is_important"><a name="method-gtktoolitem--set-is-important"></a><h3>gtk.ToolItem.set_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_is_important</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_important</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>is_important</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the tool item
should be considered important</td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_is_important</code>() method sets the
"is-important" property to the value of
<em class="parameter"><code>is_important</code></em>. If <em class="parameter"><code>is_important</code></em>
is <code class="literal">True</code> the tool item should be considered important. The
<a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
class uses this property to determine whether to show its label when the
toolbar style is <code class="literal">gtk.TOOLBAR_BOTH_HORIZ</code>. The result is
that only tool buttons with the "is_important" property set have labels, an
effect known as "priority text".</p></div><div class="refsect2" title="gtk.ToolItem.get_is_important"><a name="method-gtktoolitem--get-is-important"></a><h3>gtk.ToolItem.get_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_is_important</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the tool item is
considered important.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_is_important</code>() method returns
the value of the "is-important" property. If "is-important" is
<code class="literal">True</code>, the tool item is considered important. See the
<a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-is-important" title="gtk.ToolItem.set_is_important"><code class="methodname">set_is_important()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.ToolItem.get_icon_size"><a name="method-gtktoolitem--get-icon-size"></a><h3>gtk.ToolItem.get_icon_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the icon size used for the tool
item</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_icon_size</code>() method returns the
icon size used for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method to find out what size icons they should use. The
return value should be one of: <code class="literal">gtk.ICON_SIZE_MENU</code>,
<code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code>,
<code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code>,
<code class="literal">gtk.ICON_SIZE_BUTTON</code>,
<code class="literal">gtk.ICON_SIZE_DND</code>,
<code class="literal">gtk.ICON_SIZE_DIALOG</code> or an integer value returned from
the <a class="link" href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register"><code class="function">gtk.icon_size_register</code>()</a>
function.</p></div><div class="refsect2" title="gtk.ToolItem.get_orientation"><a name="method-gtktoolitem--get-orientation"></a><h3>gtk.ToolItem.get_orientation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_orientation</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the orientation used for the tool
item</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_orientation</code>() method returns
the orientation used for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method to find out what size icons they should use. The
return value should be either <code class="literal">gtk.ORIENTATION_HORIZONTAL</code>
or <code class="literal">gtk.ORIENTATION_VERTICAL</code>.</p></div><div class="refsect2" title="gtk.ToolItem.get_toolbar_style"><a name="method-gtktoolitem--get-toolbar-style"></a><h3>gtk.ToolItem.get_toolbar_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toolbar_style</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the toolbar style used for the tool
item</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_toolbar_style</code>() method returns
the toolbar style used for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method in the "<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--toolbar-reconfigured" title='The "toolbar-reconfigured" gtk.ToolItem Signal'>toolbar-reconfigured</a>"
signal handler to find out in what style the toolbar is displayed and change
themselves accordingly.</p><p>Possibilities are:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="literal">gtk.TOOLBAR_BOTH</code>, meaning the tool item
should show both an icon and a label, stacked vertically</p></li><li class="listitem"><p><code class="literal">gtk.TOOLBAR_ICONS</code>, meaning the toolbar
shows only icons</p></li><li class="listitem"><p><code class="literal">gtk.TOOLBAR_TEXT</code>, meaning the tool item
should only show text</p></li><li class="listitem"><p><code class="literal">gtk.TOOLBAR_BOTH_HORIZ</code>, meaning the tool
item should show both an icon and a label, arranged horizontally..</p></li></ul></div></div><div class="refsect2" title="gtk.ToolItem.get_relief_style"><a name="method-gtktoolitem--get-relief-style"></a><h3>gtk.ToolItem.get_relief_style</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_relief_style</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the relief style used for the tool
item</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_relief_style</code>() method returns
the relief style of the tool item. See the <a class="link" href="class-gtkbutton.html#method-gtkbutton--set-relief" title="gtk.Button.set_relief"><code class="methodname">gtk.Button.set_relief</code>()</a>
method for more information. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method in the handler of the <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
"<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--toolbar-reconfigured" title='The "toolbar-reconfigured" gtk.ToolItem Signal'>toolbar-reconfigured</a>"
signal to find out the relief style of buttons.</p><p>The return value should be one of:
<code class="literal">gtk.RELIEF_NORMAL</code>, <code class="literal">gtk.RELIEF_HALF</code> or
<code class="literal">gtk.RELIEF_NONE</code>.</p></div><div class="refsect2" title="gtk.ToolItem.retrieve_proxy_menu_item"><a name="method-gtktoolitem--retrieve-proxy-menu-item"></a><h3>gtk.ToolItem.retrieve_proxy_menu_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">retrieve_proxy_menu_item</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a> that is going to appear in the
overflow menu for the tool item</td></tr></tbody></table><div class="note" title="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 <code class="methodname">retrieve_proxy_menu_item</code>() method
returns the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a> that
was last set by the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-proxy-menu-item" title="gtk.ToolItem.set_proxy_menu_item"><code class="methodname">set_proxy_menu_item()</code></a>
method, i.e. the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a> that
is going to appear in the overflow menu.</p></div><div class="refsect2" title="gtk.ToolItem.set_proxy_menu_item"><a name="method-gtktoolitem--set-proxy-menu-item"></a><h3>gtk.ToolItem.set_proxy_menu_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_proxy_menu_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>menu_item_id</code></strong> :</span></p></td><td>a string used to identify
<em class="parameter"><code>menu_item</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>menu_item</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
to be used in the overflow menu or
<code class="literal">None</code></td></tr></tbody></table><div class="note" title="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 <code class="methodname">set_proxy_menu_item</code>() method sets
the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
specified by <em class="parameter"><code>menu_item</code></em> to be used in the toolbar
overflow menu. <em class="parameter"><code>menu_item_id</code></em> is used to identify the
caller of this method and should also be used with the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--get-proxy-menu-item" title="gtk.ToolItem.get_proxy_menu_item"><code class="methodname">get_proxy_menu_item()</code></a>
method. If <em class="parameter"><code>menu_item</code></em> is <code class="literal">None</code> the
tool item will not appear in the overflow menu.</p></div><div class="refsect2" title="gtk.ToolItem.get_proxy_menu_item"><a name="method-gtktoolitem--get-proxy-menu-item"></a><h3>gtk.ToolItem.get_proxy_menu_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_proxy_menu_item</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu_item_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>menu_item_id</code></strong> :</span></p></td><td>a string used to identify the menu
item</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
matching <em class="parameter"><code>menu_item_id</code></em>.</td></tr></tbody></table><div class="note" title="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 <code class="methodname">get_proxy_menu_item</code>() method
returns the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
corresponding to the string specified by <em class="parameter"><code>menu_item_id</code></em>
as passed to the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-proxy-menu-item" title="gtk.ToolItem.set_proxy_menu_item"><code class="methodname">set_proxy_menu_item()</code></a>
method.</p><p>Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should use this method to update their menu item when the <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
changes. Forcing a match with <em class="parameter"><code>menu_item_id</code></em> ensures
that a <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a> will
not inadvertently change a menu item that they did not create.</p></div><div class="refsect2" title="gtk.ToolItem.rebuild_menu"><a name="method-gtktoolitem--rebuild-menu"></a><h3>gtk.ToolItem.rebuild_menu</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">rebuild_menu</span>()</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">rebuild_menu</code>() method ignals to the
toolbar that the overflow menu item has changed. If the overflow menu is
visible when this method it called, the menu will be rebuilt. The method
must be called when the tool item changes what it will do in response to the
"create_menu_proxy" signal.</p></div><div class="refsect2" title="gtk.ToolItem.set_tooltip_markup"><a name="method-gtktoolitem--set-tooltip-markup"></a><h3>gtk.ToolItem.set_tooltip_markup</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tooltip_markup</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>markup</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>markup</code></strong> :</span></p></td><td>markup text to be used as tooltip.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>The <code class="methodname">set_tooltip_markup</code>() method sets the
markup text to be displayed as tooltip on the item. See
<code class="methodname"><a class="link" href="class-gtkwidget.html#method-gtkwidget--set-tooltip-markup" title="gtk.Widget.set_tooltip_markup">gtk.Widget.set_tooltip_markup</a></code>().</p></div><div class="refsect2" title="gtk.ToolItem.set_tooltip_text"><a name="method-gtktoolitem--set-tooltip-text"></a><h3>gtk.ToolItem.set_tooltip_text</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tooltip_text</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>text</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>markup</code></strong> :</span></p></td><td>the text to be used as tooltip.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>The <code class="methodname">set_tooltip_text</code>() method sets the
text to be displayed as tooltip on the item. See
<code class="methodname"><a class="link" href="class-gtkwidget.html#method-gtkwidget--set-tooltip-text" title="gtk.Widget.set_tooltip_text">gtk.Widget.set_tooltip_text</a></code>().</p></div><div class="refsect2" title="gtk.ToolItem.toolbar_reconfigured"><a name="method-gtktoolitem--toolbar-reconfigured"></a><h3>gtk.ToolItem.toolbar_reconfigured</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">toolbar_reconfigured</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
The <code class="methodname">toolbar_reconfigured</code>() method emits the signal
"<a class="link" href="class-gtktoolitem.html#signal-gtktoolitem--toolbar-reconfigured" title='The "toolbar-reconfigured" gtk.ToolItem Signal'>toolbar-reconfigured</a>"
on tool_item.
<a class="link" href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.ToolBar</code></a>
and other
<a class="link" href="class-gtktoolshell.html" title="gtk.ToolShell"><code class="classname">gtk.ToolShell</code></a>
implementations use this method to notify children, when some aspect of their configuration changes.
</p></div><div class="refsect2" title="gtk.ToolItem.get_ellipsize_mode"><a name="method-gtktoolitem--get-ellipsize-mode"></a><h3>gtk.ToolItem.get_ellipsize_mode</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_ellipsize_mode</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>one of the <a class="xref" href="pango-constants.html#pango-ellipsize-mode-constants" title="Pango Ellipsize Mode Constants">Pango Ellipsize Mode Constants</a>
indicating how text should be ellipsized.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">get_ellipsize_mode</code>() method returns the ellipsize mode used
for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method to find out how text should be ellipsized.</p></div><div class="refsect2" title="gtk.ToolItem.get_text_alignment"><a name="method-gtktoolitem--get-text-alignment"></a><h3>gtk.ToolItem.get_text_alignment</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text_alignment</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the horizontal text alignment used for the tool item.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">get_text_alignment</code>() method returns the text alignment used
for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method to find out how text should be aligned.</p></div><div class="refsect2" title="gtk.ToolItem.get_text_orientation"><a name="method-gtktoolitem--get-text-orientation"></a><h3>gtk.ToolItem.get_text_orientation</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text_orientation</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the text orientation used for the tool item.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">get_text_orientation</code>() method returns the text orientation used
for the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method to find out how text should be orientated.</p></div><div class="refsect2" title="gtk.ToolItem.get_text_size_group"><a name="method-gtktoolitem--get-text-size-group"></a><h3>gtk.ToolItem.get_text_size_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_text_size_group</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gtksizegroup.html" title="gtk.SizeGroup"><code class="classname">gtk.SizeGroup</code></a>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.22 and above.</p></div><p>The <code class="methodname">get_text_size_group</code>() method returns the size group used for labels
in the tool item. Custom subclasses of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
should call this method and use the size group for labels.</p></div></div><div class="refsect1" title="Signals"><a name="id4006225"></a><h2>Signals</h2><div class="refsect2" title='The "create-menu-proxy" gtk.ToolItem Signal'><a name="signal-gtktoolitem--create-menu-proxy"></a><h3>The "create-menu-proxy" gtk.ToolItem Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>toolitem</code></em> :</span></p></td><td>the toolitem that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><div class="note" title="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 "create-menu-proxy" signal is emitted when the toolbar is
displaying an overflow menu and is trying to determine if
<em class="parameter"><code>toolitem</code></em> should appear in the overflow menu. In
response <em class="parameter"><code>toolitem</code></em> should either</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>call the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-proxy-menu-item" title="gtk.ToolItem.set_proxy_menu_item"><code class="methodname">set_proxy_menu_item</code>()</a>
method specifying <em class="parameter"><code>menu_item</code></em> as
<code class="literal">None</code> and return <code class="literal">True</code> to indicate that
the item should not appear in the overflow menu</p></li><li class="listitem"><p>call the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-proxy-menu-item" title="gtk.ToolItem.set_proxy_menu_item"><code class="methodname">set_proxy_menu_item</code>()</a>
method with a new menu item and return <code class="literal">True</code>, or</p></li><li class="listitem"><p>return <code class="literal">False</code> to indicate that the signal
was not handled by the item. This means that the item will not appear in the
overflow menu unless a later handler installs a menu item.</p></li></ul></div><p>The toolbar may cache the result of this signal. When the tool
item changes how it will respond to this signal it must call the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--rebuild-menu" title="gtk.ToolItem.rebuild_menu"><code class="methodname">rebuild_menu</code>()</a>)
method to invalidate the cache and ensure that the toolbar rebuilds its
overflow menu.</p></div><div class="refsect2" title='The "set-tooltip" gtk.ToolItem Signal'><a name="signal-gtktoolitem--set-tooltip"></a><h3>The "set-tooltip" gtk.ToolItem Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tooltips</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tip_text</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>tip_private</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>toolitem</code></em> :</span></p></td><td>the toolitem that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tooltips</code></em> :</span></p></td><td>the <a class="link" href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>tip_text</code></em> :</span></p></td><td>the tooltip text</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tip_private</code></em> :</span></p></td><td>the tooltip private text</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the signal was
handled</td></tr></tbody></table><div class="note" title="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 "set-tooltip" signal is emitted when the tool item's tooltip
changes. Application developers can use the <a class="link" href="class-gtktoolitem.html#method-gtktoolitem--set-tooltip" title="gtk.ToolItem.set_tooltip"><code class="methodname">set_tooltip</code>()</a>
method to set the item's tooltip.</p></div><div class="refsect2" title='The "toolbar-reconfigured" gtk.ToolItem Signal'><a name="signal-gtktoolitem--toolbar-reconfigured"></a><h3>The "toolbar-reconfigured" gtk.ToolItem Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolitem</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>toolitem</code></em> :</span></p></td><td>the toolitem that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="note" title="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 "toolbar-reconfigured" signal is emitted when some property
of the toolbar that the item is a child of changes. For custom subclasses of
<a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>, the
default handler of this signal uses the methods:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><a class="link" href="class-gtktoolbar.html#method-gtktoolbar--get-orientation" title="gtk.Toolbar.get_orientation"><code class="methodname">gtk.Toolbar.get_orientation</code>()</a></li><li class="listitem"><a class="link" href="class-gtktoolbar.html#method-gtktoolbar--get-style" title="gtk.Toolbar.get_style"><code class="methodname">gtk.Toolbar.get_style</code>()</a></li><li class="listitem"><a class="link" href="class-gtktoolbar.html#method-gtktoolbar--get-icon-size" title="gtk.Toolbar.get_icon_size"><code class="methodname">gtk.Toolbar.get_icon_size</code>()</a></li><li class="listitem"><a class="link" href="class-gtktoolbar.html#method-gtktoolbar--get-relief-style" title="gtk.Toolbar.get_relief_style"><code class="methodname">gtk.Toolbar.get_relief_style</code>()</a></li></ul></div><p>to find out what the toolbar should look like and change
themselves accordingly.</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-gtktoolbutton.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-gtktoolitemgroup.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ToolButton </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.ToolItemGroup</td></tr></table></div></body></html>
|