~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to share/gtk-doc/html/gtk2/GtkUIManager.html

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>GtkUIManager</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
7
<link rel="home" href="index.html" title="GTK+ 2 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.18 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="Actions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="Actions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
 
21
<td><a accesskey="n" href="GtkActionGroup.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#GtkUIManager.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#GtkUIManager.description" class="shortcut">Description</a>
 
27
                   | 
 
28
                  <a href="#GtkUIManager.object-hierarchy" class="shortcut">Object Hierarchy</a>
 
29
                   | 
 
30
                  <a href="#GtkUIManager.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
 
31
                   | 
 
32
                  <a href="#GtkUIManager.properties" class="shortcut">Properties</a>
 
33
                   | 
 
34
                  <a href="#GtkUIManager.signals" class="shortcut">Signals</a>
 
35
</td></tr>
 
36
</table>
 
37
<div class="refentry">
 
38
<a name="GtkUIManager"></a><div class="titlepage"></div>
 
39
<div class="refnamediv"><table width="100%"><tr>
 
40
<td valign="top">
 
41
<h2><span class="refentrytitle"><a name="GtkUIManager.top_of_page"></a>GtkUIManager</span></h2>
 
42
<p>GtkUIManager — Constructing menus and toolbars from an XML description</p>
 
43
</td>
 
44
<td valign="top" align="right"></td>
 
45
</tr></table></div>
 
46
<div class="refsynopsisdiv">
 
47
<a name="GtkUIManager.synopsis"></a><h2>Synopsis</h2>
 
48
<pre class="synopsis">
 
49
#include &lt;gtk/gtk.h&gt;
 
50
 
 
51
struct              <a class="link" href="GtkUIManager.html#GtkUIManager-struct" title="struct GtkUIManager">GtkUIManager</a>;
 
52
<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="returnvalue">GtkUIManager</span></a> *      <a class="link" href="GtkUIManager.html#gtk-ui-manager-new" title="gtk_ui_manager_new ()">gtk_ui_manager_new</a>                  (<em class="parameter"><code><span class="type">void</span></code></em>);
 
53
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-set-add-tearoffs" title="gtk_ui_manager_set_add_tearoffs ()">gtk_ui_manager_set_add_tearoffs</a>     (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
54
                                                         <em class="parameter"><code><span class="type">gboolean</span> add_tearoffs</code></em>);
 
55
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-add-tearoffs" title="gtk_ui_manager_get_add_tearoffs ()">gtk_ui_manager_get_add_tearoffs</a>     (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
56
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-insert-action-group" title="gtk_ui_manager_insert_action_group ()">gtk_ui_manager_insert_action_group</a>  (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
57
                                                         <em class="parameter"><code><a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
 
58
                                                         <em class="parameter"><code><span class="type">gint</span> pos</code></em>);
 
59
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-remove-action-group" title="gtk_ui_manager_remove_action_group ()">gtk_ui_manager_remove_action_group</a>  (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
60
                                                         <em class="parameter"><code><a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);
 
61
<span class="returnvalue">GList</span> *             <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-action-groups" title="gtk_ui_manager_get_action_groups ()">gtk_ui_manager_get_action_groups</a>    (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
62
<a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> *     <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-accel-group" title="gtk_ui_manager_get_accel_group ()">gtk_ui_manager_get_accel_group</a>      (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
63
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-widget" title="gtk_ui_manager_get_widget ()">gtk_ui_manager_get_widget</a>           (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
64
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);
 
65
<span class="returnvalue">GSList</span> *            <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-toplevels" title="gtk_ui_manager_get_toplevels ()">gtk_ui_manager_get_toplevels</a>        (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
66
                                                         <em class="parameter"><code><a class="link" href="GtkUIManager.html#GtkUIManagerItemType" title="enum GtkUIManagerItemType"><span class="type">GtkUIManagerItemType</span></a> types</code></em>);
 
67
<a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *         <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-action" title="gtk_ui_manager_get_action ()">gtk_ui_manager_get_action</a>           (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
68
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);
 
69
<span class="returnvalue">guint</span>               <a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui-from-string" title="gtk_ui_manager_add_ui_from_string ()">gtk_ui_manager_add_ui_from_string</a>   (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
70
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *buffer</code></em>,
 
71
                                                         <em class="parameter"><code><span class="type">gssize</span> length</code></em>,
 
72
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
 
73
#define             <a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui-from-file" title="gtk_ui_manager_add_ui_from_file">gtk_ui_manager_add_ui_from_file</a>
 
74
<span class="returnvalue">guint</span>               <a class="link" href="GtkUIManager.html#gtk-ui-manager-new-merge-id" title="gtk_ui_manager_new_merge_id ()">gtk_ui_manager_new_merge_id</a>         (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
75
enum                <a class="link" href="GtkUIManager.html#GtkUIManagerItemType" title="enum GtkUIManagerItemType">GtkUIManagerItemType</a>;
 
76
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui" title="gtk_ui_manager_add_ui ()">gtk_ui_manager_add_ui</a>               (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
77
                                                         <em class="parameter"><code><span class="type">guint</span> merge_id</code></em>,
 
78
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
79
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
 
80
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *action</code></em>,
 
81
                                                         <em class="parameter"><code><a class="link" href="GtkUIManager.html#GtkUIManagerItemType" title="enum GtkUIManagerItemType"><span class="type">GtkUIManagerItemType</span></a> type</code></em>,
 
82
                                                         <em class="parameter"><code><span class="type">gboolean</span> top</code></em>);
 
83
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-remove-ui" title="gtk_ui_manager_remove_ui ()">gtk_ui_manager_remove_ui</a>            (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
84
                                                         <em class="parameter"><code><span class="type">guint</span> merge_id</code></em>);
 
85
<span class="returnvalue">gchar</span> *             <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-ui" title="gtk_ui_manager_get_ui ()">gtk_ui_manager_get_ui</a>               (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
86
<span class="returnvalue">void</span>                <a class="link" href="GtkUIManager.html#gtk-ui-manager-ensure-update" title="gtk_ui_manager_ensure_update ()">gtk_ui_manager_ensure_update</a>        (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);
 
87
</pre>
 
88
</div>
 
89
<div class="refsect1">
 
90
<a name="GtkUIManager.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
91
<pre class="synopsis">
 
92
  GObject
 
93
   +----GtkUIManager
 
94
</pre>
 
95
</div>
 
96
<div class="refsect1">
 
97
<a name="GtkUIManager.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
 
98
<p>
 
99
GtkUIManager implements
 
100
 <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
 
101
</div>
 
102
<div class="refsect1">
 
103
<a name="GtkUIManager.properties"></a><h2>Properties</h2>
 
104
<pre class="synopsis">
 
105
  "<a class="link" href="GtkUIManager.html#GtkUIManager--add-tearoffs" title='The "add-tearoffs" property'>add-tearoffs</a>"             <span class="type">gboolean</span>              : Read / Write
 
106
  "<a class="link" href="GtkUIManager.html#GtkUIManager--ui" title='The "ui" property'>ui</a>"                       <span class="type">gchar</span>*                : Read
 
107
</pre>
 
108
</div>
 
109
<div class="refsect1">
 
110
<a name="GtkUIManager.signals"></a><h2>Signals</h2>
 
111
<pre class="synopsis">
 
112
  "<a class="link" href="GtkUIManager.html#GtkUIManager-actions-changed" title='The "actions-changed" signal'>actions-changed</a>"                                : <code class="literal">No Recursion</code>
 
113
  "<a class="link" href="GtkUIManager.html#GtkUIManager-add-widget" title='The "add-widget" signal'>add-widget</a>"                                     : <code class="literal">No Recursion</code>
 
114
  "<a class="link" href="GtkUIManager.html#GtkUIManager-connect-proxy" title='The "connect-proxy" signal'>connect-proxy</a>"                                  : <code class="literal">No Recursion</code>
 
115
  "<a class="link" href="GtkUIManager.html#GtkUIManager-disconnect-proxy" title='The "disconnect-proxy" signal'>disconnect-proxy</a>"                               : <code class="literal">No Recursion</code>
 
116
  "<a class="link" href="GtkUIManager.html#GtkUIManager-post-activate" title='The "post-activate" signal'>post-activate</a>"                                  : <code class="literal">No Recursion</code>
 
