1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>GtkUIManager</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
<link rel="up" href="Actions.html" title="Action-based menus and toolbars">
9
<link rel="prev" href="Actions.html" title="Action-based menus and toolbars">
10
<link rel="next" href="GtkActionGroup.html" title="GtkActionGroup">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
15
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
30
<link rel="chapter" href="Printing.html" title="Printing">
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
37
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
48
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
49
<link rel="glossary" href="glossary.html" title="Glossary">
50
<link rel="index" href="ix01.html" title="Index">
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
61
<td><a accesskey="p" href="Actions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="Actions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
64
<th width="100%" align="center">GTK+ Reference Manual</th>
65
<td><a accesskey="n" href="GtkActionGroup.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3416067" class="shortcut">Top</a>
69
<a href="#id3416805" class="shortcut">Description</a>
71
<a href="#id3416645" class="shortcut">Object Hierarchy</a>
73
<a href="#id3416669" class="shortcut">Properties</a>
75
<a href="#id3416720" class="shortcut">Signals</a></nobr></td></tr>
77
<div class="refentry" lang="en">
78
<a name="GtkUIManager"></a><div class="titlepage"></div>
79
<div class="refnamediv"><table width="100%"><tr>
82
<a name="id3416067"></a><span class="refentrytitle">GtkUIManager</span>
84
<p>GtkUIManager — Constructing menus and toolbars from an XML description</p>
86
<td valign="top" align="right"></td>
88
<div class="refsynopsisdiv">
90
<pre class="synopsis">
92
#include <gtk/gtk.h>
95
<a href="GtkUIManager.html#GtkUIManager-struct">GtkUIManager</a>;
96
<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a>* <a href="GtkUIManager.html#gtk-ui-manager-new">gtk_ui_manager_new</a> (void);
97
void <a href="GtkUIManager.html#gtk-ui-manager-set-add-tearoffs">gtk_ui_manager_set_add_tearoffs</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
98
gboolean add_tearoffs);
99
gboolean <a href="GtkUIManager.html#gtk-ui-manager-get-add-tearoffs">gtk_ui_manager_get_add_tearoffs</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
100
void <a href="GtkUIManager.html#gtk-ui-manager-insert-action-group">gtk_ui_manager_insert_action_group</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
101
<a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group,
103
void <a href="GtkUIManager.html#gtk-ui-manager-remove-action-group">gtk_ui_manager_remove_action_group</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
104
<a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group);
105
GList* <a href="GtkUIManager.html#gtk-ui-manager-get-action-groups">gtk_ui_manager_get_action_groups</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
106
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* <a href="GtkUIManager.html#gtk-ui-manager-get-accel-group">gtk_ui_manager_get_accel_group</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
107
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkUIManager.html#gtk-ui-manager-get-widget">gtk_ui_manager_get_widget</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
109
GSList* <a href="GtkUIManager.html#gtk-ui-manager-get-toplevels">gtk_ui_manager_get_toplevels</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
110
<a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> types);
111
<a href="GtkAction.html" title="GtkAction">GtkAction</a>* <a href="GtkUIManager.html#gtk-ui-manager-get-action">gtk_ui_manager_get_action</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
113
guint <a href="GtkUIManager.html#gtk-ui-manager-add-ui-from-string">gtk_ui_manager_add_ui_from_string</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
117
guint <a href="GtkUIManager.html#gtk-ui-manager-add-ui-from-file">gtk_ui_manager_add_ui_from_file</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
118
const gchar *filename,
120
guint <a href="GtkUIManager.html#gtk-ui-manager-new-merge-id">gtk_ui_manager_new_merge_id</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
121
enum <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a>;
122
void <a href="GtkUIManager.html#gtk-ui-manager-add-ui">gtk_ui_manager_add_ui</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
127
<a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> type,
129
void <a href="GtkUIManager.html#gtk-ui-manager-remove-ui">gtk_ui_manager_remove_ui</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
131
gchar* <a href="GtkUIManager.html#gtk-ui-manager-get-ui">gtk_ui_manager_get_ui</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
132
void <a href="GtkUIManager.html#gtk-ui-manager-ensure-update">gtk_ui_manager_ensure_update</a> (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
137
<div class="refsect1" lang="en">
138
<a name="id3416645"></a><h2>Object Hierarchy</h2>
139
<pre class="synopsis">
145
<div class="refsect1" lang="en">
146
<a name="id3416669"></a><h2>Properties</h2>
147
<pre class="synopsis">
149
"<a href="GtkUIManager.html#GtkUIManager--add-tearoffs">add-tearoffs</a>" gboolean : Read / Write
150
"<a href="GtkUIManager.html#GtkUIManager--ui">ui</a>" gchararray : Read
153
<div class="refsect1" lang="en">
154
<a name="id3416720"></a><h2>Signals</h2>
155
<pre class="synopsis">
157
"<a href="GtkUIManager.html#GtkUIManager-actions-changed">actions-changed</a>" : Run First / No Recursion
158
"<a href="GtkUIManager.html#GtkUIManager-add-widget">add-widget</a>" : Run First / No Recursion
159
"<a href="GtkUIManager.html#GtkUIManager-connect-proxy">connect-proxy</a>" : Run First / No Recursion
160
"<a href="GtkUIManager.html#GtkUIManager-disconnect-proxy">disconnect-proxy</a>" : Run First / No Recursion
161
"<a href="GtkUIManager.html#GtkUIManager-post-activate">post-activate</a>" : Run First / No Recursion
162
"<a href="GtkUIManager.html#GtkUIManager-pre-activate">pre-activate</a>" : Run First / No Recursion
165
<div class="refsect1" lang="en">
166
<a name="id3416805"></a><h2>Description</h2>
168
A <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> constructs a user interface (menus and toolbars) from
169
one or more UI definitions, which reference actions from one or more
172
<div class="refsect2" lang="en">
173
<a name="XML-UI"></a><h3>UI Definitions</h3>
175
The UI definitions are specified in an XML format which can be
176
roughly described by the following DTD.
178
<pre class="programlisting">
179
<!ELEMENT ui (menubar|toolbar|popup|accelerator)* >
180
<!ELEMENT menubar (menuitem|separator|placeholder|menu)* >
181
<!ELEMENT menu (menuitem|separator|placeholder|menu)* >
182
<!ELEMENT popup (menuitem|separator|placeholder|menu)* >
183
<!ELEMENT toolbar (toolitem|separator|placeholder)* >
184
<!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
185
<!ELEMENT menuitem EMPTY >
186
<!ELEMENT toolitem (menu?) >
187
<!ELEMENT separator EMPTY >
188
<!ELEMENT accelerator EMPTY >
189
<!ATTLIST menubar name #IMPLIED
191
<!ATTLIST toolbar name #IMPLIED
193
<!ATTLIST popup name #IMPLIED
195
<!ATTLIST placeholder name #IMPLIED
197
<!ATTLIST separator name #IMPLIED
199
expand (true|false) #IMPLIED >
200
<!ATTLIST menu name #IMPLIED
202
position (top|bot) #IMPLIED >
203
<!ATTLIST menuitem name #IMPLIED
205
position (top|bot) #IMPLIED >
206
<!ATTLIST toolitem name #IMPLIED
208
position (top|bot) #IMPLIED >
209
<!ATTLIST accelerator name #IMPLIED
210
action #REQUIRED >
213
There are some additional restrictions beyond those specified in the
214
DTD, e.g. every toolitem must have a toolbar in its anchestry and
215
every menuitem must have a menubar or popup in its anchestry. Since
216
a <span class="type">GMarkup</span> parser is used to parse the UI description, it must not only
217
be valid XML, but valid <span class="type">GMarkup</span>.
220
If a name is not specified, it defaults to the action. If an action is
221
not specified either, the element name is used. The name and action
222
attributes must not contain '/' characters after parsing (since that
223
would mess up path lookup) and must be usable as XML attributes when
224
enclosed in doublequotes, thus they must not '"' characters or references
225
to the &quot; entity.
227
<div class="example">
228
<a name="id3416872"></a><p class="title"><b>Example 22. A UI definition</b></p>
229
<div class="example-contents"><pre class="programlisting">
232
<menu name="FileMenu" action="FileMenuAction">
233
<menuitem name="New" action="New2Action" />
234
<placeholder name="FileMenuAdditions" />
236
<menu name="JustifyMenu" action="JustifyMenuAction">
237
<menuitem name="Left" action="justify-left"/>
238
<menuitem name="Centre" action="justify-center"/>
239
<menuitem name="Right" action="justify-right"/>
240
<menuitem name="Fill" action="justify-fill"/>
243
<toolbar action="toolbar1">
244
<placeholder name="JustifyToolItems">
246
<toolitem name="Left" action="justify-left"/>
247
<toolitem name="Centre" action="justify-center"/>
248
<toolitem name="Right" action="justify-right"/>
249
<toolitem name="Fill" action="justify-fill"/>
256
<br class="example-break"><p>
257
The constructed widget hierarchy is very similar to the element tree
258
of the XML, with the exception that placeholders are merged into their
259
parents. The correspondence of XML elements to widgets should be
262
<div class="variablelist"><table border="0">
263
<col align="left" valign="top">
266
<td><span class="term">menubar</span></td>
267
<td><p>a <a href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></p></td>
270
<td><span class="term">toolbar</span></td>
271
<td><p>a <a href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></p></td>
274
<td><span class="term">popup</span></td>
275
<td><p>a toplevel <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a></p></td>
278
<td><span class="term">menu</span></td>
279
<td><p>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> attached to a menuitem</p></td>
282
<td><span class="term">menuitem</span></td>
283
<td><p>a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> subclass, the exact type depends on the
287
<td><span class="term">toolitem</span></td>
288
<td><p>a <a href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> subclass, the exact type depends on the
289
action. Note that toolitem elements may contain a menu element, but only
290
if their associated action specifies a <a href="GtkMenuToolButton.html" title="GtkMenuToolButton"><span class="type">GtkMenuToolButton</span></a> as proxy.</p></td>
293
<td><span class="term">separator</span></td>
294
<td><p>a <a href="GtkSeparatorMenuItem.html" title="GtkSeparatorMenuItem"><span class="type">GtkSeparatorMenuItem</span></a> or
295
<a href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem"><span class="type">GtkSeparatorToolItem</span></a></p></td>
298
<td><span class="term">accelerator</span></td>
299
<td><p>a keyboard accelerator</p></td>
306
The "position" attribute determines where a constructed widget is positioned
307
wrt. to its siblings in the partially constructed tree. If it is
308
"top", the widget is prepended, otherwise it is appended.
312
<div class="refsect2" lang="en">
313
<a name="UI-Merging"></a><h3>UI Merging</h3>
315
The most remarkable feature of <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> is that it can overlay a set
316
of menuitems and toolitems over another one, and demerge them later.
319
Merging is done based on the names of the XML elements. Each element is
320
identified by a path which consists of the names of its anchestors, separated
321
by slashes. For example, the menuitem named "Left" in the example above
322
has the path <code class="literal">/ui/menubar/JustifyMenu/Left</code> and the
323
toolitem with the same name has path
324
<code class="literal">/ui/toolbar1/JustifyToolItems/Left</code>.
328
<div class="refsect2" lang="en">
329
<a name="id3417199"></a><h3>Accelerators</h3>
331
Every action has an accelerator path. Accelerators are installed together with
332
menuitem proxies, but they can also be explicitly added with <accelerator>
333
elements in the UI definition. This makes it possible to have accelerators for
334
actions even if they have no visible proxies.
338
<div class="refsect2" lang="en">
339
<a name="Smart-Separators"></a><h3>Smart Separators</h3>
341
The separators created by <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> are "smart", i.e. they do not show up
342
in the UI unless they end up between two visible menu or tool items. Separators
343
which are located at the very beginning or end of the menu or toolbar
344
containing them, or multiple separators next to each other, are hidden. This
345
is a useful feature, since the merging of UI elements from multiple sources
346
can make it hard or impossible to determine in advance whether a separator
347
will end up in such an unfortunate position.
350
For separators in toolbars, you can set <code class="literal">expand="true"</code> to
351
turn them from a small, visible separator to an expanding, invisible one.
352
Toolitems following an expanding separator are effectively right-aligned.
356
<div class="refsect2" lang="en">
357
<a name="id3417256"></a><h3>Empty Menus</h3>
359
Submenus pose similar problems to separators inconnection with merging. It is
360
impossible to know in advance whether they will end up empty after merging.
361
<a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> offers two ways to treat empty submenus:
363
<div class="itemizedlist"><ul type="disc">
364
<li><p>make them disappear by hiding the menu item they're attached to
366
<li><p>add an insensitive "Empty" item
370
The behaviour is chosen based on the "hide_if_empty" property of the action
371
to which the submenu is associated.
375
<div class="refsect1" lang="en">
376
<a name="id3417294"></a><h2>Details</h2>
377
<div class="refsect2" lang="en">
378
<a name="id3417304"></a><h3>
379
<a name="GtkUIManager-struct"></a>GtkUIManager</h3>
380
<a class="indexterm" name="id3417317"></a><pre class="programlisting">typedef struct _GtkUIManager GtkUIManager;</pre>
382
The <span class="structname">GtkUIManager</span> struct contains only private
383
members and should not be accessed directly.
387
<div class="refsect2" lang="en">
388
<a name="id3417337"></a><h3>
389
<a name="gtk-ui-manager-new"></a>gtk_ui_manager_new ()</h3>
390
<a class="indexterm" name="id3417353"></a><pre class="programlisting"><a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a>* gtk_ui_manager_new (void);</pre>
392
Creates a new ui manager object.</p>
396
<div class="variablelist"><table border="0">
397
<col align="left" valign="top">
399
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
400
<td> a new ui manager object.
405
<p class="since">Since 2.4
409
<div class="refsect2" lang="en">
410
<a name="id3417400"></a><h3>
411
<a name="gtk-ui-manager-set-add-tearoffs"></a>gtk_ui_manager_set_add_tearoffs ()</h3>
412
<a class="indexterm" name="id3417416"></a><pre class="programlisting">void gtk_ui_manager_set_add_tearoffs (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
413
gboolean add_tearoffs);</pre>
415
Sets the "add_tearoffs" property, which controls whether menus
416
generated by this <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> will have tearoff menu items.
419
Note that this only affects regular menus. Generated popup
420
menus never have tearoff menu items.</p>
424
<div class="variablelist"><table border="0">
425
<col align="left" valign="top">
428
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
429
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
433
<td><span class="term"><em class="parameter"><code>add_tearoffs</code></em> :</span></td>
434
<td> whether tearoff menu items are added
439
<p class="since">Since 2.4
443
<div class="refsect2" lang="en">
444
<a name="id3417518"></a><h3>
445
<a name="gtk-ui-manager-get-add-tearoffs"></a>gtk_ui_manager_get_add_tearoffs ()</h3>
446
<a class="indexterm" name="id3417534"></a><pre class="programlisting">gboolean gtk_ui_manager_get_add_tearoffs (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
448
Returns whether menus generated by this <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
449
will have tearoff menu items.</p>
453
<div class="variablelist"><table border="0">
454
<col align="left" valign="top">
457
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
458
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
462
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
463
<td> whether tearoff menu items are added
469
<p class="since">Since 2.4
473
<div class="refsect2" lang="en">
474
<a name="id3417620"></a><h3>
475
<a name="gtk-ui-manager-insert-action-group"></a>gtk_ui_manager_insert_action_group ()</h3>
476
<a class="indexterm" name="id3417636"></a><pre class="programlisting">void gtk_ui_manager_insert_action_group (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
477
<a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group,
480
Inserts an action group into the list of action groups associated
481
with <em class="parameter"><code>self</code></em>. Actions in earlier groups hide actions with the same
482
name in later groups.</p>
486
<div class="variablelist"><table border="0">
487
<col align="left" valign="top">
490
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
491
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
495
<td><span class="term"><em class="parameter"><code>action_group</code></em> :</span></td>
496
<td> the action group to be inserted
500
<td><span class="term"><em class="parameter"><code>pos</code></em> :</span></td>
501
<td> the position at which the group will be inserted.
506
<p class="since">Since 2.4
510
<div class="refsect2" lang="en">
511
<a name="id3417753"></a><h3>
512
<a name="gtk-ui-manager-remove-action-group"></a>gtk_ui_manager_remove_action_group ()</h3>
513
<a class="indexterm" name="id3417770"></a><pre class="programlisting">void gtk_ui_manager_remove_action_group (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
514
<a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group);</pre>
516
Removes an action group from the list of action groups associated
517
with <em class="parameter"><code>self</code></em>.</p>
521
<div class="variablelist"><table border="0">
522
<col align="left" valign="top">
525
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
526
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
530
<td><span class="term"><em class="parameter"><code>action_group</code></em> :</span></td>
531
<td> the action group to be removed
536
<p class="since">Since 2.4
540
<div class="refsect2" lang="en">
541
<a name="id3417864"></a><h3>
542
<a name="gtk-ui-manager-get-action-groups"></a>gtk_ui_manager_get_action_groups ()</h3>
543
<a class="indexterm" name="id3417879"></a><pre class="programlisting">GList* gtk_ui_manager_get_action_groups (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
545
Returns the list of action groups associated with <em class="parameter"><code>self</code></em>.</p>
549
<div class="variablelist"><table border="0">
550
<col align="left" valign="top">
553
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
554
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
558
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
559
<td> a <span class="type">GList</span> of action groups. The list is owned by GTK+
560
and should not be modified.
566
<p class="since">Since 2.4
570
<div class="refsect2" lang="en">
571
<a name="id3417970"></a><h3>
572
<a name="gtk-ui-manager-get-accel-group"></a>gtk_ui_manager_get_accel_group ()</h3>
573
<a class="indexterm" name="id3417986"></a><pre class="programlisting"><a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* gtk_ui_manager_get_accel_group (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
575
Returns the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with <em class="parameter"><code>self</code></em>.</p>
579
<div class="variablelist"><table border="0">
580
<col align="left" valign="top">
583
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
584
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
588
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
589
<td> the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>.
595
<p class="since">Since 2.4
599
<div class="refsect2" lang="en">
600
<a name="id3418085"></a><h3>
601
<a name="gtk-ui-manager-get-widget"></a>gtk_ui_manager_get_widget ()</h3>
602
<a class="indexterm" name="id3418101"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_ui_manager_get_widget (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
603
const gchar *path);</pre>
605
Looks up a widget by following a path.
606
The path consists of the names specified in the XML description of the UI.
607
separated by '/'. Elements which don't have a name or action attribute in
608
the XML (e.g. <popup>) can be addressed by their XML element name
609
(e.g. "popup"). The root element ("/ui") can be omitted in the path.
612
Note that the widget found by following a path that ends in a <menu>
613
element is the menuitem to which the menu is attached, not the menu itself.
616
Also note that the widgets constructed by a ui manager are not tied to
617
the lifecycle of the ui manager. If you add the widgets returned by this
618
function to some container or explicitly ref them, they will survive the
619
destruction of the ui manager.</p>
623
<div class="variablelist"><table border="0">
624
<col align="left" valign="top">
627
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
628
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
632
<td><span class="term"><em class="parameter"><code>path</code></em> :</span></td>
637
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
638
<td> the widget found by following the path, or <a
639
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
640
><code class="literal">NULL</code></a> if no widget
647
<p class="since">Since 2.4
651
<div class="refsect2" lang="en">
652
<a name="id3418233"></a><h3>
653
<a name="gtk-ui-manager-get-toplevels"></a>gtk_ui_manager_get_toplevels ()</h3>
654
<a class="indexterm" name="id3418249"></a><pre class="programlisting">GSList* gtk_ui_manager_get_toplevels (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
655
<a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> types);</pre>
657
Obtains a list of all toplevel widgets of the requested types.</p>
661
<div class="variablelist"><table border="0">
662
<col align="left" valign="top">
665
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
666
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
670
<td><span class="term"><em class="parameter"><code>types</code></em> :</span></td>
671
<td> specifies the types of toplevel widgets to include. Allowed
672
types are <a href="GtkUIManager.html#GTK-UI-MANAGER-MENUBAR:CAPS"><span class="type">GTK_UI_MANAGER_MENUBAR</span></a>, <a href="GtkUIManager.html#GTK-UI-MANAGER-TOOLBAR:CAPS"><span class="type">GTK_UI_MANAGER_TOOLBAR</span></a> and
673
<a href="GtkUIManager.html#GTK-UI-MANAGER-POPUP:CAPS"><span class="type">GTK_UI_MANAGER_POPUP</span></a>.
677
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
678
<td> a newly-allocated of all toplevel widgets of the requested
685
<p class="since">Since 2.4
689
<div class="refsect2" lang="en">
690
<a name="id3418380"></a><h3>
691
<a name="gtk-ui-manager-get-action"></a>gtk_ui_manager_get_action ()</h3>
692
<a class="indexterm" name="id3418396"></a><pre class="programlisting"><a href="GtkAction.html" title="GtkAction">GtkAction</a>* gtk_ui_manager_get_action (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
693
const gchar *path);</pre>
695
Looks up an action by following a path. See <a href="GtkUIManager.html#gtk-ui-manager-get-widget"><code class="function">gtk_ui_manager_get_widget()</code></a>
696
for more information about paths.</p>
700
<div class="variablelist"><table border="0">
701
<col align="left" valign="top">
704
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
705
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
709
<td><span class="term"><em class="parameter"><code>path</code></em> :</span></td>
714
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
715
<td> the action whose proxy widget is found by following the path,
717
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
718
><code class="literal">NULL</code></a> if no widget was found.
724
<p class="since">Since 2.4
728
<div class="refsect2" lang="en">
729
<a name="id3418516"></a><h3>
730
<a name="gtk-ui-manager-add-ui-from-string"></a>gtk_ui_manager_add_ui_from_string ()</h3>
731
<a class="indexterm" name="id3418533"></a><pre class="programlisting">guint gtk_ui_manager_add_ui_from_string (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
734
GError **error);</pre>
736
Parses a string containing a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and
737
merges it with the current contents of <em class="parameter"><code>self</code></em>. An enclosing <ui>
738
element is added if it is missing.</p>
742
<div class="variablelist"><table border="0">
743
<col align="left" valign="top">
746
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
747
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
751
<td><span class="term"><em class="parameter"><code>buffer</code></em> :</span></td>
752
<td> the string to parse
756
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
757
<td> the length of <em class="parameter"><code>buffer</code></em> (may be -1 if <em class="parameter"><code>buffer</code></em> is nul-terminated)
761
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
762
<td> return location for an error
766
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
767
<td> The merge id for the merged UI. The merge id can be used
768
to unmerge the UI with <a href="GtkUIManager.html#gtk-ui-manager-remove-ui"><code class="function">gtk_ui_manager_remove_ui()</code></a>. If an error occurred,
769
the return value is 0.
775
<p class="since">Since 2.4
779
<div class="refsect2" lang="en">
780
<a name="id3418716"></a><h3>
781
<a name="gtk-ui-manager-add-ui-from-file"></a>gtk_ui_manager_add_ui_from_file ()</h3>
782
<a class="indexterm" name="id3418732"></a><pre class="programlisting">guint gtk_ui_manager_add_ui_from_file (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
783
const gchar *filename,
784
GError **error);</pre>
786
Parses a file containing a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and
787
merges it with the current contents of <em class="parameter"><code>self</code></em>.</p>
791
<div class="variablelist"><table border="0">
792
<col align="left" valign="top">
795
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
796
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
800
<td><span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
801
<td> the name of the file to parse
805
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
806
<td> return location for an error
810
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
811
<td> The merge id for the merged UI. The merge id can be used
812
to unmerge the UI with <a href="GtkUIManager.html#gtk-ui-manager-remove-ui"><code class="function">gtk_ui_manager_remove_ui()</code></a>. If an error occurred,
813
the return value is 0.
819
<p class="since">Since 2.4
823
<div class="refsect2" lang="en">
824
<a name="id3418879"></a><h3>
825
<a name="gtk-ui-manager-new-merge-id"></a>gtk_ui_manager_new_merge_id ()</h3>
826
<a class="indexterm" name="id3418895"></a><pre class="programlisting">guint gtk_ui_manager_new_merge_id (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
828
Returns an unused merge id, suitable for use with
829
<a href="GtkUIManager.html#gtk-ui-manager-add-ui"><code class="function">gtk_ui_manager_add_ui()</code></a>.</p>
833
<div class="variablelist"><table border="0">
834
<col align="left" valign="top">
837
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
838
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
842
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
843
<td> an unused merge id.
849
<p class="since">Since 2.4
853
<div class="refsect2" lang="en">
854
<a name="id3418982"></a><h3>
855
<a name="GtkUIManagerItemType"></a>enum GtkUIManagerItemType</h3>
856
<a class="indexterm" name="id3418995"></a><pre class="programlisting">typedef enum {
857
GTK_UI_MANAGER_AUTO = 0,
858
GTK_UI_MANAGER_MENUBAR = 1 << 0,
859
GTK_UI_MANAGER_MENU = 1 << 1,
860
GTK_UI_MANAGER_TOOLBAR = 1 << 2,
861
GTK_UI_MANAGER_PLACEHOLDER = 1 << 3,
862
GTK_UI_MANAGER_POPUP = 1 << 4,
863
GTK_UI_MANAGER_MENUITEM = 1 << 5,
864
GTK_UI_MANAGER_TOOLITEM = 1 << 6,
865
GTK_UI_MANAGER_SEPARATOR = 1 << 7,
866
GTK_UI_MANAGER_ACCELERATOR = 1 << 8
867
} GtkUIManagerItemType;
870
These enumeration values are used by <a href="GtkUIManager.html#gtk-ui-manager-add-ui"><code class="function">gtk_ui_manager_add_ui()</code></a> to determine
871
what UI element to create.
873
<div class="variablelist"><table border="0">
874
<col align="left" valign="top">
877
<td><span class="term"><a name="GTK-UI-MANAGER-AUTO:CAPS"></a><code class="literal">GTK_UI_MANAGER_AUTO</code></span></td>
878
<td>Pick the type of the UI element according to context.
882
<td><span class="term"><a name="GTK-UI-MANAGER-MENUBAR:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENUBAR</code></span></td>
883
<td>Create a menubar.
887
<td><span class="term"><a name="GTK-UI-MANAGER-MENU:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENU</code></span></td>
892
<td><span class="term"><a name="GTK-UI-MANAGER-TOOLBAR:CAPS"></a><code class="literal">GTK_UI_MANAGER_TOOLBAR</code></span></td>
893
<td>Create a toolbar.
897
<td><span class="term"><a name="GTK-UI-MANAGER-PLACEHOLDER:CAPS"></a><code class="literal">GTK_UI_MANAGER_PLACEHOLDER</code></span></td>
898
<td>Insert a placeholder.
902
<td><span class="term"><a name="GTK-UI-MANAGER-POPUP:CAPS"></a><code class="literal">GTK_UI_MANAGER_POPUP</code></span></td>
903
<td>Create a popup menu.
907
<td><span class="term"><a name="GTK-UI-MANAGER-MENUITEM:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENUITEM</code></span></td>
908
<td>Create a menuitem.
912
<td><span class="term"><a name="GTK-UI-MANAGER-TOOLITEM:CAPS"></a><code class="literal">GTK_UI_MANAGER_TOOLITEM</code></span></td>
913
<td>Create a toolitem.
917
<td><span class="term"><a name="GTK-UI-MANAGER-SEPARATOR:CAPS"></a><code class="literal">GTK_UI_MANAGER_SEPARATOR</code></span></td>
918
<td>Create a separator.
922
<td><span class="term"><a name="GTK-UI-MANAGER-ACCELERATOR:CAPS"></a><code class="literal">GTK_UI_MANAGER_ACCELERATOR</code></span></td>
923
<td>Install an accelerator.
931
<div class="refsect2" lang="en">
932
<a name="id3419270"></a><h3>
933
<a name="gtk-ui-manager-add-ui"></a>gtk_ui_manager_add_ui ()</h3>
934
<a class="indexterm" name="id3419286"></a><pre class="programlisting">void gtk_ui_manager_add_ui (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
939
<a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> type,
942
Adds a UI element to the current contents of <em class="parameter"><code>self</code></em>.
945
If <em class="parameter"><code>type</code></em> is <a href="GtkUIManager.html#GTK-UI-MANAGER-AUTO:CAPS"><code class="literal">GTK_UI_MANAGER_AUTO</code></a>, GTK+ inserts a menuitem, toolitem or
946
separator if such an element can be inserted at the place determined by
947
<em class="parameter"><code>path</code></em>. Otherwise <em class="parameter"><code>type</code></em> must indicate an element that can be inserted at
948
the place determined by <em class="parameter"><code>path</code></em>.
951
If <em class="parameter"><code>path</code></em> points to a menuitem or toolitem, the new element will be inserted
952
before or after this item, depending on <em class="parameter"><code>top</code></em>.</p>
956
<div class="variablelist"><table border="0">
957
<col align="left" valign="top">
960
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
961
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
965
<td><span class="term"><em class="parameter"><code>merge_id</code></em> :</span></td>
966
<td> the merge id for the merged UI, see <a href="GtkUIManager.html#gtk-ui-manager-new-merge-id"><code class="function">gtk_ui_manager_new_merge_id()</code></a>
970
<td><span class="term"><em class="parameter"><code>path</code></em> :</span></td>
975
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
976
<td> the name for the added UI element
980
<td><span class="term"><em class="parameter"><code>action</code></em> :</span></td>
981
<td> the name of the action to be proxied, or <a
982
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
983
><code class="literal">NULL</code></a> to add a separator
987
<td><span class="term"><em class="parameter"><code>type</code></em> :</span></td>
988
<td> the type of UI element to add.
992
<td><span class="term"><em class="parameter"><code>top</code></em> :</span></td>
993
<td> if <code class="literal">TRUE</code>, the UI element is added before its siblings, otherwise it
994
is added after its siblings.
999
<p class="since">Since 2.4
1003
<div class="refsect2" lang="en">
1004
<a name="id3419581"></a><h3>
1005
<a name="gtk-ui-manager-remove-ui"></a>gtk_ui_manager_remove_ui ()</h3>
1006
<a class="indexterm" name="id3419596"></a><pre class="programlisting">void gtk_ui_manager_remove_ui (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
1007
guint merge_id);</pre>
1009
Unmerges the part of <em class="parameter"><code>self</code></em>s content identified by <em class="parameter"><code>merge_id</code></em>.</p>
1013
<div class="variablelist"><table border="0">
1014
<col align="left" valign="top">
1017
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
1018
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
1022
<td><span class="term"><em class="parameter"><code>merge_id</code></em> :</span></td>
1023
<td> a merge id as returned by <a href="GtkUIManager.html#gtk-ui-manager-add-ui-from-string"><code class="function">gtk_ui_manager_add_ui_from_string()</code></a>
1028
<p class="since">Since 2.4
1032
<div class="refsect2" lang="en">
1033
<a name="id3419708"></a><h3>
1034
<a name="gtk-ui-manager-get-ui"></a>gtk_ui_manager_get_ui ()</h3>
1035
<a class="indexterm" name="id3419724"></a><pre class="programlisting">gchar* gtk_ui_manager_get_ui (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
1037
Creates a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> of the merged UI.</p>
1041
<div class="variablelist"><table border="0">
1042
<col align="left" valign="top">
1045
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
1046
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
1050
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1051
<td> A newly allocated string containing an XML representation of
1058
<p class="since">Since 2.4
1062
<div class="refsect2" lang="en">
1063
<a name="id3419807"></a><h3>
1064
<a name="gtk-ui-manager-ensure-update"></a>gtk_ui_manager_ensure_update ()</h3>
1065
<a class="indexterm" name="id3419823"></a><pre class="programlisting">void gtk_ui_manager_ensure_update (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
1067
Makes sure that all pending updates to the UI have been completed.
1070
This may occasionally be necessary, since <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> updates the
1071
UI in an idle function. A typical example where this function is
1072
useful is to enforce that the menubar and toolbar have been added to
1073
the main window before showing it:
1075
<div class="informalexample"><pre class="programlisting">
1076
gtk_container_add (GTK_CONTAINER (window), vbox);
1077
g_signal_connect (merge, "add_widget",
1078
G_CALLBACK (add_widget), vbox);
1079
gtk_ui_manager_add_ui_from_file (merge, "my-menus");
1080
gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
1081
gtk_ui_manager_ensure_update (merge);
1082
gtk_widget_show (window);
1087
<div class="variablelist"><table border="0">
1088
<col align="left" valign="top">
1090
<td><span class="term"><em class="parameter"><code>self</code></em> :</span></td>
1091
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
1095
<p class="since">Since 2.4
1099
<div class="refsect1" lang="en">
1100
<a name="id3419919"></a><h2>Property Details</h2>
1101
<div class="refsect2" lang="en">
1102
<a name="id3419930"></a><h3>
1103
<a name="GtkUIManager--add-tearoffs"></a>The "<code class="literal">add-tearoffs</code>" property</h3>
1104
<a class="indexterm" name="id3419946"></a><pre class="programlisting"> "add-tearoffs" gboolean : Read / Write</pre>
1106
The "add-tearoffs" property controls whether generated menus
1107
have tearoff menu items.
1110
Note that this only affects regular menus. Generated popup
1111
menus never have tearoff menu items.</p>
1115
<p>Default value: FALSE</p>
1120
<div class="refsect2" lang="en">
1121
<a name="id3419988"></a><h3>
1122
<a name="GtkUIManager--ui"></a>The "<code class="literal">ui</code>" property</h3>
1123
<a class="indexterm" name="id3420004"></a><pre class="programlisting"> "ui" gchararray : Read</pre>
1124
<p>An XML string describing the merged UI.</p>
1125
<p>Default value: "<ui>\n</ui>\n"</p>
1128
<div class="refsect1" lang="en">
1129
<a name="id3420032"></a><h2>Signal Details</h2>
1130
<div class="refsect2" lang="en">
1131
<a name="id3420042"></a><h3>
1132
<a name="GtkUIManager-actions-changed"></a>The "actions-changed" signal</h3>
1133
<a class="indexterm" name="id3420054"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
1134
gpointer user_data) : Run First / No Recursion</pre>
1136
The "actions-changed" signal is emitted whenever the set of actions
1141
<div class="variablelist"><table border="0">
1142
<col align="left" valign="top">
1145
<td><span class="term"><em class="parameter"><code>merge</code></em> :</span></td>
1146
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
1150
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1151
<td>user data set when the signal handler was connected.</td>
1159
<div class="refsect2" lang="en">
1160
<a name="id3420139"></a><h3>
1161
<a name="GtkUIManager-add-widget"></a>The "add-widget" signal</h3>
1162
<a class="indexterm" name="id3420150"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
1163
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget,
1164
gpointer user_data) : Run First / No Recursion</pre>
1166
The add_widget signal is emitted for each generated menubar and toolbar.
1167
It is not emitted for generated popup menus, which can be obtained by
1168
<a href="GtkUIManager.html#gtk-ui-manager-get-widget"><code class="function">gtk_ui_manager_get_widget()</code></a>.</p>
1172
<div class="variablelist"><table border="0">
1173
<col align="left" valign="top">
1176
<td><span class="term"><em class="parameter"><code>merge</code></em> :</span></td>
1177
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
1181
<td><span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
1182
<td> the added widget
1186
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1187
<td>user data set when the signal handler was connected.</td>
1195
<div class="refsect2" lang="en">
1196
<a name="id3420269"></a><h3>
1197
<a name="GtkUIManager-connect-proxy"></a>The "connect-proxy" signal</h3>
1198
<a class="indexterm" name="id3420280"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
1199
<a href="GtkAction.html" title="GtkAction">GtkAction</a> *action,
1200
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *proxy,
1201
gpointer user_data) : Run First / No Recursion</pre>
1203
The connect_proxy signal is emitted after connecting a proxy to
1204
an action in the group.
1207
This is intended for simple customizations for which a custom action
1208
class would be too clumsy, e.g. showing tooltips for menuitems in the
1213
<div class="variablelist"><table border="0">
1214
<col align="left" valign="top">
1217
<td><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td>
1222
<td><span class="term"><em class="parameter"><code>action</code></em> :</span></td>
1227
<td><span class="term"><em class="parameter"><code>proxy</code></em> :</span></td>
1232
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1233
<td>user data set when the signal handler was connected.</td>
1241
<div class="refsect2" lang="en">
1242
<a name="id3420407"></a><h3>
1243
<a name="GtkUIManager-disconnect-proxy"></a>The "disconnect-proxy" signal</h3>
1244
<a class="indexterm" name="id3420418"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
1245
<a href="GtkAction.html" title="GtkAction">GtkAction</a> *action,
1246
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *proxy,
1247
gpointer user_data) : Run First / No Recursion</pre>
1249
The disconnect_proxy signal is emitted after disconnecting a proxy
1250
from an action in the group.</p>
1254
<div class="variablelist"><table border="0">
1255
<col align="left" valign="top">
1258
<td><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td>
1263
<td><span class="term"><em class="parameter"><code>action</code></em> :</span></td>
1268
<td><span class="term"><em class="parameter"><code>proxy</code></em> :</span></td>
1273
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1274
<td>user data set when the signal handler was connected.</td>
1282
<div class="refsect2" lang="en">
1283
<a name="id3420540"></a><h3>
1284
<a name="GtkUIManager-post-activate"></a>The "post-activate" signal</h3>
1285
<a class="indexterm" name="id3420551"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
1286
<a href="GtkAction.html" title="GtkAction">GtkAction</a> *action,
1287
gpointer user_data) : Run First / No Recursion</pre>
1289
The post_activate signal is emitted just after the <em class="parameter"><code>action</code></em>
1293
This is intended for applications to get notification
1294
just after any action is activated.</p>
1298
<div class="variablelist"><table border="0">
1299
<col align="left" valign="top">
1302
<td><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td>
1307
<td><span class="term"><em class="parameter"><code>action</code></em> :</span></td>
1312
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1313
<td>user data set when the signal handler was connected.</td>
1321
<div class="refsect2" lang="en">
1322
<a name="id3420661"></a><h3>
1323
<a name="GtkUIManager-pre-activate"></a>The "pre-activate" signal</h3>
1324
<a class="indexterm" name="id3420672"></a><pre class="programlisting">void user_function (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
1325
<a href="GtkAction.html" title="GtkAction">GtkAction</a> *action,
1326
gpointer user_data) : Run First / No Recursion</pre>
1328
The pre_activate signal is emitted just before the <em class="parameter"><code>action</code></em>
1332
This is intended for applications to get notification
1333
just before any action is activated.</p>
1337
<div class="variablelist"><table border="0">
1338
<col align="left" valign="top">
1341
<td><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></td>
1346
<td><span class="term"><em class="parameter"><code>action</code></em> :</span></td>
1351
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
1352
<td>user data set when the signal handler was connected.</td>