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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.UIManager</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-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><link rel="next" href="class-gtkvbox.html" title="gtk.VBox"></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.UIManager</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktreeviewcolumn.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkvbox.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkuimanager"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.UIManager</h2><p>gtk.UIManager — construct menus and toolbars from an XML
description (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3613853"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.UIManager</span></span>(<span class="ooclass"><span class="classname"><a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkuimanager.html#constructor-gtkuimanager" title="Constructor">gtk.UIManager</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--set-add-tearoffs" title="gtk.UIManager.set_add_tearoffs">set_add_tearoffs</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>add_tearoffs</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-add-tearoffs" title="gtk.UIManager.get_add_tearoffs">get_add_tearoffs</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--insert-action-group" title="gtk.UIManager.insert_action_group">insert_action_group</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>action_group</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-gtkuimanager.html#method-gtkuimanager--remove-action-group" title="gtk.UIManager.remove_action_group">remove_action_group</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>action_group</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-action-groups" title="gtk.UIManager.get_action_groups">get_action_groups</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-accel-group" title="gtk.UIManager.get_accel_group">get_accel_group</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget">get_widget</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-toplevels" title="gtk.UIManager.get_toplevels">get_toplevels</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>types</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-action" title="gtk.UIManager.get_action">get_action</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--add-ui-from-string" title="gtk.UIManager.add_ui_from_string">add_ui_from_string</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>buffer</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--add-ui-from-file" title="gtk.UIManager.add_ui_from_file">add_ui_from_file</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--add-ui" title="gtk.UIManager.add_ui">add_ui</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>merge_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>action</tt></b></span></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>top</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui">remove_ui</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>merge_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--get-ui" title="gtk.UIManager.get_ui">get_ui</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--ensure-update" title="gtk.UIManager.ensure_update">ensure_update</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkuimanager.html#method-gtkuimanager--new-merge-id" title="gtk.UIManager.new_merge_id">new_merge_id</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3614242"></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-gtkuimanager.html" title="gtk.UIManager">gtk.UIManager</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3614265"></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">"add-tearoffs"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, regular menus have tearoff
menu items. Note that this only affects regular menus. Generated popup menus
never have tearoff menu items. Available in <tt class="literal">GTK+</tt> 2.4 and
above.</td></tr><tr valign="top"><td valign="top">"ui"</td><td valign="top">Read-Write</td><td valign="top">An XML string describing the merged UI.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3614363"></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-gtkuimanager.html#signal-gtkuimanager--actions-changed" title='The "actions-changed" gtk.UIManager Signal'>actions-changed</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</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-gtkuimanager.html#signal-gtkuimanager--add-widget" title='The "add-widget" gtk.UIManager Signal'>add-widget</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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-gtkuimanager.html#signal-gtkuimanager--connect-proxy" title='The "connect-proxy" gtk.UIManager Signal'>connect-proxy</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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-gtkuimanager.html#signal-gtkuimanager--disconnect-proxy" title='The "disconnect-proxy" gtk.UIManager Signal'>disconnect-proxy</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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-gtkuimanager.html#signal-gtkuimanager--post-activate" title='The "post-activate" gtk.UIManager Signal'>post-activate</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</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-gtkuimanager.html#signal-gtkuimanager--pre-activate" title='The "pre-activate" gtk.UIManager Signal'>pre-activate</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</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="id3614654"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This object is available in PyGTK 2.4 and above.</p></div><p>A <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a>
constructs a user interface (menus and toolbars) from one or more UI
definitions, which reference actions from one or more action groups.</p><div class="refsect2" lang="en"><a name="XML-UI"></a><h3>UI Definitions</h3><p>The UI definitions are specified in an XML format which can be
roughly described by the following DTD.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<!ELEMENT ui (menubar|toolbar|popup|accelerator)* >
<!ELEMENT menubar (menuitem|separator|placeholder|menu)* >
<!ELEMENT menu (menuitem|separator|placeholder|menu)* >
<!ELEMENT popup (menuitem|separator|placeholder|menu)* >
<!ELEMENT toolbar (toolitem|separator|placeholder)* >
<!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
<!ELEMENT menuitem EMPTY >
<!ELEMENT toolitem EMPTY >
<!ELEMENT separator EMPTY >
<!ELEMENT accelerator EMPTY >
<!ATTLIST menubar name #IMPLIED >
<!ATTLIST toolbar name #IMPLIED >
<!ATTLIST popup name #IMPLIED >
<!ATTLIST placeholder name #IMPLIED >
<!ATTLIST menu name #IMPLIED
action #REQUIRED
position (top|bot) #IMPLIED >
<!ATTLIST menuitem name #IMPLIED
action #REQUIRED
position (top|bot) #IMPLIED >
<!ATTLIST toolitem name #IMPLIED
action #REQUIRED
position (top|bot) #IMPLIED >
<!ATTLIST accelerator name #IMPLIED
action #REQUIRED >
</pre></td></tr></table><p>There are some additional restrictions beyond those specified in
the DTD, e.g. every toolitem must have a toolbar in its ancestry and every
menuitem must have a menubar or popup in its ancestry. Since a GMarkup
parser is used to parse the UI description, it must not only be valid XML,
but valid GMarkup. If a name is not specified, it defaults to the action. If
an action is not specified either, the element name is used.</p><div class="example"><a name="id3614732"></a><p class="title"><b>Example1.A UI definition</b></p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<ui>
<menubar>
<menu name="FileMenu" action="FileMenuAction">
<menuitem name="New" action="New2Action" />
<placeholder name="FileMenuAdditions" />
</menu>
<menu name="JustifyMenu" action="JustifyMenuAction">
<menuitem name="Left" action="justify-left"/>
<menuitem name="Centre" action="justify-center"/>
<menuitem name="Right" action="justify-right"/>
<menuitem name="Fill" action="justify-fill"/>
</menu>
</menubar>
<toolbar action="toolbar1">
<placeholder name="JustifyToolItems">
<separator/>
<toolitem name="Left" action="justify-left"/>
<toolitem name="Centre" action="justify-center"/>
<toolitem name="Right" action="justify-right"/>
<toolitem name="Fill" action="justify-fill"/>
<separator/>
</placeholder>
</toolbar>
</ui>
</pre></td></tr></table></div><p>The constructed widget hierarchy is very similar to the element
tree of the XML, with the exception that placeholders are merged into their
parents. The correspondence of XML elements to widgets should be almost
obvious:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">menubar</span></td><td>a <a href="class-gtkmenubar.html" title="gtk.MenuBar"><tt class="classname">gtk.MenuBar</tt></a></td></tr><tr><td><span class="term">toolbar</span></td><td>a <a href="class-gtktoolbar.html" title="gtk.Toolbar"><tt class="classname">gtk.Toolbar</tt></a></td></tr><tr><td><span class="term">popup</span></td><td>a toplevel <a href="class-gtkmenu.html" title="gtk.Menu"><tt class="classname">gtk.Menu</tt></a></td></tr><tr><td><span class="term">menu</span></td><td>a <a href="class-gtkmenu.html" title="gtk.Menu"><tt class="classname">gtk.Menu</tt></a>
attached to a menuitem</td></tr><tr><td><span class="term">menuitem</span></td><td>a <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a>
subclass, the exact type depends on the action</td></tr><tr><td><span class="term">toolitem</span></td><td>a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
subclass, the exact type depends on the action</td></tr><tr><td><span class="term">separator</span></td><td>a <a href="class-gtkseparatormenuitem.html" title="gtk.SeparatorMenuItem"><tt class="classname">gtk.SeparatorMenuItem</tt></a>
or <a href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><tt class="classname">gtk.SeparatorToolItem</tt></a></td></tr><tr><td><span class="term">accelerator</span></td><td>a keyboard accelerator</td></tr></tbody></table><p>The "position" attribute determines where a constructed widget
is positioned with respect to its siblings in the partially constructed
tree. If it is "top", the widget is prepended, otherwise it is
appended.</p></div><div class="refsect2" lang="en"><a name="id3614952"></a><h3>UI Merging</h3><p>The most remarkable feature of <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a> is
that it can overlay a set of menuitems and toolitems over another one, and
demerge them later.</p><p>Merging is done based on the name of the XML elements. Each
element is identified by a path which consists of the names of its
ancestors, separated by slashes. For example, the menuitem named "Left" in
the example above has the path
<tt class="filename">/ui/menubar/JustifyMenu/Left</tt> and the toolitem with the
same name has path
<tt class="filename">/ui/toolbar1/JustifyToolItems/Left</tt>.</p></div><div class="refsect2" lang="en"><a name="id3614989"></a><h3>Accelerators</h3><p>Every action has an accelerator path. Accelerators are installed
together with menuitem proxies, but they can also be explicitly added with
<accelerator> elements in the UI definition. This makes it possible to
have accelerators for actions even if they have no visible proxies.</p></div><div class="refsect2" lang="en"><a name="id3615005"></a><h3>Smart Separators</h3><p>The separators created by <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a> are
"smart", i.e. they do not show up in the UI unless they end up between two
visible menu or tool items. Separators which are located at the very
beginning or end of the menu or toolbar containing them, or multiple
separators next to each other, are hidden. This is a useful feature, since
the merging of UI elements from multiple sources can make it hard or
impossible to determine in advance whether a separator will end up in such
an unfortunate position.</p></div><div class="refsect2" lang="en"><a name="id3615031"></a><h3>Empty Menus</h3><p>Submenus pose similar problems to separators in connection with
merging. It is impossible to know in advance whether they will end up empty
after merging. <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a>
offers two ways to treat empty submenus:</p><div class="itemizedlist"><ul type="disc"><li>make them disappear by hiding the menu item they're
attached to</li><li>add an insensitive "Empty" item</li></ul></div><p>The behavior is chosen based on the "is_important" property of
the action to which the submenu is associated.</p></div></div><div class="refsect1" lang="en"><a name="constructor-gtkuimanager"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.UIManager</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 ui manager object.</td></tr></tbody></table><div class="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 <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a>
object.</p></div><div class="refsect1" lang="en"><a name="id3615143"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkuimanager--set-add-tearoffs"></a><h3>gtk.UIManager.set_add_tearoffs</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_add_tearoffs</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>add_tearoffs</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>add_tearoffs</tt></b>:</span></td><td><tt class="literal">TRUE</tt> if tearoff menu items
are added to regular menus</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">add_tearoffs</tt>() method sets the
"add_tearoffs" property to the value of
<i class="parameter"><tt>add_tearoffs</tt></i>. If <i class="parameter"><tt>add_tearoffs</tt></i>
is <tt class="literal">TRUE</tt> regular menus generated by this <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a>
will have tearoff menu items.</p><p>Note that this only affects regular menus. Generated popup menus
never have tearoff menu items.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-add-tearoffs"></a><h3>gtk.UIManager.get_add_tearoffs</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_add_tearoffs</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 tearoff menu items
are added</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_add_tearoffs</tt>() method returns
the value of the "add-tearoffs" property. If "add-tearoffs" is
<tt class="literal">TRUE</tt> regular menus generated will have tearoff menu
items.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--insert-action-group"></a><h3>gtk.UIManager.insert_action_group</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">insert_action_group</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>action_group</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>action_group</tt></b>:</span></td><td>the action group to be
inserted</td></tr><tr><td><span class="term"><b class="parameter"><tt>pos</tt></b>:</span></td><td>the position at which the group will be
inserted. If <i class="parameter"><tt>pos</tt></i> is negative
<i class="parameter"><tt>action_group</tt></i> is inserted at the end of the
list.</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_action_group</tt>() method
inserts the <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><tt class="classname">gtk.ActionGroup</tt></a>
specified by <i class="parameter"><tt>action_group</tt></i> into the list of associated
action groups at the position specified by
<i class="parameter"><tt>pos</tt></i>. Actions in earlier groups hide actions with the
same name in later groups.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--remove-action-group"></a><h3>gtk.UIManager.remove_action_group</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_action_group</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>action_group</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>action_group</tt></b>:</span></td><td>the action group to be
removed</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">remove_action_group</tt>() method
removes the <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><tt class="classname">gtk.ActionGroup</tt></a>
specified by <i class="parameter"><tt>action_group</tt></i> from the list of
associated action groups.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-action-groups"></a><h3>gtk.UIManager.get_action_groups</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_action_groups</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 list of associated action
groups.</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_action_groups</tt>() method returns
the list of associated <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><tt class="classname">gtk.ActionGroup</tt></a>
objects.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-accel-group"></a><h3>gtk.UIManager.get_accel_group</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_accel_group</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 <a href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><tt class="classname">gtk.AccelGroup</tt></a>.</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_accel_group</tt>() method returns
the associated <a href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><tt class="classname">gtk.AccelGroup</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-widget"></a><h3>gtk.UIManager.get_widget</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_widget</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</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>path</tt></b>:</span></td><td>a path</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the widget found by following the path, or
<tt class="literal">None</tt> if no widget was
found.</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_widget</tt>() method looks up a
widget by following the path specified by <i class="parameter"><tt>path</tt></i>. The
path consists of the names specified in the XML description of the UI.
separated by '/'. Elements that don't have a name or action attribute in
the XML (e.g. <popup>) can be addressed by their XML element name
(e.g. "popup"). The root element ("/ui") can be omitted in the path.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-toplevels"></a><h3>gtk.UIManager.get_toplevels</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toplevels</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>types</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>types</tt></b>:</span></td><td>specifies the types of toplevel widgets to
include. Allowed types are
<tt class="literal">gtk.UI_MANAGER_MENUBAR</tt>,
<tt class="literal">gtk.UI_MANAGER_TOOLBAR</tt> and
<tt class="literal">gtk.UI_MANAGER_POPUP</tt>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of all toplevel widgets of the requested
types.</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_toplevels</tt>() method returns a
list of all toplevel widgets of the types specified by
<i class="parameter"><tt>types</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-action"></a><h3>gtk.UIManager.get_action</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_action</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</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>path</tt></b>:</span></td><td>a path</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the action whose proxy widget is found by
following the path, or <tt class="literal">None</tt> if no widget was
found.</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_action</tt>() method looks up a
<a href="class-gtkaction.html" title="gtk.Action"><tt class="classname">gtk.Action</tt></a> by
following a path. See the <a href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><tt class="methodname">get_widget()</tt></a>
method for more information about paths.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--add-ui-from-string"></a><h3>gtk.UIManager.add_ui_from_string</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui_from_string</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>buffer</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>buffer</tt></b>:</span></td><td>the string to parse</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>The merge id for the merged UI. The merge id
can be used to unmerge the UI with the <a href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><tt class="methodname">remove_ui()</tt></a>
method.</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">add_ui_from_string</tt>() method parses
the string specified by <i class="parameter"><tt>buffer</tt></i> that contains a <a href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> and merges it with the current
contents of the ui manager. An enclosing <ui> element is added if it
is missing.</p><p>This method raise the GError exception if an error occurs during
the parsing of the string.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--add-ui-from-file"></a><h3>gtk.UIManager.add_ui_from_file</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui_from_file</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</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>filename</tt></b>:</span></td><td>the name of the file to parse</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>The merge id for the merged UI. The merge id
can be used to unmerge the UI with the <a href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><tt class="methodname">gtk.UIManager.remove_ui()</tt></a>
method.</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">add_ui_from_file</tt>() method parses
the file specified by <i class="parameter"><tt>filename</tt></i> that contains a <a href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> and merges it with the current
contents of the ui manager.</p><p>This method raise the GError exception if an error occurs during
the parsing of the file.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--add-ui"></a><h3>gtk.UIManager.add_ui</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>merge_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>action</tt></b></span></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>top</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>merge_id</tt></b>:</span></td><td>the merge id for the merged UI, see <a href="class-gtkuimanager.html#method-gtkuimanager--new-merge-id" title="gtk.UIManager.new_merge_id"><tt class="methodname">new_merge_id()</tt></a></td></tr><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a path where the element should be
added</td></tr><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name for the added UI
element</td></tr><tr><td><span class="term"><b class="parameter"><tt>action</tt></b>:</span></td><td>the name of the action to be proxied, or
<tt class="literal">None</tt> to add a separator</td></tr><tr><td><span class="term"><b class="parameter"><tt>type</tt></b>:</span></td><td>the type of UI element to
add.</td></tr><tr><td><span class="term"><b class="parameter"><tt>top</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the UI element is
added before its siblings, otherwise it is added after its
siblings.</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">add_ui</tt>() method adds a UI element
of the type specified by <i class="parameter"><tt>type</tt></i> to the current contents
of the ui manager at the location specified by
<i class="parameter"><tt>path</tt></i>. Note that path must not start with "/ui" though
"ui" is acceptable. For example "/menubar" or "ui/menubar" is acceptable but
"/ui/menubar" is not. <i class="parameter"><tt>type</tt></i> must be one of:</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.UI_MANAGER_AUTO</tt></span></td><td>The type of the UI element (menuitem, toolitem or
separator) is set according to the context.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_MENUBAR</tt></span></td><td>A menubar. </td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_MENU</tt></span></td><td>A menu.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_TOOLBAR</tt></span></td><td>A toolbar.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_PLACEHOLDER</tt></span></td><td>A placeholder.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_POPUP</tt></span></td><td>A popup menu.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_MENUITEM</tt></span></td><td>A menuitem.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_TOOLITEM</tt></span></td><td>A toolitem.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_SEPARATOR</tt></span></td><td>A separator.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UI_MANAGER_ACCELERATOR</tt></span></td><td>An accelerator.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--remove-ui"></a><h3>gtk.UIManager.remove_ui</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_ui</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>merge_id</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>merge_id</tt></b>:</span></td><td>a merge id</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">remove_ui</tt>() method unmerges the
part of the ui manager content identified by
<i class="parameter"><tt>merge_id</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--get-ui"></a><h3>gtk.UIManager.get_ui</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_ui</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 string containing an XML representation of
the merged UI.</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_ui</tt>() method creates a <a href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> of the merged UI.</p></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--ensure-update"></a><h3>gtk.UIManager.ensure_update</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ensure_update</span>(<span class="methodparam"></span>)</code></pre></td></tr></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">ensure_update</tt>() method makes sure
that all pending updates to the UI have been completed. This may
occasionally be necessary, since <a href="class-gtkuimanager.html" title="gtk.UIManager"><tt class="classname">gtk.UIManager</tt></a>
updates the UI in an idle function. A typical example where this method is
useful is to enforce that the menubar and toolbar have been added to the
main window before showing it:</p><div class="informalexample"><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
window.add(vbox)
merge.connect("add_widget", add_widget, vbox)
merge.add_ui_from_file("my-menus")
merge.add_ui_from_file("my-toolbars")
merge.ensure_update()
window.show()
</pre></td></tr></table></div></div><div class="refsect2" lang="en"><a name="method-gtkuimanager--new-merge-id"></a><h3>gtk.UIManager.new_merge_id</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">new_merge_id</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>an unused merge id.</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">new_merge_id</tt>() method returns an
unused merge id, suitable for use with the <a href="class-gtkuimanager.html#method-gtkuimanager--add-ui" title="gtk.UIManager.add_ui"><tt class="methodname">add_ui()</tt></a>
method. The returned merge ids are monotonically increasing integer
values.</p></div></div><div class="refsect1" lang="en"><a name="id3616837"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkuimanager--actions-changed"></a><h3>The "actions-changed" gtk.UIManager 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>uimanager</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</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><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 "actions-changed" signal is emitted when the set of actions
changes.</p></div><div class="refsect2" lang="en"><a name="signal-gtkuimanager--add-widget"></a><h3>The "add-widget" gtk.UIManager 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>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>widget</tt></i>:</span></td><td>the added widget</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><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 "add-widget" signal is emitted for each generated menubar
and toolbar. The added widget is specified by
<i class="parameter"><tt>widget</tt></i>. It is not emitted for generated popup menus,
which can be retrieved by the <a href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><tt class="methodname">get_widget</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="signal-gtkuimanager--connect-proxy"></a><h3>The "connect-proxy" gtk.UIManager 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>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>action</tt></i>:</span></td><td>the action</td></tr><tr><td><span class="term"><i class="parameter"><tt>widget</tt></i>:</span></td><td>the proxy widget</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><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 "connect-proxy" signal is emitted after connecting the proxy
widget specified by <i class="parameter"><tt>widget</tt></i> to the <a href="class-gtkaction.html" title="gtk.Action"><tt class="classname">gtk.Action</tt></a> specified
by <i class="parameter"><tt>action</tt></i> in the group. This is intended for simple
customizations for which a custom action class would be too clumsy,
e.g. showing tooltips for menuitems in the statusbar.</p></div><div class="refsect2" lang="en"><a name="signal-gtkuimanager--disconnect-proxy"></a><h3>The "disconnect-proxy" gtk.UIManager 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>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>widget</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>action</tt></i>:</span></td><td>the action</td></tr><tr><td><span class="term"><i class="parameter"><tt>widget</tt></i>:</span></td><td>the proxy widget</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><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 "disconnect-proxy" signal is emitted when
<i class="parameter"><tt>widget</tt></i> is disconnected from
<i class="parameter"><tt>action</tt></i>.</p></div><div class="refsect2" lang="en"><a name="signal-gtkuimanager--post-activate"></a><h3>The "post-activate" gtk.UIManager 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>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>action</tt></i>:</span></td><td>the action</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><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 "post-activate" signal is emitted after
<i class="parameter"><tt>action</tt></i> is activated. This signal is intended for
applications to get notification after any action is activated.</p></div><div class="refsect2" lang="en"><a name="signal-gtkuimanager--pre-activate"></a><h3>The "pre-activate" gtk.UIManager 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>uimanager</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>action</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>uimanager</tt></i>:</span></td><td>the uimanager that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>action</tt></i>:</span></td><td>the action</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><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 "pre-activate" signal is emitted before
<i class="parameter"><tt>action</tt></i> is activated. This signal is intended for
applications to get notification before any action is activated.</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-gtktreeviewcolumn.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-gtkvbox.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TreeViewColumn</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.VBox</td></tr></table></div></body></html>
|