117
  "<a class="link" href="GtkUIManager.html#GtkUIManager-pre-activate" title='The "pre-activate" signal'>pre-activate</a>"                                   : <code class="literal">No Recursion</code>
 
118
</pre>
 
119
</div>
 
120
<div class="refsect1">
 
121
<a name="GtkUIManager.description"></a><h2>Description</h2>
 
122
<p>
 
123
A <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> constructs a user interface (menus and toolbars) from
 
124
one or more UI definitions, which reference actions from one or more
 
125
action groups.
 
126
</p>
 
127
<div class="refsect2">
 
128
<a name="XML-UI"></a><h3>UI Definitions</h3>
 
129
<p>
 
130
The UI definitions are specified in an XML format which can be
 
131
roughly described by the following DTD.
 
132
</p>
 
133
<p>
 
134
Do not confuse the GtkUIManager UI Definitions described here with
 
135
the similarly named <a class="link" href="GtkBuilder.html#BUILDER-UI" title="GtkBuilder UI Definitions">GtkBuilder UI
 
136
Definitions</a>.
 
137
</p>
 
138
<p>
 
139
</p>
 
140
<pre class="programlisting">
 
141
&lt;!ELEMENT ui          (menubar|toolbar|popup|accelerator)* &gt;
 
142
&lt;!ELEMENT menubar     (menuitem|separator|placeholder|menu)* &gt;
 
143
&lt;!ELEMENT menu        (menuitem|separator|placeholder|menu)* &gt;
 
144
&lt;!ELEMENT popup       (menuitem|separator|placeholder|menu)* &gt;
 
145
&lt;!ELEMENT toolbar     (toolitem|separator|placeholder)* &gt;
 
146
&lt;!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* &gt;
 
147
&lt;!ELEMENT menuitem     EMPTY &gt;
 
148
&lt;!ELEMENT toolitem     (menu?) &gt;
 
149
&lt;!ELEMENT separator    EMPTY &gt;
 
150
&lt;!ELEMENT accelerator  EMPTY &gt;
 
151
&lt;!ATTLIST menubar      name                      &amp;num;IMPLIED
 
152
                       action                    &amp;num;IMPLIED &gt;
 
153
&lt;!ATTLIST toolbar      name                      &amp;num;IMPLIED
 
154
                       action                    &amp;num;IMPLIED &gt;
 
155
&lt;!ATTLIST popup        name                      &amp;num;IMPLIED
 
156
                       action                    &amp;num;IMPLIED
 
157
                       accelerators (true|false) &amp;num;IMPLIED &gt;
 
158
&lt;!ATTLIST placeholder  name                      &amp;num;IMPLIED
 
159
                       action                    &amp;num;IMPLIED &gt;
 
160
&lt;!ATTLIST separator    name                      &amp;num;IMPLIED
 
161
                       action                    &amp;num;IMPLIED
 
162
                       expand       (true|false) &amp;num;IMPLIED &gt;
 
163
&lt;!ATTLIST menu         name                      &amp;num;IMPLIED
 
164
                       action                    &amp;num;REQUIRED
 
165
                       position     (top|bot)    &amp;num;IMPLIED &gt;
 
166
&lt;!ATTLIST menuitem     name                      &amp;num;IMPLIED
 
167
                       action                    &amp;num;REQUIRED
 
168
                       position     (top|bot)    &amp;num;IMPLIED
 
169
                       always-show-image (true|false) &amp;num;IMPLIED &gt;
 
170
&lt;!ATTLIST toolitem     name                      &amp;num;IMPLIED
 
171
                       action                    &amp;num;REQUIRED
 
172
                       position     (top|bot)    &amp;num;IMPLIED &gt;
 
173
&lt;!ATTLIST accelerator  name                      &amp;num;IMPLIED
 
174
                       action                    &amp;num;REQUIRED &gt;
 
175
</pre>
 
176
<p>
 
177
There are some additional restrictions beyond those specified in the
 
178
DTD, e.g. every toolitem must have a toolbar in its anchestry and
 
179
every menuitem must have a menubar or popup in its anchestry. Since
 
180
a <span class="type">GMarkup</span> parser is used to parse the UI description, it must not only
 
181
be valid XML, but valid <span class="type">GMarkup</span>.
 
182
</p>
 
183
<p>
 
184
If a name is not specified, it defaults to the action. If an action is
 
185
not specified either, the element name is used. The name and action
 
186
attributes must not contain '/' characters after parsing (since that
 
187
would mess up path lookup) and must be usable as XML attributes when
 
188
enclosed in doublequotes, thus they must not '"' characters or references
 
189
to the &amp;quot; entity.
 
190
</p>
 
191
<div class="example">
 
192
<a name="idp78428560"></a><p class="title"><b>Example 36. A UI definition</b></p>
 
193
<div class="example-contents">
 
194
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
195
    <tbody>
 
196
      <tr>
 
197
        <td class="listing_lines" align="right"><pre>1
 
198
2
 
199
3
 
200
4
 
201
5
 
202
6
 
203
7
 
204
8
 
205
9
 
206
10
 
207
11
 
208
12
 
209
13
 
210
14
 
211
15
 
212
16
 
213
17
 
214
18
 
215
19
 
216
20
 
217
21
 
218
22
 
219
23
 
220
24</pre></td>
 
221
        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="normal">ui</span><span class="symbol">&gt;</span>
 
222
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">menubar</span><span class="symbol">&gt;</span>
 
223
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"FileMenu"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"FileMenuAction"</span><span class="symbol">&gt;</span>
 
224
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menuitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"New"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"New2Action"</span><span class="normal"> </span><span class="symbol">/&gt;</span>
 
225
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">placeholder</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"FileMenuAdditions"</span><span class="normal"> </span><span class="symbol">/&gt;</span>
 
226
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
 
227
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"JustifyMenu"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"JustifyMenuAction"</span><span class="symbol">&gt;</span>
 
228
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menuitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Left"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-left"</span><span class="symbol">/&gt;</span>
 
229
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menuitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Centre"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-center"</span><span class="symbol">/&gt;</span>
 
230
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menuitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Right"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-right"</span><span class="symbol">/&gt;</span>
 
231
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menuitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Fill"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-fill"</span><span class="symbol">/&gt;</span>
 
232
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
 
233
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">menubar</span><span class="symbol">&gt;</span>
 
234
<span class="normal">  </span><span class="symbol">&lt;</span><span class="usertype">toolbar</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"toolbar1"</span><span class="symbol">&gt;</span>
 
235
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">placeholder</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"JustifyToolItems"</span><span class="symbol">&gt;</span>
 
236
<span class="normal">      </span><span class="symbol">&lt;</span><span class="normal">separator</span><span class="symbol">/&gt;</span>
 
237
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">toolitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Left"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-left"</span><span class="symbol">/&gt;</span>
 
238
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">toolitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Centre"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-center"</span><span class="symbol">/&gt;</span>
 
239
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">toolitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Right"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-right"</span><span class="symbol">/&gt;</span>
 
240
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">toolitem</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"Fill"</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"justify-fill"</span><span class="symbol">/&gt;</span>
 
241
<span class="normal">      </span><span class="symbol">&lt;</span><span class="normal">separator</span><span class="symbol">/&gt;</span>
 
242
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">placeholder</span><span class="symbol">&gt;</span>
 
243
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">toolbar</span><span class="symbol">&gt;</span>
 
244
<span class="symbol">&lt;/</span><span class="normal">ui</span><span class="symbol">&gt;</span></pre></td>
 
245
      </tr>
 
246
    </tbody>
 
247
  </table>
 
248
</div>
 
249
 
 
250
</div>
 
251
<br class="example-break"><p>
 
252
The constructed widget hierarchy is very similar to the element tree
 
253
of the XML, with the exception that placeholders are merged into their
 
254
parents. The correspondence of XML elements to widgets should be
 
255
almost obvious:
 
256
</p>
 
257
<div class="variablelist"><table border="0" class="variablelist">
 
258
<colgroup>
 
259
<col align="left" valign="top">
 
260
<col>
 
261
</colgroup>
 
262
<tbody>
 
263
<tr>
 
