source: pkg/pygtk/branches/upstream/current/docs/html/class-gtkuimanager.html @ 4

Revision 4, 55.5 KB checked in by alanbach-guest, 6 years ago (diff)

[svn-inject] Installing original source of pygtk

Line 
1<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.68.1"><link rel="start" 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" lang="en"><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
2    description (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3542086"></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>):
3<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"><strong class="parameter"><code>add_tearoffs</code></strong></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"><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>)</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"><strong class="parameter"><code>action_group</code></strong></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"><strong class="parameter"><code>path</code></strong></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"><strong class="parameter"><code>types</code></strong></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"><strong class="parameter"><code>path</code></strong></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"><strong class="parameter"><code>buffer</code></strong></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"><strong class="parameter"><code>filename</code></strong></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"><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 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 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="id3542617"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
4  +-- <a href="class-gtkuimanager.html" title="gtk.UIManager">gtk.UIManager</a>
5</pre></div><div class="refsect1" lang="en"><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><col><col></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
6menu items. Note that this only affects regular menus. Generated popup menus
7never have tearoff menu items. Available in <code class="literal">GTK+</code> 2.4 and
8above.</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="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><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"><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><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"><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><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"><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><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"><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><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"><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><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"><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" lang="en"><a name="id3543223"></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"><code class="classname">gtk.UIManager</code></a>
9constructs a user interface (menus and toolbars) from one or more UI
10definitions, 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
11roughly described by the following DTD.</p><pre class="programlisting">
12&lt;!ELEMENT ui          (menubar|toolbar|popup|accelerator)* &gt;
13&lt;!ELEMENT menubar     (menuitem|separator|placeholder|menu)* &gt;
14&lt;!ELEMENT menu        (menuitem|separator|placeholder|menu)* &gt;
15&lt;!ELEMENT popup       (menuitem|separator|placeholder|menu)* &gt;
16&lt;!ELEMENT toolbar     (toolitem|separator|placeholder)* &gt;
17&lt;!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* &gt;
18&lt;!ELEMENT menuitem     EMPTY &gt;
19&lt;!ELEMENT toolitem     EMPTY &gt;
20&lt;!ELEMENT separator    EMPTY &gt;
21&lt;!ELEMENT accelerator  EMPTY &gt;
22&lt;!ATTLIST menubar      name               #IMPLIED &gt;
23&lt;!ATTLIST toolbar      name               #IMPLIED &gt;
24&lt;!ATTLIST popup        name               #IMPLIED &gt;
25&lt;!ATTLIST placeholder  name               #IMPLIED &gt;
26&lt;!ATTLIST menu         name               #IMPLIED
27                       action             #REQUIRED
28                       position (top|bot) #IMPLIED &gt;
29&lt;!ATTLIST menuitem     name               #IMPLIED
30                       action             #REQUIRED
31                       position (top|bot) #IMPLIED &gt;
32&lt;!ATTLIST toolitem     name               #IMPLIED
33                       action             #REQUIRED
34                       position (top|bot) #IMPLIED &gt;
35&lt;!ATTLIST accelerator  name               #IMPLIED
36                       action             #REQUIRED &gt;
37</pre><p>There are some additional restrictions beyond those specified in
38the DTD, e.g. every toolitem must have a toolbar in its ancestry and every
39menuitem must have a menubar or popup in its ancestry. Since a GMarkup
40parser is used to parse the UI description, it must not only be valid XML,
41but valid GMarkup. If a name is not specified, it defaults to the action. If
42an action is not specified either, the element name is used.</p><div class="example"><a name="id3543303"></a><p class="title"><b>Example 5. A UI definition</b></p><pre class="programlisting">
43&lt;ui&gt;
44  &lt;menubar&gt;
45    &lt;menu name="FileMenu" action="FileMenuAction"&gt;
46      &lt;menuitem name="New" action="New2Action" /&gt;
47      &lt;placeholder name="FileMenuAdditions" /&gt;
48    &lt;/menu&gt;
49    &lt;menu name="JustifyMenu" action="JustifyMenuAction"&gt;
50      &lt;menuitem name="Left" action="justify-left"/&gt;
51      &lt;menuitem name="Centre" action="justify-center"/&gt;
52      &lt;menuitem name="Right" action="justify-right"/&gt;
53      &lt;menuitem name="Fill" action="justify-fill"/&gt;
54    &lt;/menu&gt;
55  &lt;/menubar&gt;
56  &lt;toolbar action="toolbar1"&gt;
57    &lt;placeholder name="JustifyToolItems"&gt;
58      &lt;separator/&gt;
59      &lt;toolitem name="Left" action="justify-left"/&gt;
60      &lt;toolitem name="Centre" action="justify-center"/&gt;
61      &lt;toolitem name="Right" action="justify-right"/&gt;
62      &lt;toolitem name="Fill" action="justify-fill"/&gt;
63      &lt;separator/&gt;
64    &lt;/placeholder&gt;
65  &lt;/toolbar&gt;
66&lt;/ui&gt;
67</pre></div><p>The constructed widget hierarchy is very similar to the element
68tree of the XML, with the exception that placeholders are merged into their
69parents. The correspondence of XML elements to widgets should be almost
70obvious:</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"><code class="classname">gtk.MenuBar</code></a></td></tr><tr><td><span class="term">toolbar</span></td><td>a <a href="class-gtktoolbar.html" title="gtk.Toolbar"><code class="classname">gtk.Toolbar</code></a></td></tr><tr><td><span class="term">popup</span></td><td>a toplevel <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a></td></tr><tr><td><span class="term">menu</span></td><td>a <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a>
71            attached to a menuitem</td></tr><tr><td><span class="term">menuitem</span></td><td>a <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
72            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"><code class="classname">gtk.ToolItem</code></a>
73            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"><code class="classname">gtk.SeparatorMenuItem</code></a>
74            or <a href="class-gtkseparatortoolitem.html" title="gtk.SeparatorToolItem"><code class="classname">gtk.SeparatorToolItem</code></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
75is positioned with respect to its siblings in the partially constructed
76tree. If it is "top", the widget is prepended, otherwise it is
77appended.</p></div><div class="refsect2" lang="en"><a name="id3543525"></a><h3>UI Merging</h3><p>The most remarkable feature of <a href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a> is
78that it can overlay a set of menuitems and toolitems over another one, and
79demerge them later.</p><p>Merging is done based on the name of the XML elements. Each
80element is identified by a path which consists of the names of its
81ancestors, separated by slashes. For example, the menuitem named "Left" in
82the example above has the path
83<code class="filename">/ui/menubar/JustifyMenu/Left</code> and the toolitem with the
84same name has path
85<code class="filename">/ui/toolbar1/JustifyToolItems/Left</code>.</p></div><div class="refsect2" lang="en"><a name="id3543567"></a><h3>Accelerators</h3><p>Every action has an accelerator path. Accelerators are installed
86together with menuitem proxies, but they can also be explicitly added with
87&lt;accelerator&gt; elements in the UI definition. This makes it possible to
88have accelerators for actions even if they have no visible proxies.</p></div><div class="refsect2" lang="en"><a name="id3543583"></a><h3>Smart Separators</h3><p>The separators created by <a href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a> are
89"smart", i.e. they do not show up in the UI unless they end up between two
90visible menu or tool items. Separators which are located at the very
91beginning or end of the menu or toolbar containing them, or multiple
92separators next to each other, are hidden. This is a useful feature, since
93the merging of UI elements from multiple sources can make it hard or
94impossible to determine in advance whether a separator will end up in such
95an unfortunate position.</p></div><div class="refsect2" lang="en"><a name="id3543609"></a><h3>Empty Menus</h3><p>Submenus pose similar problems to separators in connection with
96merging. It is impossible to know in advance whether they will end up empty
97after merging. <a href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
98offers two ways to treat empty submenus:</p><div class="itemizedlist"><ul type="disc"><li>make them disappear by hiding the menu item they're
99        attached to</li><li>add an insensitive "Empty" item</li></ul></div><p>The behavior is chosen based on the "is_important" property of
100the action to which the submenu is associated.</p></div></div><div class="refsect1" lang="en"><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><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"><code class="classname">gtk.UIManager</code></a>
101object.</p></div><div class="refsect1" lang="en"><a name="id3543727"></a><h2>Methods</h2><div class="refsect2" lang="en"><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><span class="term"><strong class="parameter"><code>add_tearoffs</code></strong> :</span></td><td><code class="literal">True</code> if tearoff menu items
102          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 <code class="methodname">add_tearoffs</code>() method sets the
103"add_tearoffs" property to the value of
104<em class="parameter"><code>add_tearoffs</code></em>. If <em class="parameter"><code>add_tearoffs</code></em>
105is <code class="literal">True</code> regular menus generated by this <a href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
106will have tearoff menu items.</p><p>Note that this only affects regular menus. Generated popup menus
107never 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><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><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td><code class="literal">True</code> if tearoff menu items
108          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 <code class="methodname">get_add_tearoffs</code>() method returns
109the value of the "add-tearoffs" property. If "add-tearoffs" is
110<code class="literal">True</code> regular menus generated will have tearoff menu
111items.</p></div><div class="refsect2" lang="en"><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>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>action_group</code></strong> :</span></td><td>the action group to be
112          inserted</td></tr><tr><td><span class="term"><strong class="parameter"><code>pos</code></strong> :</span></td><td>the position at which the group will be
113          inserted. If <em class="parameter"><code>pos</code></em> is negative
114          <em class="parameter"><code>action_group</code></em> is inserted at the end of the
115          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 <code class="methodname">insert_action_group</code>() method
116inserts the <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
117specified by <em class="parameter"><code>action_group</code></em> into the list of associated
118action groups at the position specified by
119<em class="parameter"><code>pos</code></em>. Actions in earlier groups hide actions with the
120same 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><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><span class="term"><strong class="parameter"><code>action_group</code></strong> :</span></td><td>the action group to be
121          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 <code class="methodname">remove_action_group</code>() method
122removes the <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
123specified by <em class="parameter"><code>action_group</code></em> from the list of
124associated action groups.</p></div><div class="refsect2" lang="en"><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><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a list of associated action
125          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 <code class="methodname">get_action_groups</code>() method returns
126the list of associated <a href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
127objects.</p></div><div class="refsect2" lang="en"><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><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the <a href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></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 <code class="methodname">get_accel_group</code>() method returns
128the associated <a href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>.</p></div><div class="refsect2" lang="en"><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><span class="term"><strong class="parameter"><code>path</code></strong> :</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
129          <code class="literal">None</code> if no widget was
130          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 <code class="methodname">get_widget</code>() method looks up a
131widget by following the path specified by <em class="parameter"><code>path</code></em>.  The
132path consists of the names specified in the XML description of the UI.
133separated by '/'. Elements that don't have a name or action attribute in
134the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
135(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><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><span class="term"><strong class="parameter"><code>types</code></strong> :</span></td><td>specifies the types of toplevel widgets to
136          include. Allowed types are
137          <code class="literal">gtk.UI_MANAGER_MENUBAR</code>,
138          <code class="literal">gtk.UI_MANAGER_TOOLBAR</code> and
139          <code class="literal">gtk.UI_MANAGER_POPUP</code>.</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
140          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 <code class="methodname">get_toplevels</code>() method returns a
141list of all toplevel widgets of the types specified by
142<em class="parameter"><code>types</code></em>.</p></div><div class="refsect2" lang="en"><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><span class="term"><strong class="parameter"><code>path</code></strong> :</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
143          following the path, or <code class="literal">None</code> if no widget was
144          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 <code class="methodname">get_action</code>() method looks up a
145<a href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> by
146following a path. See the <a href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><code class="methodname">get_widget()</code></a>
147method 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><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><span class="term"><strong class="parameter"><code>buffer</code></strong> :</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
148          can be used to unmerge the UI with the <a href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><code class="methodname">remove_ui()</code></a>
149          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 <code class="methodname">add_ui_from_string</code>() method parses
150the string specified by <em class="parameter"><code>buffer</code></em> that contains a <a href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> and merges it with the current
151contents of the ui manager. An enclosing &lt;ui&gt; element is added if it
152is missing.</p><p>This method raise the GError exception if an error occurs during
153the 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><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><span class="term"><strong class="parameter"><code>filename</code></strong> :</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
154          can be used to unmerge the UI with the <a href="class-gtkuimanager.html#method-gtkuimanager--remove-ui" title="gtk.UIManager.remove_ui"><code class="methodname">gtk.UIManager.remove_ui()</code></a>
155          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 <code class="methodname">add_ui_from_file</code>() method parses
156the file specified by <em class="parameter"><code>filename</code></em> that contains a <a href="class-gtkuimanager.html#XML-UI" title="UI Definitions">UI definition</a> and merges it with the current
157contents of the ui manager.</p><p>This method raise the GError exception if an error occurs during
158the parsing of the file.</p></div><div class="refsect2" lang="en"><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><span class="term"><strong class="parameter"><code>merge_id</code></strong> :</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"><code class="methodname">new_merge_id()</code></a></td></tr><tr><td><span class="term"><strong class="parameter"><code>path</code></strong> :</span></td><td>a path where the element should be
159          added</td></tr><tr><td><span class="term"><strong class="parameter"><code>name</code></strong> :</span></td><td>the name for the added UI
160          element</td></tr><tr><td><span class="term"><strong class="parameter"><code>action</code></strong> :</span></td><td>the name of the action to be proxied, or
161          <code class="literal">None</code> to add a separator</td></tr><tr><td><span class="term"><strong class="parameter"><code>type</code></strong> :</span></td><td>the type of UI element to
162          add.</td></tr><tr><td><span class="term"><strong class="parameter"><code>top</code></strong> :</span></td><td>if <code class="literal">True</code>, the UI element is
163          added before its siblings, otherwise it is added after its
164          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 <code class="methodname">add_ui</code>() method adds a UI element
165of the type specified by <em class="parameter"><code>type</code></em> to the current contents
166of the ui manager at the location specified by
167<em class="parameter"><code>path</code></em>. Note that path must not start with "/ui" though
168"ui" is acceptable. For example "/menubar" or "ui/menubar" is acceptable but
169"/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><span class="term"><code class="literal">gtk.UI_MANAGER_AUTO</code></span></td><td>The type of the UI element (menuitem, toolitem or
170separator) is set according to the context.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_MENUBAR</code></span></td><td>A menubar. </td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_MENU</code></span></td><td>A menu.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_TOOLBAR</code></span></td><td>A toolbar.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_PLACEHOLDER</code></span></td><td>A placeholder.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_POPUP</code></span></td><td>A popup menu.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_MENUITEM</code></span></td><td>A menuitem.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_TOOLITEM</code></span></td><td>A toolitem.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_SEPARATOR</code></span></td><td>A separator.</td></tr><tr><td><span class="term"><code class="literal">gtk.UI_MANAGER_ACCELERATOR</code></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><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><span class="term"><strong class="parameter"><code>merge_id</code></strong> :</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 <code class="methodname">remove_ui</code>() method unmerges the
171part of the ui manager content identified by
172<em class="parameter"><code>merge_id</code></em>.</p></div><div class="refsect2" lang="en"><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><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>A string containing an XML representation of
173          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 <code class="methodname">get_ui</code>() 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><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">ensure_update</span>(<span class="methodparam"></span>)</code></pre><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 <code class="methodname">ensure_update</code>() method makes sure
174that all pending updates to the UI have been completed. This may
175occasionally be necessary, since <a href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
176updates the UI in an idle function. A typical example where this method is
177useful is to enforce that the menubar and toolbar have been added to the
178main window before showing it:</p><div class="informalexample"><pre class="programlisting">
179  window.add(vbox)
180  merge.connect("add_widget", add_widget, vbox)
181  merge.add_ui_from_file("my-menus")
182  merge.add_ui_from_file("my-toolbars")
183  merge.ensure_update() 
184  window.show()
185</pre></div></div><div class="refsect2" lang="en"><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><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 <code class="methodname">new_merge_id</code>() method returns an
186unused merge id, suitable for use with the <a href="class-gtkuimanager.html#method-gtkuimanager--add-ui" title="gtk.UIManager.add_ui"><code class="methodname">add_ui()</code></a>
187method. The returned merge ids are monotonically increasing integer
188values.</p></div></div><div class="refsect1" lang="en"><a name="id3545706"></a><h2>Signals</h2><div class="refsect2" lang="en"><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
189signal</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
190with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
191method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
192any)</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
193changes.</p></div><div class="refsect2" lang="en"><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
194signal</td></tr><tr><td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td><td>the added widget</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
195with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
196method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
197any)</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
198and toolbar. The added widget is specified by
199<em class="parameter"><code>widget</code></em>. It is not emitted for generated popup menus,
200which can be retrieved by the <a href="class-gtkuimanager.html#method-gtkuimanager--get-widget" title="gtk.UIManager.get_widget"><code class="methodname">get_widget</code>()</a>
201method.</p></div><div class="refsect2" lang="en"><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
202signal</td></tr><tr><td><span class="term"><em class="parameter"><code>action</code></em> :</span></td><td>the action</td></tr><tr><td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td><td>the proxy widget</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
203with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
204method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
205any)</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
206widget specified by <em class="parameter"><code>widget</code></em> to the <a href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> specified
207by <em class="parameter"><code>action</code></em> in the group. This is intended for simple
208customizations for which a custom action class would be too clumsy,
209e.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><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
210signal</td></tr><tr><td><span class="term"><em class="parameter"><code>action</code></em> :</span></td><td>the action</td></tr><tr><td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td><td>the proxy widget</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
211with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
212method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
213any)</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
214<em class="parameter"><code>widget</code></em> is disconnected from
215<em class="parameter"><code>action</code></em>.</p></div><div class="refsect2" lang="en"><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
216signal</td></tr><tr><td><span class="term"><em class="parameter"><code>action</code></em> :</span></td><td>the action</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
217with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
218method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
219any)</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
220<em class="parameter"><code>action</code></em> is activated. This signal is intended for
221applications 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><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><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td><td>the uimanager that received the
222signal</td></tr><tr><td><span class="term"><em class="parameter"><code>action</code></em> :</span></td><td>the action</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
223with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
224method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
225any)</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
226<em class="parameter"><code>action</code></em> is activated.  This signal is intended for
227applications 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>
Note: See TracBrowser for help on using the repository browser.