/usr/share/gtk-doc/html/pygtk/class-gtkuimanager.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 223 224 225 226 227 228 229 230 231 232 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.UIManager</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-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" title="gtk.UIManager"><a name="class-gtkuimanager"></a><div class="titlepage"></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" title="Synopsis"><a name="id4066232"></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"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" 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 class="link" 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"><strong class="parameter"><code>add_tearoffs</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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"><strong class="parameter"><code>action_group</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pos</code></strong></span><span class="initializer">=-1</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>action_group</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget">get_widget</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkuimanager.html#method-gtkuimanager--get-toplevels" title="gtk.UIManager.get_toplevels">get_toplevels</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkuimanager.html#method-gtkuimanager--get-action" title="gtk.UIManager.get_action">get_action</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkuimanager.html#method-gtkuimanager--add-ui" title="gtk.UIManager.add_ui">add_ui</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>merge_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui">remove_ui</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>merge_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" 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 class="link" 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 class="link" 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" title="Ancestry"><a name="id4066766"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager">gtk.UIManager</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id4066792"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</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.UIManager Properties"><a name="properties-gtkuimanager"></a><h2>gtk.UIManager 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 width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"add-tearoffs"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, regular menus have tearoff
menu items. Note that this only affects regular menus. Generated popup menus
never have tearoff menu items. Available in <code class="literal">GTK+</code> 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" title="gtk.UIManager Signal Prototypes"><a name="signal-prototypes-gtkuimanager"></a><h2>gtk.UIManager Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></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-gtkuimanager.html#signal-gtkuimanager--actions-changed" title='The "actions-changed" gtk.UIManager Signal'>actions-changed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</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-gtkuimanager.html#signal-gtkuimanager--add-widget" title='The "add-widget" gtk.UIManager Signal'>add-widget</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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-gtkuimanager.html#signal-gtkuimanager--connect-proxy" title='The "connect-proxy" gtk.UIManager Signal'>connect-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>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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-gtkuimanager.html#signal-gtkuimanager--disconnect-proxy" title='The "disconnect-proxy" gtk.UIManager Signal'>disconnect-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>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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-gtkuimanager.html#signal-gtkuimanager--post-activate" title='The "post-activate" gtk.UIManager Signal'>post-activate</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</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-gtkuimanager.html#signal-gtkuimanager--pre-activate" title='The "pre-activate" gtk.UIManager Signal'>pre-activate</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</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="id4067398"></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 object is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></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" title="UI Definitions"><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><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><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="id4067478"></a><p class="title"><b>Example 5. A UI definition</b></p><div class="example-contents"><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></div></div><br class="example-break"><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><p><span class="term">menubar</span></p></td><td>a <a class="link" href="class-gtkmenubar.html" title="gtk.MenuBar"><code class="classname">gtk.MenuBar</code></a></td></tr><tr><td><p><span class="term">toolbar</span></p></td><td>a <a class="link" href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.Toolbar</code></a></td></tr><tr><td><p><span class="term">popup</span></p></td><td>a toplevel <a class="link" href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a></td></tr><tr><td><p><span class="term">menu</span></p></td><td>a <a class="link" href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a>
attached to a menuitem</td></tr><tr><td><p><span class="term">menuitem</span></p></td><td>a <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
subclass, the exact type depends on the action</td></tr><tr><td><p><span class="term">toolitem</span></p></td><td>a <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
subclass, the exact type depends on the action</td></tr><tr><td><p><span class="term">separator</span></p></td><td>a <a class="link" href="class-gtkseparatormenuitem.html" title="gtk.SeparatorMenuItem"><code class="classname">gtk.SeparatorMenuItem</code></a>
or <a class="link" href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><code class="classname">gtk.SeparatorToolItem</code></a></td></tr><tr><td><p><span class="term">accelerator</span></p></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" title="UI Merging"><a name="id4067701"></a><h3>UI Merging</h3><p>The most remarkable feature of <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></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
<code class="filename">/ui/menubar/JustifyMenu/Left</code> and the toolitem with the
same name has path
<code class="filename">/ui/toolbar1/JustifyToolItems/Left</code>.</p></div><div class="refsect2" title="Accelerators"><a name="id4067742"></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" title="Smart Separators"><a name="id4067758"></a><h3>Smart Separators</h3><p>The separators created by <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></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" title="Empty Menus"><a name="id4067784"></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 class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
offers two ways to treat empty submenus:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">make them disappear by hiding the menu item they're
attached to</li><li class="listitem">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" title="Constructor"><a name="constructor-gtkuimanager"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.UIManager</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 new ui manager object.</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 <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
object.</p></div><div class="refsect1" title="Methods"><a name="id4067903"></a><h2>Methods</h2><div class="refsect2" title="gtk.UIManager.set_add_tearoffs"><a name="method-gtkuimanager--set-add-tearoffs"></a><h3>gtk.UIManager.set_add_tearoffs</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_add_tearoffs</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>add_tearoffs</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>add_tearoffs</code></strong> :</span></p></td><td><code class="literal">True</code> if tearoff menu items
are added to regular menus</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">add_tearoffs</code>() method sets the
"add_tearoffs" property to the value of
<em class="parameter"><code>add_tearoffs</code></em>. If <em class="parameter"><code>add_tearoffs</code></em>
is <code class="literal">True</code> regular menus generated by this <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></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" title="gtk.UIManager.get_add_tearoffs"><a name="method-gtkuimanager--get-add-tearoffs"></a><h3>gtk.UIManager.get_add_tearoffs</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_add_tearoffs</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 tearoff menu items
are added</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_add_tearoffs</code>() method returns
the value of the "add-tearoffs" property. If "add-tearoffs" is
<code class="literal">True</code> regular menus generated will have tearoff menu
items.</p></div><div class="refsect2" title="gtk.UIManager.insert_action_group"><a name="method-gtkuimanager--insert-action-group"></a><h3>gtk.UIManager.insert_action_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">insert_action_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action_group</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pos</code></strong></span><span class="initializer">=-1</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>action_group</code></strong> :</span></p></td><td>the action group to be
inserted</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pos</code></strong> :</span></p></td><td>the position at which the group will be
inserted. If <em class="parameter"><code>pos</code></em> is negative
<em class="parameter"><code>action_group</code></em> is inserted at the end of the
list.</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><p><em class="parameter"><code>pos</code></em> has default value since PyGTK 2.12.</p></div><p>The <code class="methodname">insert_action_group</code>() method
inserts the <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
specified by <em class="parameter"><code>action_group</code></em> into the list of associated
action groups at the position specified by
<em class="parameter"><code>pos</code></em>. If <em class="parameter"><code>pos</code></em> is negative, new
action group is inserted at the end of the list. Actions in earlier groups
hide actions with the same name in later groups.</p></div><div class="refsect2" title="gtk.UIManager.remove_action_group"><a name="method-gtkuimanager--remove-action-group"></a><h3>gtk.UIManager.remove_action_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_action_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>action_group</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>action_group</code></strong> :</span></p></td><td>the action group to be
removed</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">remove_action_group</code>() method
removes the <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
specified by <em class="parameter"><code>action_group</code></em> from the list of
associated action groups.</p></div><div class="refsect2" title="gtk.UIManager.get_action_groups"><a name="method-gtkuimanager--get-action-groups"></a><h3>gtk.UIManager.get_action_groups</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_action_groups</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 list of associated action
groups.</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_action_groups</code>() method returns
the list of associated <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
objects.</p></div><div class="refsect2" title="gtk.UIManager.get_accel_group"><a name="method-gtkuimanager--get-accel-group"></a><h3>gtk.UIManager.get_accel_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_accel_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>the <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</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.4 and above.</p></div><p>The <code class="methodname">get_accel_group</code>() method returns
the associated <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>.</p></div><div class="refsect2" title="gtk.UIManager.get_widget"><a name="method-gtkuimanager--get-widget"></a><h3>gtk.UIManager.get_widget</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_widget</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</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>path</code></strong> :</span></p></td><td>a path</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the widget found by following the path, or
<code class="literal">None</code> if no widget was
found.</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_widget</code>() method looks up a
widget by following the path specified by <em class="parameter"><code>path</code></em>. 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" title="gtk.UIManager.get_toplevels"><a name="method-gtkuimanager--get-toplevels"></a><h3>gtk.UIManager.get_toplevels</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_toplevels</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>types</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>types</code></strong> :</span></p></td><td>specifies the types of toplevel widgets to
include. Allowed types are
<code class="literal">gtk.UI_MANAGER_MENUBAR</code>,
<code class="literal">gtk.UI_MANAGER_TOOLBAR</code> and
<code class="literal">gtk.UI_MANAGER_POPUP</code>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a list of all toplevel widgets of the requested
types.</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_toplevels</code>() method returns a
list of all toplevel widgets of the types specified by
<em class="parameter"><code>types</code></em>.</p></div><div class="refsect2" title="gtk.UIManager.get_action"><a name="method-gtkuimanager--get-action"></a><h3>gtk.UIManager.get_action</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_action</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</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>path</code></strong> :</span></p></td><td>a path</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the action whose proxy widget is found by
following the path, or <code class="literal">None</code> if no widget was
found.</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_action</code>() method looks up a
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> by
following a path. See the <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><code class="methodname">get_widget()</code></a>
method for more information about paths.</p></div><div class="refsect2" title="gtk.UIManager.add_ui_from_string"><a name="method-gtkuimanager--add-ui-from-string"></a><h3>gtk.UIManager.add_ui_from_string</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui_from_string</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</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>buffer</code></strong> :</span></p></td><td>the string to parse</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The merge id for the merged UI. The merge id
can be used to unmerge the UI with the <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><code class="methodname">remove_ui()</code></a>
method.</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">add_ui_from_string</code>() method parses
the string specified by <em class="parameter"><code>buffer</code></em> that contains a <a class="link" 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" title="gtk.UIManager.add_ui_from_file"><a name="method-gtkuimanager--add-ui-from-file"></a><h3>gtk.UIManager.add_ui_from_file</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui_from_file</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</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>filename</code></strong> :</span></p></td><td>the name of the file to parse</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The merge id for the merged UI. The merge id
can be used to unmerge the UI with the <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><code class="methodname">gtk.UIManager.remove_ui()</code></a>
method.</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">add_ui_from_file</code>() method parses
the file specified by <em class="parameter"><code>filename</code></em> that contains a <a class="link" 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" title="gtk.UIManager.add_ui"><a name="method-gtkuimanager--add-ui"></a><h3>gtk.UIManager.add_ui</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_ui</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>merge_id</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>action</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>type</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</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>merge_id</code></strong> :</span></p></td><td>the merge id for the merged UI, see <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--new-merge-id" title="gtk.UIManager.new_merge_id"><code class="methodname">new_merge_id()</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a path where the element should be
added</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>the name for the added UI
element</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>action</code></strong> :</span></p></td><td>the name of the action to be proxied, or
<code class="literal">None</code> to add a separator</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the type of UI element to
add.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>top</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the UI element is
added before its siblings, otherwise it is added after its
siblings.</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">add_ui</code>() method adds a UI element
of the type specified by <em class="parameter"><code>type</code></em> to the current contents
of the ui manager at the location specified by
<em class="parameter"><code>path</code></em>. 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. <em class="parameter"><code>type</code></em> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_AUTO</code></span></p></td><td>The type of the UI element (menuitem, toolitem or
separator) is set according to the context.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_MENUBAR</code></span></p></td><td>A menubar. </td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_MENU</code></span></p></td><td>A menu.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_TOOLBAR</code></span></p></td><td>A toolbar.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_PLACEHOLDER</code></span></p></td><td>A placeholder.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_POPUP</code></span></p></td><td>A popup menu.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_MENUITEM</code></span></p></td><td>A menuitem.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_TOOLITEM</code></span></p></td><td>A toolitem.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_SEPARATOR</code></span></p></td><td>A separator.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.UI_MANAGER_ACCELERATOR</code></span></p></td><td>An accelerator.</td></tr></tbody></table><p></p></div><div class="refsect2" title="gtk.UIManager.remove_ui"><a name="method-gtkuimanager--remove-ui"></a><h3>gtk.UIManager.remove_ui</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove_ui</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>merge_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>merge_id</code></strong> :</span></p></td><td>a merge id</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">remove_ui</code>() method unmerges the
part of the ui manager content identified by
<em class="parameter"><code>merge_id</code></em>.</p></div><div class="refsect2" title="gtk.UIManager.get_ui"><a name="method-gtkuimanager--get-ui"></a><h3>gtk.UIManager.get_ui</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_ui</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 string containing an XML representation of
the merged UI.</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_ui</code>() method creates a <a class="link" href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> of the merged UI.</p></div><div class="refsect2" title="gtk.UIManager.ensure_update"><a name="method-gtkuimanager--ensure-update"></a><h3>gtk.UIManager.ensure_update</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">ensure_update</span>(<span class="methodparam"></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.4 and above.</p></div><p>The <code class="methodname">ensure_update</code>() method makes sure
that all pending updates to the UI have been completed. This may
occasionally be necessary, since <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></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"><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></div></div><div class="refsect2" title="gtk.UIManager.new_merge_id"><a name="method-gtkuimanager--new-merge-id"></a><h3>gtk.UIManager.new_merge_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">new_merge_id</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>an unused merge id.</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">new_merge_id</code>() method returns an
unused merge id, suitable for use with the <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--add-ui" title="gtk.UIManager.add_ui"><code class="methodname">add_ui()</code></a>
method. The returned merge ids are monotonically increasing integer
values.</p></div></div><div class="refsect1" title="Signals"><a name="id4069901"></a><h2>Signals</h2><div class="refsect2" title='The "actions-changed" gtk.UIManager Signal'><a name="signal-gtkuimanager--actions-changed"></a><h3>The "actions-changed" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</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>uimanager</code></em> :</span></p></td><td>the uimanager 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 "actions-changed" signal is emitted when the set of actions
changes.</p></div><div class="refsect2" title='The "add-widget" gtk.UIManager Signal'><a name="signal-gtkuimanager--add-widget"></a><h3>The "add-widget" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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>uimanager</code></em> :</span></p></td><td>the uimanager that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the added widget</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 "add-widget" signal is emitted for each generated menubar
and toolbar. The added widget is specified by
<em class="parameter"><code>widget</code></em>. It is not emitted for generated popup menus,
which can be retrieved by the <a class="link" href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><code class="methodname">get_widget</code>()</a>
method.</p></div><div class="refsect2" title='The "connect-proxy" gtk.UIManager Signal'><a name="signal-gtkuimanager--connect-proxy"></a><h3>The "connect-proxy" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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>uimanager</code></em> :</span></p></td><td>the uimanager that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td><td>the action</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the proxy widget</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 "connect-proxy" signal is emitted after connecting the proxy
widget specified by <em class="parameter"><code>widget</code></em> to the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> specified
by <em class="parameter"><code>action</code></em> 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" title='The "disconnect-proxy" gtk.UIManager Signal'><a name="signal-gtkuimanager--disconnect-proxy"></a><h3>The "disconnect-proxy" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</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>uimanager</code></em> :</span></p></td><td>the uimanager that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td><td>the action</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the proxy widget</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 "disconnect-proxy" signal is emitted when
<em class="parameter"><code>widget</code></em> is disconnected from
<em class="parameter"><code>action</code></em>.</p></div><div class="refsect2" title='The "post-activate" gtk.UIManager Signal'><a name="signal-gtkuimanager--post-activate"></a><h3>The "post-activate" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</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>uimanager</code></em> :</span></p></td><td>the uimanager that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td><td>the action</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 "post-activate" signal is emitted after
<em class="parameter"><code>action</code></em> is activated. This signal is intended for
applications to get notification after any action is activated.</p></div><div class="refsect2" title='The "pre-activate" gtk.UIManager Signal'><a name="signal-gtkuimanager--pre-activate"></a><h3>The "pre-activate" gtk.UIManager Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>uimanager</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>action</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>uimanager</code></em> :</span></p></td><td>the uimanager that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td><td>the action</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 "pre-activate" signal is emitted before
<em class="parameter"><code>action</code></em> 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>
|