264
<td><p><span class="term">menubar</span></p></td>
 
265
<td><p>a <a class="link" href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></p></td>
 
266
</tr>
 
267
<tr>
 
268
<td><p><span class="term">toolbar</span></p></td>
 
269
<td><p>a <a class="link" href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></p></td>
 
270
</tr>
 
271
<tr>
 
272
<td><p><span class="term">popup</span></p></td>
 
273
<td><p>a toplevel <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a></p></td>
 
274
</tr>
 
275
<tr>
 
276
<td><p><span class="term">menu</span></p></td>
 
277
<td><p>a <a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> attached to a menuitem</p></td>
 
278
</tr>
 
279
<tr>
 
280
<td><p><span class="term">menuitem</span></p></td>
 
281
<td><p>a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> subclass, the exact type depends on the
 
282
action</p></td>
 
283
</tr>
 
284
<tr>
 
285
<td><p><span class="term">toolitem</span></p></td>
 
286
<td><p>a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> subclass, the exact type depends on the
 
287
action. Note that toolitem elements may contain a menu element, but only
 
288
if their associated action specifies a <a class="link" href="GtkMenuToolButton.html" title="GtkMenuToolButton"><span class="type">GtkMenuToolButton</span></a> as proxy.</p></td>
 
289
</tr>
 
290
<tr>
 
291
<td><p><span class="term">separator</span></p></td>
 
292
<td><p>a <a class="link" href="GtkSeparatorMenuItem.html" title="GtkSeparatorMenuItem"><span class="type">GtkSeparatorMenuItem</span></a> or
 
293
<a class="link" href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem"><span class="type">GtkSeparatorToolItem</span></a></p></td>
 
294
</tr>
 
295
<tr>
 
296
<td><p><span class="term">accelerator</span></p></td>
 
297
<td><p>a keyboard accelerator</p></td>
 
298
</tr>
 
299
</tbody>
 
300
</table></div>
 
301
<p>
 
302
</p>
 
303
<p>
 
304
The "position" attribute determines where a constructed widget is positioned
 
305
wrt. to its siblings in the partially constructed tree. If it is
 
306
"top", the widget is prepended, otherwise it is appended.
 
307
</p>
 
308
</div>
 
309
<hr>
 
310
<div class="refsect2">
 
311
<a name="UI-Merging"></a><h3>UI Merging</h3>
 
312
<p>
 
313
The most remarkable feature of <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> is that it can overlay a set
 
314
of menuitems and toolitems over another one, and demerge them later.
 
315
</p>
 
316
<p>
 
317
Merging is done based on the names of the XML elements. Each element is
 
318
identified by a path which consists of the names of its anchestors, separated
 
319
by slashes. For example, the menuitem named "Left" in the example above
 
320
has the path <code class="literal">/ui/menubar/JustifyMenu/Left</code> and the
 
321
toolitem with the same name has path
 
322
<code class="literal">/ui/toolbar1/JustifyToolItems/Left</code>.
 
323
</p>
 
324
</div>
 
325
<hr>
 
326
<div class="refsect2">
 
327
<a name="idp78633984"></a><h3>Accelerators</h3>
 
328
<p>
 
329
Every action has an accelerator path. Accelerators are installed together with
 
330
menuitem proxies, but they can also be explicitly added with &lt;accelerator&gt;
 
331
elements in the UI definition. This makes it possible to have accelerators for
 
332
actions even if they have no visible proxies.
 
333
</p>
 
334
</div>
 
335
<hr>
 
336
<div class="refsect2">
 
337
<a name="Smart-Separators"></a><h3>Smart Separators</h3>
 
338
<p>
 
339
The separators created by <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> are "smart", i.e. they do not show up
 
340
in the UI unless they end up between two visible menu or tool items. Separators
 
341
which are located at the very beginning or end of the menu or toolbar
 
342
containing them, or multiple separators next to each other, are hidden. This
 
343
is a useful feature, since the merging of UI elements from multiple sources
 
344
can make it hard or impossible to determine in advance whether a separator
 
345
will end up in such an unfortunate position.
 
346
</p>
 
347
<p>
 
348
For separators in toolbars, you can set <code class="literal">expand="true"</code> to
 
349
turn them from a small, visible separator to an expanding, invisible one.
 
350
Toolitems following an expanding separator are effectively right-aligned.
 
351
</p>
 
352
</div>
 
353
<hr>
 
354
<div class="refsect2">
 
355
<a name="idp78639920"></a><h3>Empty Menus</h3>
 
356
<p>
 
357
Submenus pose similar problems to separators inconnection with merging. It is
 
358
impossible to know in advance whether they will end up empty after merging.
 
359
<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> offers two ways to treat empty submenus:
 
360
</p>
 
361
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 
362
<li class="listitem"><p>make them disappear by hiding the menu item they're attached to
 
363
</p></li>
 
364
<li class="listitem"><p>add an insensitive "Empty" item
 
365
</p></li>
 
366
</ul></div>
 
367
<p>
 
368
The behaviour is chosen based on the "hide_if_empty" property of the action
 
369
to which the submenu is associated.
 
370
</p>
 
371
</div>
 
372
<hr>
 
373
<div class="refsect2">
 
374
<a name="GtkUIManager-BUILDER-UI"></a><h3>GtkUIManager as GtkBuildable</h3>
 
375
<p>
 
376
The GtkUIManager implementation of the GtkBuildable interface accepts
 
377
GtkActionGroup objects as &lt;child&gt; elements in UI definitions.
 
378
</p>
 
379
<p>
 
380
A GtkUIManager UI definition as described above can be embedded in
 
381
an GtkUIManager &lt;object&gt; element in a GtkBuilder UI definition.
 
382
</p>
 
383
<p>
 
384
The widgets that are constructed by a GtkUIManager can be embedded in
 
385
other parts of the constructed user interface with the help of the
 
386
"constructor" attribute. See the example below.
 
387
</p>
 
388
<div class="example">
 
389
<a name="idp78646704"></a><p class="title"><b>Example 37. An embedded GtkUIManager UI definition</b></p>
 
390
<div class="example-contents">
 
391
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
392
    <tbody>
 
393
      <tr>
 
394
        <td class="listing_lines" align="right"><pre>1
 
395
2
 
396
3
 
397
4
 
398
5
 
399
6
 
400
7
 
401
8
 
402
9
 
403
10
 
404
11
 
405
12
 
406
13
 
407
14
 
408
15
 
409
16
 
410
17
 
411
18
 
412
19
 
413
20
 
414
21
 
415
22</pre></td>
 
416
        <td class="listing_code"><pre class="programlisting"><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkUIManager"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"uiman"</span><span class="symbol">&gt;</span>
 
417
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
418
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkActionGroup"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"actiongroup"</span><span class="symbol">&gt;</span>
 
419
<span class="normal">      </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
420
<span class="normal">        </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkAction"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"file"</span><span class="symbol">&gt;</span>
 
421
<span class="normal">          </span><span class="symbol">&lt;</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"label"</span><span class="symbol">&gt;</span><span class="normal">_File</span><span class="symbol">&lt;/</span><span class="normal">property</span><span class="symbol">&gt;</span>
 
422
<span class="normal">        </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
 
423
<span class="normal">      </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
424
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
 
425
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
426
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">ui</span><span class="symbol">&gt;</span>
 
427
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">menubar</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"menubar1"</span><span class="symbol">&gt;</span>
 
428
<span class="normal">      </span><span class="symbol">&lt;</span><span class="usertype">menu</span><span class="normal"> action</span><span class="symbol">=</span><span class="string">"file"</span><span class="symbol">&gt;</span>
 
429
<span class="normal">      </span><span class="symbol">&lt;/</span><span class="normal">menu</span><span class="symbol">&gt;</span>
 
430
<span class="normal">    </span><span class="symbol">&lt;/</span><span class="normal">menubar</span><span class="symbol">&gt;</span>
 
431
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">ui</span><span class="symbol">&gt;</span>
 
432
<span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span>
 
433
<span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkWindow"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"main-window"</span><span class="symbol">&gt;</span>
 
434
<span class="normal">  </span><span class="symbol">&lt;</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
435
<span class="normal">    </span><span class="symbol">&lt;</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkMenuBar"</span><span class="normal"> id</span><span class="symbol">=</span><span class="string">"menubar1"</span><span class="normal"> constructor</span><span class="symbol">=</span><span class="string">"uiman"</span><span class="symbol">/&gt;</span>
 
436
<span class="normal">  </span><span class="symbol">&lt;/</span><span class="normal">child</span><span class="symbol">&gt;</span>
 
437
<span class="symbol">&lt;/</span><span class="normal">object</span><span class="symbol">&gt;</span></pre></td>
 
438
      </tr>
 
439
    </tbody>
 
440
  </table>
 
441
</div>
 
442
 
 
443
</div>
 
444
<br class="example-break">
 
445
</div>
 
446
</div>
 
447
<div class="refsect1">
 
448
<a name="GtkUIManager.details"></a><h2>Details</h2>
 
449
<div class="refsect2">
 
450
<a name="GtkUIManager-struct"></a><h3>struct GtkUIManager</h3>
 
451
<pre class="programlisting">struct GtkUIManager;</pre>
 
452
<p>
 
453
The <span class="structname">GtkUIManager</span> struct contains only private
 
454
members and should not be accessed directly.
 
455
</p>
 
456
</div>
 
457
<hr>
 
458
<div class="refsect2">
 
459
<a name="gtk-ui-manager-new"></a><h3>gtk_ui_manager_new ()</h3>
 
460
<pre class="programlisting"><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="returnvalue">GtkUIManager</span></a> *      gtk_ui_manager_new                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
461
<p>
 
462
Creates a new ui manager object.
 
463
</p>
 
464
<div class="variablelist"><table border="0" class="variablelist">
 
465
<colgroup>
 
466
<col align="left" valign="top">
 
467
<col>
 
468
</colgroup>
 
469
<tbody><tr>
 
470
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
471
<td>a new ui manager object.</td>
 
472
</tr></tbody>
 
473
</table></div>
 
474
<p class="since">Since 2.4</p>
 
475
</div>
 
476
<hr>
 
477
<div class="refsect2">
 
478
<a name="gtk-ui-manager-set-add-tearoffs"></a><h3>gtk_ui_manager_set_add_tearoffs ()</h3>
 
479
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_set_add_tearoffs     (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
480
                                                         <em class="parameter"><code><span class="type">gboolean</span> add_tearoffs</code></em>);</pre>
 
481
<p>
 
482
Sets the "add_tearoffs" property, which controls whether menus 
 
483
generated by this <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> will have tearoff menu items. 
 
484
</p>
 
485
<p>
 
486
Note that this only affects regular menus. Generated popup 
 
487
menus never have tearoff menu items.
 
488
</p>
 
489
<div class="variablelist"><table border="0" class="variablelist">
 
490
<colgroup>
 
491
<col align="left" valign="top">
 
492
<col>
 
493
</colgroup>
 
494
<tbody>
 
495
<tr>
 
496
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
497
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
498
</td>
 
499
</tr>
 
500
<tr>
 
501
<td><p><span class="term"><em class="parameter"><code>add_tearoffs</code></em> :</span></p></td>
 
502
<td>whether tearoff menu items are added</td>
 
503
</tr>
 
504
</tbody>
 
505
</table></div>
 
506
<p class="since">Since 2.4</p>
 
507
</div>
 
508
<hr>
 
509
<div class="refsect2">
 
510
<a name="gtk-ui-manager-get-add-tearoffs"></a><h3>gtk_ui_manager_get_add_tearoffs ()</h3>
 
511
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_ui_manager_get_add_tearoffs     (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
512
<p>
 
513
Returns whether menus generated by this <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
514
will have tearoff menu items.
 
515
</p>
 
516
<div class="variablelist"><table border="0" class="variablelist">
 
517
<colgroup>
 
518
<col align="left" valign="top">
 
519
<col>
 
520
</colgroup>
 
521
<tbody>
 
522
<tr>
 
523
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
524
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
525
</td>
 
526
</tr>
 
527
<tr>
 
528
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
529
<td>whether tearoff menu items are added</td>
 
530
</tr>
 
531
</tbody>
 
532
</table></div>
 
533
<p class="since">Since 2.4</p>
 
534
</div>
 
535
<hr>
 
536
<div class="refsect2">
 
537
<a name="gtk-ui-manager-insert-action-group"></a><h3>gtk_ui_manager_insert_action_group ()</h3>
 
538
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_insert_action_group  (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
539
                                                         <em class="parameter"><code><a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
 
540
                                                         <em class="parameter"><code><span class="type">gint</span> pos</code></em>);</pre>
 
541
<p>
 
542
Inserts an action group into the list of action groups associated 
 
543
with <em class="parameter"><code>self</code></em>. Actions in earlier groups hide actions with the same 
 
544
name in later groups.
 
545
</p>
 
546
<div class="variablelist"><table border="0" class="variablelist">
 
547
<colgroup>
 
548
<col align="left" valign="top">
 
549
<col>
 
550
</colgroup>
 
551
<tbody>
 
552
<tr>
 
553
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
554
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
555
</tr>
 
556
<tr>
 
557
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
 
558
<td>the action group to be inserted</td>
 
559
</tr>
 
560
<tr>
 
561
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
 
562
<td>the position at which the group will be inserted.</td>
 
563
</tr>
 
564
</tbody>
 
565
</table></div>
 
566
<p class="since">Since 2.4</p>
 
567
</div>
 
568
<hr>
 
569
<div class="refsect2">
 
570
<a name="gtk-ui-manager-remove-action-group"></a><h3>gtk_ui_manager_remove_action_group ()</h3>
 
571
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_remove_action_group  (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
572
                                                         <em class="parameter"><code><a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);</pre>
 
573
<p>
 
574
Removes an action group from the list of action groups associated 
 
575
with <em class="parameter"><code>self</code></em>.
 
576
</p>
 
577
<div class="variablelist"><table border="0" class="variablelist">
 
578
<colgroup>
 
579
<col align="left" valign="top">
 
580
<col>
 
581
</colgroup>
 
582
<tbody>
 
583
<tr>
 
584
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
585
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
586
</tr>
 
587
<tr>
 
588
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
 
589
<td>the action group to be removed</td>
 
590
</tr>
 
591
</tbody>
 
592
</table></div>
 
593
<p class="since">Since 2.4</p>
 
594
</div>
 
595
<hr>
 
596
<div class="refsect2">
 
597
<a name="gtk-ui-manager-get-action-groups"></a><h3>gtk_ui_manager_get_action_groups ()</h3>
 
598
<pre class="programlisting"><span class="returnvalue">GList</span> *             gtk_ui_manager_get_action_groups    (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
599
<p>
 
600
Returns the list of action groups associated with <em class="parameter"><code>self</code></em>.
 
601
</p>
 
602
<div class="variablelist"><table border="0" class="variablelist">
 
603
<colgroup>
 
604
<col align="left" valign="top">
 
605
<col>
 
606
</colgroup>
 
607
<tbody>
 
608
<tr>
 
609
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
610
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
611
</tr>
 
612
<tr>
 
613
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
614
<td>a <span class="type">GList</span> of
 
615
action groups. The list is owned by GTK+
 
616
and should not be modified. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkActionGroup][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
617
</td>
 
618
</tr>
 
619
</tbody>
 
620
</table></div>
 
621
<p class="since">Since 2.4</p>
 
622
</div>
 
623
<hr>
 
624
<div class="refsect2">
 
625
<a name="gtk-ui-manager-get-accel-group"></a><h3>gtk_ui_manager_get_accel_group ()</h3>
 
626
<pre class="programlisting"><a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> *     gtk_ui_manager_get_accel_group      (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
627
<p>
 
628
Returns the <a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> associated with <em class="parameter"><code>self</code></em>.
 
629
</p>
 
630
<div class="variablelist"><table border="0" class="variablelist">
 
631
<colgroup>
 
632
<col align="left" valign="top">
 
633
<col>
 
634
</colgroup>
 
635
<tbody>
 
636
<tr>
 
637
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
638
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
639
</tr>
 
640
<tr>
 
641
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
642
<td>the <a class="link" href="gtk2-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
643
</td>
 
644
</tr>
 
645
</tbody>
 
646
</table></div>
 
647
<p class="since">Since 2.4</p>
 
648
</div>
 
649
<hr>
 
650
<div class="refsect2">
 
651
<a name="gtk-ui-manager-get-widget"></a><h3>gtk_ui_manager_get_widget ()</h3>
 
652
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_ui_manager_get_widget           (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
653
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);</pre>
 
654
<p>
 
655
Looks up a widget by following a path. 
 
656
The path consists of the names specified in the XML description of the UI. 
 
657
separated by '/'. Elements which don't have a name or action attribute in 
 
658
the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name 
 
659
(e.g. "popup"). The root element ("/ui") can be omitted in the path.
 
660
</p>
 
661
<p>
 
662
Note that the widget found by following a path that ends in a &lt;menu&gt;
 
663
element is the menuitem to which the menu is attached, not the menu itself.
 
664
</p>
 
665
<p>
 
666
Also note that the widgets constructed by a ui manager are not tied to 
 
667
the lifecycle of the ui manager. If you add the widgets returned by this 
 
668
function to some container or explicitly ref them, they will survive the
 
669
destruction of the ui manager.
 
670
</p>
 
671
<div class="variablelist"><table border="0" class="variablelist">
 
672
<colgroup>
 
673
<col align="left" valign="top">
 
674
<col>
 
675
</colgroup>
 
676
<tbody>
 
677
<tr>
 
678
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
679
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
680
</td>
 
681
</tr>
 
682
<tr>
 
683
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
684
<td>a path</td>
 
685
</tr>
 
686
<tr>
 
687
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
688
<td>the widget found by following the path, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no widget
 
689
was found. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
690
</td>
 
691
</tr>
 
692
</tbody>
 
693
</table></div>
 
694
<p class="since">Since 2.4</p>
 
695
</div>
 
696
<hr>
 
697
<div class="refsect2">
 
698
<a name="gtk-ui-manager-get-toplevels"></a><h3>gtk_ui_manager_get_toplevels ()</h3>
 
699
<pre class="programlisting"><span class="returnvalue">GSList</span> *            gtk_ui_manager_get_toplevels        (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
700
                                                         <em class="parameter"><code><a class="link" href="GtkUIManager.html#GtkUIManagerItemType" title="enum GtkUIManagerItemType"><span class="type">GtkUIManagerItemType</span></a> types</code></em>);</pre>
 
701
<p>
 
702
Obtains a list of all toplevel widgets of the requested types.
 
703
</p>
 
704
<div class="variablelist"><table border="0" class="variablelist">
 
705
<colgroup>
 
706
<col align="left" valign="top">
 
707
<col>
 
708
</colgroup>
 
709
<tbody>
 
710
<tr>
 
711
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
712
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
713
</td>
 
714
</tr>
 
715
<tr>
 
716
<td><p><span class="term"><em class="parameter"><code>types</code></em> :</span></p></td>
 
717
<td>specifies the types of toplevel widgets to include. Allowed
 
718
types are <a class="link" href="GtkUIManager.html#GTK-UI-MANAGER-MENUBAR:CAPS"><span class="type">GTK_UI_MANAGER_MENUBAR</span></a>, <a class="link" href="GtkUIManager.html#GTK-UI-MANAGER-TOOLBAR:CAPS"><span class="type">GTK_UI_MANAGER_TOOLBAR</span></a> and
 
719
<a class="link" href="GtkUIManager.html#GTK-UI-MANAGER-POPUP:CAPS"><span class="type">GTK_UI_MANAGER_POPUP</span></a>.</td>
 
720
</tr>
 
721
<tr>
 
722
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
723
<td>a newly-allocated <span class="type">GSList</span> of
 
724
all toplevel widgets of the requested types.  Free the returned list with <code class="function">g_slist_free()</code>. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
 
725
</td>
 
726
</tr>
 
727
</tbody>
 
728
</table></div>
 
729
<p class="since">Since 2.4</p>
 
730
</div>
 
731
<hr>
 
732
<div class="refsect2">
 
733
<a name="gtk-ui-manager-get-action"></a><h3>gtk_ui_manager_get_action ()</h3>
 
734
<pre class="programlisting"><a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *         gtk_ui_manager_get_action           (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
735
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>);</pre>
 
736
<p>
 
737
Looks up an action by following a path. See <a class="link" href="GtkUIManager.html#gtk-ui-manager-get-widget" title="gtk_ui_manager_get_widget ()"><code class="function">gtk_ui_manager_get_widget()</code></a>
 
738
for more information about paths.
 
739
</p>
 
740
<div class="variablelist"><table border="0" class="variablelist">
 
741
<colgroup>
 
742
<col align="left" valign="top">
 
743
<col>
 
744
</colgroup>
 
745
<tbody>
 
746
<tr>
 
747
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
748
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
749
</td>
 
750
</tr>
 
751
<tr>
 
752
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
753
<td>a path</td>
 
754
</tr>
 
755
<tr>
 
756
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
757
<td>the action whose proxy widget is found by following the path,
 
758
or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no widget was found. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
759
</td>
 
760
</tr>
 
761
</tbody>
 
762
</table></div>
 
763
<p class="since">Since 2.4</p>
 
764
</div>
 
765
<hr>
 
766
<div class="refsect2">
 
767
<a name="gtk-ui-manager-add-ui-from-string"></a><h3>gtk_ui_manager_add_ui_from_string ()</h3>
 
768
<pre class="programlisting"><span class="returnvalue">guint</span>               gtk_ui_manager_add_ui_from_string   (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
769
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *buffer</code></em>,
 
770
                                                         <em class="parameter"><code><span class="type">gssize</span> length</code></em>,
 
771
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
 
772
<p>
 
773
Parses a string containing a <a class="link" href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and 
 
774
merges it with the current contents of <em class="parameter"><code>self</code></em>. An enclosing &lt;ui&gt; 
 
775
element is added if it is missing.
 
776
</p>
 
777
<div class="variablelist"><table border="0" class="variablelist">
 
778
<colgroup>
 
779
<col align="left" valign="top">
 
780
<col>
 
781
</colgroup>
 
782
<tbody>
 
783
<tr>
 
784
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
785
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
786
</tr>
 
787
<tr>
 
788
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
 
789
<td>the string to parse</td>
 
790
</tr>
 
791
<tr>
 
792
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
 
793
<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)</td>
 
794
</tr>
 
795
<tr>
 
796
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
 
797
<td>return location for an error</td>
 
798
</tr>
 
799
<tr>
 
800
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
801
<td>The merge id for the merged UI. The merge id can be used
 
802
to unmerge the UI with <a class="link" href="GtkUIManager.html#gtk-ui-manager-remove-ui" title="gtk_ui_manager_remove_ui ()"><code class="function">gtk_ui_manager_remove_ui()</code></a>. If an error occurred,
 
803
the return value is 0.</td>
 
804
</tr>
 
805
</tbody>
 
806
</table></div>
 
807
<p class="since">Since 2.4</p>
 
808
</div>
 
809
<hr>
 
810
<div class="refsect2">
 
811
<a name="gtk-ui-manager-add-ui-from-file"></a><h3>gtk_ui_manager_add_ui_from_file</h3>
 
812
<pre class="programlisting">#define gtk_ui_manager_add_ui_from_file gtk_ui_manager_add_ui_from_file_utf8
 
813
</pre>
 
814
<p>
 
815
Parses a file containing a <a class="link" href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and 
 
816
merges it with the current contents of <em class="parameter"><code>self</code></em>.
 
817
</p>
 
818
<div class="variablelist"><table border="0" class="variablelist">
 
819
<colgroup>
 
820
<col align="left" valign="top">
 
821
<col>
 
822
</colgroup>
 
823
<tbody><tr>
 
824
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
825
<td>The merge id for the merged UI. The merge id can be used
 
826
to unmerge the UI with <a class="link" href="GtkUIManager.html#gtk-ui-manager-remove-ui" title="gtk_ui_manager_remove_ui ()"><code class="function">gtk_ui_manager_remove_ui()</code></a>. If an error occurred,
 
827
the return value is 0.</td>
 
828
</tr></tbody>
 
829
</table></div>
 
830
<p class="since">Since 2.4</p>
 
831
</div>
 
832
<hr>
 
833
<div class="refsect2">
 
834
<a name="gtk-ui-manager-new-merge-id"></a><h3>gtk_ui_manager_new_merge_id ()</h3>
 
835
<pre class="programlisting"><span class="returnvalue">guint</span>               gtk_ui_manager_new_merge_id         (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
836
<p>
 
837
Returns an unused merge id, suitable for use with 
 
838
<a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui" title="gtk_ui_manager_add_ui ()"><code class="function">gtk_ui_manager_add_ui()</code></a>.
 
839
</p>
 
840
<div class="variablelist"><table border="0" class="variablelist">
 
841
<colgroup>
 
842
<col align="left" valign="top">
 
843
<col>
 
844
</colgroup>
 
845
<tbody>
 
846
<tr>
 
847
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
848
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
849
</td>
 
850
</tr>
 
851
<tr>
 
852
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
853
<td>an unused merge id.</td>
 
854
</tr>
 
855
</tbody>
 
856
</table></div>
 
857
<p class="since">Since 2.4</p>
 
858
</div>
 
859
<hr>
 
860
<div class="refsect2">
 
861
<a name="GtkUIManagerItemType"></a><h3>enum GtkUIManagerItemType</h3>
 
862
<pre class="programlisting">typedef enum {
 
863
  GTK_UI_MANAGER_AUTO              = 0,
 
864
  GTK_UI_MANAGER_MENUBAR           = 1 &lt;&lt; 0,
 
865
  GTK_UI_MANAGER_MENU              = 1 &lt;&lt; 1,
 
866
  GTK_UI_MANAGER_TOOLBAR           = 1 &lt;&lt; 2,
 
867
  GTK_UI_MANAGER_PLACEHOLDER       = 1 &lt;&lt; 3,
 
868
  GTK_UI_MANAGER_POPUP             = 1 &lt;&lt; 4,
 
869
  GTK_UI_MANAGER_MENUITEM          = 1 &lt;&lt; 5,
 
870
  GTK_UI_MANAGER_TOOLITEM          = 1 &lt;&lt; 6,
 
871
  GTK_UI_MANAGER_SEPARATOR         = 1 &lt;&lt; 7,
 
872
  GTK_UI_MANAGER_ACCELERATOR       = 1 &lt;&lt; 8,
 
873
  GTK_UI_MANAGER_POPUP_WITH_ACCELS = 1 &lt;&lt; 9
 
874
} GtkUIManagerItemType;
 
875
</pre>
 
876
<p>
 
877
These enumeration values are used by <a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui" title="gtk_ui_manager_add_ui ()"><code class="function">gtk_ui_manager_add_ui()</code></a> to determine
 
878
what UI element to create.
 
879
</p>
 
880
<div class="variablelist"><table border="0" class="variablelist">
 
881
<colgroup>
 
882
<col align="left" valign="top">
 
883
<col>
 
884
</colgroup>
 
885
<tbody>
 
886
<tr>
 
887
<td><p><a name="GTK-UI-MANAGER-AUTO:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_AUTO</code></span></p></td>
 
888
<td>Pick the type of the UI element according to context.
 
889
</td>
 
890
</tr>
 
891
<tr>
 
892
<td><p><a name="GTK-UI-MANAGER-MENUBAR:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_MENUBAR</code></span></p></td>
 
893
<td>Create a menubar.
 
894
</td>
 
895
</tr>
 
896
<tr>
 
897
<td><p><a name="GTK-UI-MANAGER-MENU:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_MENU</code></span></p></td>
 
898
<td>Create a menu.
 
899
</td>
 
900
</tr>
 
901
<tr>
 
902
<td><p><a name="GTK-UI-MANAGER-TOOLBAR:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_TOOLBAR</code></span></p></td>
 
903
<td>Create a toolbar.
 
904
</td>
 
905
</tr>
 
906
<tr>
 
907
<td><p><a name="GTK-UI-MANAGER-PLACEHOLDER:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_PLACEHOLDER</code></span></p></td>
 
908
<td>Insert a placeholder.
 
909
</td>
 
910
</tr>
 
911
<tr>
 
912
<td><p><a name="GTK-UI-MANAGER-POPUP:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_POPUP</code></span></p></td>
 
913
<td>Create a popup menu.
 
914
</td>
 
915
</tr>
 
916
<tr>
 
917
<td><p><a name="GTK-UI-MANAGER-MENUITEM:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_MENUITEM</code></span></p></td>
 
918
<td>Create a menuitem.
 
919
</td>
 
920
</tr>
 
921
<tr>
 
922
<td><p><a name="GTK-UI-MANAGER-TOOLITEM:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_TOOLITEM</code></span></p></td>
 
923
<td>Create a toolitem.
 
924
</td>
 
925
</tr>
 
926
<tr>
 
927
<td><p><a name="GTK-UI-MANAGER-SEPARATOR:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_SEPARATOR</code></span></p></td>
 
928
<td>Create a separator.
 
929
</td>
 
930
</tr>
 
931
<tr>
 
932
<td><p><a name="GTK-UI-MANAGER-ACCELERATOR:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_ACCELERATOR</code></span></p></td>
 
933
<td>Install an accelerator.
 
934
</td>
 
935
</tr>
 
936
<tr>
 
937
<td><p><a name="GTK-UI-MANAGER-POPUP-WITH-ACCELS:CAPS"></a><span class="term"><code class="literal">GTK_UI_MANAGER_POPUP_WITH_ACCELS</code></span></p></td>
 
938
<td>Same as <a class="link" href="GtkUIManager.html#GTK-UI-MANAGER-POPUP:CAPS"><code class="literal">GTK_UI_MANAGER_POPUP</code></a>, but the actions' accelerators are shown.
 
939
</td>
 
940
</tr>
 
941
</tbody>
 
942
</table></div>
 
943
</div>
 
944
<hr>
 
945
<div class="refsect2">
 
946
<a name="gtk-ui-manager-add-ui"></a><h3>gtk_ui_manager_add_ui ()</h3>
 
947
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_add_ui               (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
948
                                                         <em class="parameter"><code><span class="type">guint</span> merge_id</code></em>,
 
949
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
950
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
 
951
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *action</code></em>,
 
952
                                                         <em class="parameter"><code><a class="link" href="GtkUIManager.html#GtkUIManagerItemType" title="enum GtkUIManagerItemType"><span class="type">GtkUIManagerItemType</span></a> type</code></em>,
 
953
                                                         <em class="parameter"><code><span class="type">gboolean</span> top</code></em>);</pre>
 
954
<p>
 
955
Adds a UI element to the current contents of <em class="parameter"><code>self</code></em>. 
 
956
</p>
 
957
<p>
 
958
If <em class="parameter"><code>type</code></em> is <a class="link" href="GtkUIManager.html#GTK-UI-MANAGER-AUTO:CAPS"><code class="literal">GTK_UI_MANAGER_AUTO</code></a>, GTK+ inserts a menuitem, toolitem or 
 
959
separator if such an element can be inserted at the place determined by 
 
960
<em class="parameter"><code>path</code></em>. Otherwise <em class="parameter"><code>type</code></em> must indicate an element that can be inserted at 
 
961
the place determined by <em class="parameter"><code>path</code></em>.
 
962
</p>
 
963
<p>
 
964
If <em class="parameter"><code>path</code></em> points to a menuitem or toolitem, the new element will be inserted
 
965
before or after this item, depending on <em class="parameter"><code>top</code></em>.
 
966
</p>
 
967
<div class="variablelist"><table border="0" class="variablelist">
 
968
<colgroup>
 
969
<col align="left" valign="top">
 
970
<col>
 
971
</colgroup>
 
972
<tbody>
 
973
<tr>
 
974
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
975
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
976
</td>
 
977
</tr>
 
978
<tr>
 
979
<td><p><span class="term"><em class="parameter"><code>merge_id</code></em> :</span></p></td>
 
980
<td>the merge id for the merged UI, see <a class="link" href="GtkUIManager.html#gtk-ui-manager-new-merge-id" title="gtk_ui_manager_new_merge_id ()"><code class="function">gtk_ui_manager_new_merge_id()</code></a>
 
981
</td>
 
982
</tr>
 
983
<tr>
 
984
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
985
<td>a path</td>
 
986
</tr>
 
987
<tr>
 
988
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
 
989
<td>the name for the added UI element</td>
 
990
</tr>
 
991
<tr>
 
992
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
 
993
<td>the name of the action to be proxied, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to add a separator. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
 
994
</td>
 
995
</tr>
 
996
<tr>
 
997
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
 
998
<td>the type of UI element to add.</td>
 
999
</tr>
 
1000
<tr>
 
1001
<td><p><span class="term"><em class="parameter"><code>top</code></em> :</span></p></td>
 
1002
<td>if <code class="literal">TRUE</code>, the UI element is added before its siblings, otherwise it
 
1003
is added after its siblings.</td>
 
1004
</tr>
 
1005
</tbody>
 
1006
</table></div>
 
1007
<p class="since">Since 2.4</p>
 
1008
</div>
 
1009
<hr>
 
1010
<div class="refsect2">
 
1011
<a name="gtk-ui-manager-remove-ui"></a><h3>gtk_ui_manager_remove_ui ()</h3>
 
1012
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_remove_ui            (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>,
 
1013
                                                         <em class="parameter"><code><span class="type">guint</span> merge_id</code></em>);</pre>
 
1014
<p>
 
1015
Unmerges the part of <em class="parameter"><code>self</code></em>s content identified by <em class="parameter"><code>merge_id</code></em>.
 
1016
</p>
 
1017
<div class="variablelist"><table border="0" class="variablelist">
 
1018
<colgroup>
 
1019
<col align="left" valign="top">
 
1020
<col>
 
1021
</colgroup>
 
1022
<tbody>
 
1023
<tr>
 
1024
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
1025
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object</td>
 
1026
</tr>
 
1027
<tr>
 
1028
<td><p><span class="term"><em class="parameter"><code>merge_id</code></em> :</span></p></td>
 
1029
<td>a merge id as returned by <a class="link" href="GtkUIManager.html#gtk-ui-manager-add-ui-from-string" title="gtk_ui_manager_add_ui_from_string ()"><code class="function">gtk_ui_manager_add_ui_from_string()</code></a>
 
1030
</td>
 
1031
</tr>
 
1032
</tbody>
 
1033
</table></div>
 
1034
<p class="since">Since 2.4</p>
 
1035
</div>
 
1036
<hr>
 
1037
<div class="refsect2">
 
1038
<a name="gtk-ui-manager-get-ui"></a><h3>gtk_ui_manager_get_ui ()</h3>
 
1039
<pre class="programlisting"><span class="returnvalue">gchar</span> *             gtk_ui_manager_get_ui               (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
1040
<p>
 
1041
Creates a <a class="link" href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> of the merged UI.
 
1042
</p>
 
1043
<div class="variablelist"><table border="0" class="variablelist">
 
1044
<colgroup>
 
1045
<col align="left" valign="top">
 
1046
<col>
 
1047
</colgroup>
 
1048
<tbody>
 
1049
<tr>
 
1050
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
1051
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
1052
</td>
 
1053
</tr>
 
1054
<tr>
 
1055
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1056
<td>A newly allocated string containing an XML representation of
 
1057
the merged UI.</td>
 
1058
</tr>
 
1059
</tbody>
 
1060
</table></div>
 
1061
<p class="since">Since 2.4</p>
 
1062
</div>
 
1063
<hr>
 
1064
<div class="refsect2">
 
1065
<a name="gtk-ui-manager-ensure-update"></a><h3>gtk_ui_manager_ensure_update ()</h3>
 
1066
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_ui_manager_ensure_update        (<em class="parameter"><code><a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *self</code></em>);</pre>
 
1067
<p>
 
1068
Makes sure that all pending updates to the UI have been completed.
 
1069
</p>
 
1070
<p>
 
1071
This may occasionally be necessary, since <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> updates the 
 
1072
UI in an idle function. A typical example where this function is
 
1073
useful is to enforce that the menubar and toolbar have been added to 
 
1074
the main window before showing it:
 
1075
</p>
 
1076
<div class="informalexample">
 
1077
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
1078
    <tbody>
 
1079
      <tr>
 
1080
        <td class="listing_lines" align="right"><pre>1
 
1081
2
 
1082
3
 
1083
4
 
1084
5
 
1085
6
 
1086
7</pre></td>
 
1087
        <td class="listing_code"><pre class="programlisting"><span class="function"><a href="GtkContainer.html#gtk-container-add">gtk_container_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">),</span><span class="normal"> vbox</span><span class="symbol">);</span><span class="normal"> </span>
 
1088
<span class="function">g_signal_connect</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">merge</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"add-widget"</span><span class="symbol">,</span><span class="normal"> </span>
 
1089
<span class="normal">                  </span><span class="function">G_CALLBACK</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">add_widget</span><span class="symbol">),</span><span class="normal"> vbox</span><span class="symbol">);</span>
 
1090
<span class="function"><a href="GtkUIManager.html#gtk-ui-manager-add-ui-from-file">gtk_ui_manager_add_ui_from_file</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">merge</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"my-menus"</span><span class="symbol">);</span>
 
1091
<span class="function"><a href="GtkUIManager.html#gtk-ui-manager-add-ui-from-file">gtk_ui_manager_add_ui_from_file</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">merge</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"my-toolbars"</span><span class="symbol">);</span>
 
1092
<span class="function"><a href="GtkUIManager.html#gtk-ui-manager-ensure-update">gtk_ui_manager_ensure_update</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">merge</span><span class="symbol">);</span><span class="normal">  </span>
 
1093
<span class="function"><a href="GtkWidget.html#gtk-widget-show">gtk_widget_show</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">);</span></pre></td>
 
1094
      </tr>
 
1095
    </tbody>
 
1096
  </table>
 
1097
</div>
 
1098
 
 
1099
<p>
 
1100
</p>
 
1101
<div class="variablelist"><table border="0" class="variablelist">
 
1102
<colgroup>
 
1103
<col align="left" valign="top">
 
1104
<col>
 
1105
</colgroup>
 
1106
<tbody><tr>
 
1107
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
 
1108
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
1109
</td>
 
1110
</tr></tbody>
 
1111
</table></div>
 
1112
<p class="since">Since 2.4</p>
 
1113
</div>
 
1114
</div>
 
1115
<div class="refsect1">
 
1116
<a name="GtkUIManager.property-details"></a><h2>Property Details</h2>
 
1117
<div class="refsect2">
 
1118
<a name="GtkUIManager--add-tearoffs"></a><h3>The <code class="literal">"add-tearoffs"</code> property</h3>
 
1119
<pre class="programlisting">  "add-tearoffs"             <span class="type">gboolean</span>              : Read / Write</pre>
 
1120
<p>
 
1121
The "add-tearoffs" property controls whether generated menus
 
1122
have tearoff menu items. 
 
1123
</p>
 
1124
<p>
 
1125
Note that this only affects regular menus. Generated popup 
 
1126
menus never have tearoff menu items.
 
1127
</p>
 
1128
<p>Default value: FALSE</p>
 
1129
<p class="since">Since 2.4</p>
 
1130
</div>
 
1131
<hr>
 
1132
<div class="refsect2">
 
1133
<a name="GtkUIManager--ui"></a><h3>The <code class="literal">"ui"</code> property</h3>
 
1134
<pre class="programlisting">  "ui"                       <span class="type">gchar</span>*                : Read</pre>
 
1135
<p>An XML string describing the merged UI.</p>
 
1136
<p>Default value: "&lt;ui&gt;\n&lt;/ui&gt;\n"</p>
 
1137
</div>
 
1138
</div>
 
1139
<div class="refsect1">
 
1140
<a name="GtkUIManager.signal-details"></a><h2>Signal Details</h2>
 
1141
<div class="refsect2">
 
1142
<a name="GtkUIManager-actions-changed"></a><h3>The <code class="literal">"actions-changed"</code> signal</h3>
 
1143
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *merge,
 
1144
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1145
<p>
 
1146
The "actions-changed" signal is emitted whenever the set of actions
 
1147
changes.
 
1148
</p>
 
1149
<div class="variablelist"><table border="0" class="variablelist">
 
1150
<colgroup>
 
1151
<col align="left" valign="top">
 
1152
<col>
 
1153
</colgroup>
 
1154
<tbody>
 
1155
<tr>
 
1156
<td><p><span class="term"><em class="parameter"><code>merge</code></em> :</span></p></td>
 
1157
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
1158
</td>
 
1159
</tr>
 
1160
<tr>
 
1161
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1162
<td>user data set when the signal handler was connected.</td>
 
1163
</tr>
 
1164
</tbody>
 
1165
</table></div>
 
1166
<p class="since">Since 2.4</p>
 
1167
</div>
 
1168
<hr>
 
1169
<div class="refsect2">
 
1170
<a name="GtkUIManager-add-widget"></a><h3>The <code class="literal">"add-widget"</code> signal</h3>
 
1171
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *merge,
 
1172
                                                        <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>    *widget,
 
1173
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1174
<p>
 
1175
The add_widget signal is emitted for each generated menubar and toolbar.
 
1176
It is not emitted for generated popup menus, which can be obtained by
 
1177
<a class="link" href="GtkUIManager.html#gtk-ui-manager-get-widget" title="gtk_ui_manager_get_widget ()"><code class="function">gtk_ui_manager_get_widget()</code></a>.
 
1178
</p>
 
1179
<div class="variablelist"><table border="0" class="variablelist">
 
1180
<colgroup>
 
1181
<col align="left" valign="top">
 
1182
<col>
 
1183
</colgroup>
 
1184
<tbody>
 
1185
<tr>
 
1186
<td><p><span class="term"><em class="parameter"><code>merge</code></em> :</span></p></td>
 
1187
<td>a <a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
 
1188
</td>
 
1189
</tr>
 
1190
<tr>
 
1191
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
 
1192
<td>the added widget</td>
 
1193
</tr>
 
1194
<tr>
 
1195
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1196
<td>user data set when the signal handler was connected.</td>
 
1197
</tr>
 
1198
</tbody>
 
1199
</table></div>
 
1200
<p class="since">Since 2.4</p>
 
1201
</div>
 
1202
<hr>
 
1203
<div class="refsect2">
 
1204
<a name="GtkUIManager-connect-proxy"></a><h3>The <code class="literal">"connect-proxy"</code> signal</h3>
 
1205
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *uimanager,
 
1206
                                                        <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a>    *action,
 
1207
                                                        <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>    *proxy,
 
1208
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1209
<p>
 
1210
The connect_proxy signal is emitted after connecting a proxy to 
 
1211
an action in the group. 
 
1212
</p>
 
1213
<p>
 
1214
This is intended for simple customizations for which a custom action
 
1215
class would be too clumsy, e.g. showing tooltips for menuitems in the
 
1216
statusbar.
 
1217
</p>
 
1218
<div class="variablelist"><table border="0" class="variablelist">
 
1219
<colgroup>
 
1220
<col align="left" valign="top">
 
1221
<col>
 
1222
</colgroup>
 
1223
<tbody>
 
1224
<tr>
 
1225
<td><p><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></p></td>
 
1226
<td>the ui manager</td>
 
1227
</tr>
 
1228
<tr>
 
1229
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
 
1230
<td>the action</td>
 
1231
</tr>
 
1232
<tr>
 
1233
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
 
1234
<td>the proxy</td>
 
1235
</tr>
 
1236
<tr>
 
1237
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1238
<td>user data set when the signal handler was connected.</td>
 
1239
</tr>
 
1240
</tbody>
 
1241
</table></div>
 
1242
<p class="since">Since 2.4</p>
 
1243
</div>
 
1244
<hr>
 
1245
<div class="refsect2">
 
1246
<a name="GtkUIManager-disconnect-proxy"></a><h3>The <code class="literal">"disconnect-proxy"</code> signal</h3>
 
1247
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *uimanager,
 
1248
                                                        <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a>    *action,
 
1249
                                                        <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>    *proxy,
 
1250
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1251
<p>
 
1252
The disconnect_proxy signal is emitted after disconnecting a proxy 
 
1253
from an action in the group.
 
1254
</p>
 
1255
<div class="variablelist"><table border="0" class="variablelist">
 
1256
<colgroup>
 
1257
<col align="left" valign="top">
 
1258
<col>
 
1259
</colgroup>
 
1260
<tbody>
 
1261
<tr>
 
1262
<td><p><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></p></td>
 
1263
<td>the ui manager</td>
 
1264
</tr>
 
1265
<tr>
 
1266
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
 
1267
<td>the action</td>
 
1268
</tr>
 
1269
<tr>
 
1270
<td><p><span class="term"><em class="parameter"><code>proxy</code></em> :</span></p></td>
 
1271
<td>the proxy</td>
 
1272
</tr>
 
1273
<tr>
 
1274
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1275
<td>user data set when the signal handler was connected.</td>
 
1276
</tr>
 
1277
</tbody>
 
1278
</table></div>
 
1279
<p class="since">Since 2.4</p>
 
1280
</div>
 
1281
<hr>
 
1282
<div class="refsect2">
 
1283
<a name="GtkUIManager-post-activate"></a><h3>The <code class="literal">"post-activate"</code> signal</h3>
 
1284
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *uimanager,
 
1285
                                                        <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a>    *action,
 
1286
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1287
<p>
 
1288
The post_activate signal is emitted just after the <em class="parameter"><code>action</code></em>
 
1289
is activated.
 
1290
</p>
 
1291
<p>
 
1292
This is intended for applications to get notification
 
1293
just after any action is activated.
 
1294
</p>
 
1295
<div class="variablelist"><table border="0" class="variablelist">
 
1296
<colgroup>
 
1297
<col align="left" valign="top">
 
1298
<col>
 
1299
</colgroup>
 
1300
<tbody>
 
1301
<tr>
 
1302
<td><p><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></p></td>
 
1303
<td>the ui manager</td>
 
1304
</tr>
 
1305
<tr>
 
1306
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
 
1307
<td>the action</td>
 
1308
</tr>
 
1309
<tr>
 
1310
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1311
<td>user data set when the signal handler was connected.</td>
 
1312
</tr>
 
1313
</tbody>
 
1314
</table></div>
 
1315
<p class="since">Since 2.4</p>
 
1316
</div>
 
1317
<hr>
 
1318
<div class="refsect2">
 
1319
<a name="GtkUIManager-pre-activate"></a><h3>The <code class="literal">"pre-activate"</code> signal</h3>
 
1320
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> *uimanager,
 
1321
                                                        <a class="link" href="GtkAction.html" title="GtkAction"><span class="type">GtkAction</span></a>    *action,
 
1322
                                                        <span class="type">gpointer</span>      user_data)      : <code class="literal">No Recursion</code></pre>
 
1323
<p>
 
1324
The pre_activate signal is emitted just before the <em class="parameter"><code>action</code></em>
 
1325
is activated.
 
1326
</p>
 
1327
<p>
 
1328
This is intended for applications to get notification
 
1329
just before any action is activated.
 
1330
</p>
 
1331
<div class="variablelist"><table border="0" class="variablelist">
 
1332
<colgroup>
 
1333
<col align="left" valign="top">
 
1334
<col>
 
1335
</colgroup>
 
1336
<tbody>
 
1337
<tr>
 
1338
<td><p><span class="term"><em class="parameter"><code>uimanager</code></em> :</span></p></td>
 
1339
<td>the ui manager</td>
 
1340
</tr>
 
1341
<tr>
 
1342
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
 
1343
<td>the action</td>
 
1344
</tr>
 
1345
<tr>
 
1346
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
1347
<td>user data set when the signal handler was connected.</td>
 
1348
</tr>
 
1349
</tbody>
 
1350
</table></div>
 
1351
<p class="since">Since 2.4</p>
 
1352
</div>
 
1353
</div>
 
1354
<div class="refsect1">
 
1355
<a name="GtkUIManager.see-also"></a><h2>See Also</h2>
 
1356
<p>
 
1357
<a class="link" href="GtkBuilder.html" title="GtkBuilder"><span class="type">GtkBuilder</span></a>
 
1358
</p>
 
1359
</div>
 
1360
</div>
 
1361
<div class="footer">
 
1362
<hr>
 
1363
          Generated by GTK-Doc V1.18</div>
 
1364
</body>
 
1365
</html>
 
 
b'\\ No newline at end of file'