KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/share/gtk-doc/html/gtk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/share/gtk-doc/html/gtk/GtkUIManager.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkUIManager</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="Actions.html" title="Action-based menus and toolbars">
<link rel="prev" href="Actions.html" title="Action-based menus and toolbars">
<link rel="next" href="GtkActionGroup.html" title="GtkActionGroup">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and 
         GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="Actions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Actions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkActionGroup.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3352309" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3353230" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id3352884" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id3352908" class="shortcut">Properties</a>
                  &#160;|&#160;
                  <a href="#id3352959" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkUIManager"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3352309"></a><span class="refentrytitle">GtkUIManager</span>
</h2>
<p>GtkUIManager &#8212; Constructing menus and toolbars from an XML description</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;


            <a href="GtkUIManager.html#GtkUIManager-struct">GtkUIManager</a>;
<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a>* <a href="GtkUIManager.html#gtk-ui-manager-new">gtk_ui_manager_new</a>            (void);
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,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> add_tearoffs);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <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);
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,
                                             <a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pos);
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,
                                             <a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group);
<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>*      <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);
<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);
<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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);
<a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>*     <a href="GtkUIManager.html#gtk-ui-manager-get-toplevels">gtk_ui_manager_get_toplevels</a>    (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> types);
<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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       <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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gssize"
>gssize</a> length,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       <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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       <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);
enum        <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a>;
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,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> merge_id,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *action,
                                             <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> top);
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,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> merge_id);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>*      <a href="GtkUIManager.html#gtk-ui-manager-get-ui">gtk_ui_manager_get_ui</a>           (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);
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);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3352884"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GtkUIManager
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3352908"></a><h2>Properties</h2>
<pre class="synopsis">

  "<a href="GtkUIManager.html#GtkUIManager--add-tearoffs">add-tearoffs</a>"         <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="GtkUIManager.html#GtkUIManager--ui">ui</a>"                   <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3352959"></a><h2>Signals</h2>
<pre class="synopsis">

"<a href="GtkUIManager.html#GtkUIManager-actions-changed">actions-changed</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
"<a href="GtkUIManager.html#GtkUIManager-add-widget">add-widget</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *widget,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
"<a href="GtkUIManager.html#GtkUIManager-connect-proxy">connect-proxy</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *proxy,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
"<a href="GtkUIManager.html#GtkUIManager-disconnect-proxy">disconnect-proxy</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *proxy,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
"<a href="GtkUIManager.html#GtkUIManager-post-activate">post-activate</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
"<a href="GtkUIManager.html#GtkUIManager-pre-activate">pre-activate</a>"
            void        user_function      (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3353230"></a><h2>Description</h2>
<p>
A <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> constructs a user interface (menus and toolbars) from
one or more UI definitions, which reference actions from one or more 
action groups. 
</p>
<div class="refsect2" lang="en">
<a name="XML-UI"></a><h3>UI Definitions</h3>
<p>
The UI definitions are specified in an XML format which can be
roughly described by the following DTD. 
</p>
<pre class="programlisting">
&lt;!ELEMENT ui          (menubar|toolbar|popup|accelerator)* &gt;
&lt;!ELEMENT menubar     (menuitem|separator|placeholder|menu)* &gt;
&lt;!ELEMENT menu        (menuitem|separator|placeholder|menu)* &gt;
&lt;!ELEMENT popup       (menuitem|separator|placeholder|menu)* &gt;
&lt;!ELEMENT toolbar     (toolitem|separator|placeholder)* &gt;
&lt;!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* &gt;
&lt;!ELEMENT menuitem     EMPTY &gt;
&lt;!ELEMENT toolitem     (menu?) &gt;
&lt;!ELEMENT separator    EMPTY &gt;
&lt;!ELEMENT accelerator  EMPTY &gt;
&lt;!ATTLIST menubar      name                  #IMPLIED 
                       action                #IMPLIED &gt;
&lt;!ATTLIST toolbar      name                  #IMPLIED 
                       action                #IMPLIED &gt;
&lt;!ATTLIST popup        name                  #IMPLIED 
                       action                #IMPLIED &gt;
&lt;!ATTLIST placeholder  name                  #IMPLIED
                       action                #IMPLIED &gt;
&lt;!ATTLIST separator    name                  #IMPLIED
                       action                #IMPLIED
                       expand   (true|false) #IMPLIED &gt;
&lt;!ATTLIST menu         name                  #IMPLIED
                       action                #REQUIRED
                       position (top|bot)    #IMPLIED &gt;
&lt;!ATTLIST menuitem     name                  #IMPLIED
                       action                #REQUIRED
                       position (top|bot)    #IMPLIED &gt;
&lt;!ATTLIST toolitem     name                  #IMPLIED
                       action                #REQUIRED
                       position (top|bot)    #IMPLIED &gt;
&lt;!ATTLIST accelerator  name                  #IMPLIED
                       action                #REQUIRED &gt;
</pre>
<p>
There are some additional restrictions beyond those specified in the
DTD, e.g. every toolitem must have a toolbar in its anchestry and
every menuitem must have a menubar or popup in its anchestry. Since
a <span class="type">GMarkup</span> parser is used to parse the UI description, it must not only
be valid XML, but valid <span class="type">GMarkup</span>. 
</p>
<p>
If a name is not specified, it defaults to the action. If an action is 
not specified either, the element name is used. The name and action 
attributes must not contain '/' characters after parsing (since that 
would mess up path lookup) and must be usable as XML attributes when 
enclosed in doublequotes, thus they must not '"' characters or references 
to the &amp;quot; entity.
</p>
<div class="example">
<a name="id3353297"></a><p class="title"><b>Example&#160;1.&#160;A UI definition</b></p>
<pre class="programlisting">
&lt;ui&gt;
  &lt;menubar&gt;
    &lt;menu name="FileMenu" action="FileMenuAction"&gt;
      &lt;menuitem name="New" action="New2Action" /&gt;
      &lt;placeholder name="FileMenuAdditions" /&gt;
    &lt;/menu&gt;
    &lt;menu name="JustifyMenu" action="JustifyMenuAction"&gt;
      &lt;menuitem name="Left" action="justify-left"/&gt;
      &lt;menuitem name="Centre" action="justify-center"/&gt;
      &lt;menuitem name="Right" action="justify-right"/&gt;
      &lt;menuitem name="Fill" action="justify-fill"/&gt;
    &lt;/menu&gt;
  &lt;/menubar&gt;
  &lt;toolbar action="toolbar1"&gt;
    &lt;placeholder name="JustifyToolItems"&gt;
      &lt;separator/&gt;
      &lt;toolitem name="Left" action="justify-left"/&gt;
      &lt;toolitem name="Centre" action="justify-center"/&gt;
      &lt;toolitem name="Right" action="justify-right"/&gt;
      &lt;toolitem name="Fill" action="justify-fill"/&gt;
      &lt;separator/&gt;
    &lt;/placeholder&gt;
  &lt;/toolbar&gt;
&lt;/ui&gt;
</pre>
</div>
<p>
The constructed widget hierarchy is very similar to the element tree
of the XML, with the exception that placeholders are merged into their
parents. The correspondence of XML elements to widgets should be
almost obvious: 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">menubar</span></td>
<td><p>a <a href="GtkMenuBar.html" title="GtkMenuBar"><span class="type">GtkMenuBar</span></a></p></td>
</tr>
<tr>
<td>
<span class="term">toolbar</span></td>
<td><p>a <a href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></p></td>
</tr>
<tr>
<td>
<span class="term">popup</span></td>
<td><p>a toplevel <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a></p></td>
</tr>
<tr>
<td>
<span class="term">menu</span></td>
<td><p>a <a href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> attached to a menuitem</p></td>
</tr>
<tr>
<td>
<span class="term">menuitem</span></td>
<td><p>a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> subclass, the exact type depends on the
action</p></td>
</tr>
<tr>
<td>
<span class="term">toolitem</span></td>
<td><p>a <a href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> subclass, the exact type depends on the
action. Note that toolitem elements may contain a menu element, but only
if their associated action specifies a <a href="GtkMenuToolButton.html" title="GtkMenuToolButton"><span class="type">GtkMenuToolButton</span></a> as proxy.</p></td>
</tr>
<tr>
<td>
<span class="term">separator</span></td>
<td><p>a <a href="GtkSeparatorMenuItem.html" title="GtkSeparatorMenuItem"><span class="type">GtkSeparatorMenuItem</span></a> or
<a href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem"><span class="type">GtkSeparatorToolItem</span></a></p></td>
</tr>
<tr>
<td>
<span class="term">accelerator</span></td>
<td><p>a keyboard accelerator</p></td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>
The "position" attribute determines where a constructed widget is positioned
wrt. to its siblings in the partially constructed tree. If it is
"top", the widget is prepended, otherwise it is appended.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="UI-Merging"></a><h3>UI Merging</h3>
<p>
The most remarkable feature of <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> is that it can overlay a set
of menuitems and toolitems over another one, and demerge them later.
</p>
<p>
Merging is done based on the names of the XML elements. Each element is 
identified by a path which consists of the names of its anchestors, separated
by slashes. For example, the menuitem named "Left" in the example above
has the path <code class="literal">/ui/menubar/JustifyMenu/Left</code> and the
toolitem with the same name has path 
<code class="literal">/ui/toolbar1/JustifyToolItems/Left</code>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3353624"></a><h3>Accelerators</h3>
<p>
Every action has an accelerator path. Accelerators are installed together with
menuitem proxies, but they can also be explicitly added with &lt;accelerator&gt;
elements in the UI definition. This makes it possible to have accelerators for
actions even if they have no visible proxies.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="Smart-Separators"></a><h3>Smart Separators</h3>
<p>
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 
in the UI unless they end up between two visible menu or tool items. Separators
which are located at the very beginning or end of the menu or toolbar 
containing them, or multiple separators next to each other, are hidden. This 
is a useful feature, since the merging of UI elements from multiple sources 
can make it hard or impossible to determine in advance whether a separator 
will end up in such an unfortunate position.
</p>
<p>
For separators in toolbars, you can set <code class="literal">expand="true"</code> to
turn them from a small, visible separator to an expanding, invisible one.
Toolitems following an expanding separator are effectively right-aligned.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3353682"></a><h3>Empty Menus</h3>
<p>
Submenus pose similar problems to separators inconnection with merging. It is 
impossible to know in advance whether they will end up empty after merging. 
<a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> offers two ways to treat empty submenus:
</p>
<div class="itemizedlist"><ul type="disc">
<li><p>make them disappear by hiding the menu item they're attached to
</p></li>
<li><p>add an insensitive "Empty" item
</p></li>
</ul></div>
<p>
The behaviour is chosen based on the "hide_if_empty" property of the action 
to which the submenu is associated.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3353720"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3353730"></a><h3>
<a name="GtkUIManager-struct"></a>GtkUIManager</h3>
<a class="indexterm" name="id3353743"></a><pre class="programlisting">typedef struct _GtkUIManager GtkUIManager;</pre>
<p>
The <span class="structname">GtkUIManager</span> struct contains only private
members and should not be accessed directly.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3353764"></a><h3>
<a name="gtk-ui-manager-new"></a>gtk_ui_manager_new ()</h3>
<a class="indexterm" name="id3353780"></a><pre class="programlisting"><a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a>* gtk_ui_manager_new            (void);</pre>
<p>
Creates a new ui manager object.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new ui manager object.

</td>
</tr></tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3353824"></a><h3>
<a name="gtk-ui-manager-set-add-tearoffs"></a>gtk_ui_manager_set_add_tearoffs ()</h3>
<a class="indexterm" name="id3353840"></a><pre class="programlisting">void        gtk_ui_manager_set_add_tearoffs (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> add_tearoffs);</pre>
<p>
Sets the "add_tearoffs" property, which controls whether menus 
generated by this <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> will have tearoff menu items. 
</p>
<p>
Note that this only affects regular menus. Generated popup 
menus never have tearoff menu items.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>add_tearoffs</code></em>&#160;:</span></td>
<td> whether tearoff menu items are added
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3353940"></a><h3>
<a name="gtk-ui-manager-get-add-tearoffs"></a>gtk_ui_manager_get_add_tearoffs ()</h3>
<a class="indexterm" name="id3353956"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_ui_manager_get_add_tearoffs (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
<p>
Returns whether menus generated by this <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
will have tearoff menu items.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> whether tearoff menu items are added

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354038"></a><h3>
<a name="gtk-ui-manager-insert-action-group"></a>gtk_ui_manager_insert_action_group ()</h3>
<a class="indexterm" name="id3354055"></a><pre class="programlisting">void        gtk_ui_manager_insert_action_group
                                            (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group,
                                             <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> pos);</pre>
<p>
Inserts an action group into the list of action groups associated 
with <em class="parameter"><code>self</code></em>. Actions in earlier groups hide actions with the same 
name in later groups.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action_group</code></em>&#160;:</span></td>
<td> the action group to be inserted
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pos</code></em>&#160;:</span></td>
<td> the position at which the group will be inserted.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354170"></a><h3>
<a name="gtk-ui-manager-remove-action-group"></a>gtk_ui_manager_remove_action_group ()</h3>
<a class="indexterm" name="id3354187"></a><pre class="programlisting">void        gtk_ui_manager_remove_action_group
                                            (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a href="GtkActionGroup.html" title="GtkActionGroup">GtkActionGroup</a> *action_group);</pre>
<p>
Removes an action group from the list of action groups associated 
with <em class="parameter"><code>self</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action_group</code></em>&#160;:</span></td>
<td> the action group to be removed
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354279"></a><h3>
<a name="gtk-ui-manager-get-action-groups"></a>gtk_ui_manager_get_action_groups ()</h3>
<a class="indexterm" name="id3354294"></a><pre class="programlisting"><a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>*      gtk_ui_manager_get_action_groups
                                            (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
<p>
Returns the list of action groups associated with <em class="parameter"><code>self</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a <a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
><span class="type">GList</span></a> of action groups. The list is owned by GTK+ 
  and should not be modified.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354384"></a><h3>
<a name="gtk-ui-manager-get-accel-group"></a>gtk_ui_manager_get_accel_group ()</h3>
<a class="indexterm" name="id3354400"></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>
<p>
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>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354496"></a><h3>
<a name="gtk-ui-manager-get-widget"></a>gtk_ui_manager_get_widget ()</h3>
<a class="indexterm" name="id3354513"></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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);</pre>
<p>
Looks up a widget by following a path. 
The path consists of the names specified in the XML description of the UI. 
separated by '/'. Elements which don't have a name or action attribute in 
the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name 
(e.g. "popup"). The root element ("/ui") can be omitted in the path.
</p>
<p>
Note that the widget found by following a path that ends in a &lt;menu&gt;
element is the menuitem to which the menu is attached, not the menu itself.
</p>
<p>
Also note that the widgets constructed by a ui manager are not tied to 
the lifecycle of the ui manager. If you add the widgets returned by this 
function to some container or explicitly ref them, they will survive the
destruction of the ui manager.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></td>
<td> a path
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the widget found by following the path, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no widget
  was found.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354642"></a><h3>
<a name="gtk-ui-manager-get-toplevels"></a>gtk_ui_manager_get_toplevels ()</h3>
<a class="indexterm" name="id3354658"></a><pre class="programlisting"><a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>*     gtk_ui_manager_get_toplevels    (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> types);</pre>
<p>
Obtains a list of all toplevel widgets of the requested types.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>types</code></em>&#160;:</span></td>
<td> specifies the types of toplevel widgets to include. Allowed
  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
  <a href="GtkUIManager.html#GTK-UI-MANAGER-POPUP:CAPS"><span class="type">GTK_UI_MANAGER_POPUP</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a newly-allocated of all toplevel widgets of the requested 
types. 

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354786"></a><h3>
<a name="gtk-ui-manager-get-action"></a>gtk_ui_manager_get_action ()</h3>
<a class="indexterm" name="id3354803"></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,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);</pre>
<p>
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>
for more information about paths.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></td>
<td> a path
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the action whose proxy widget is found by following the path, 
    or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no widget was found.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3354920"></a><h3>
<a name="gtk-ui-manager-add-ui-from-string"></a>gtk_ui_manager_add_ui_from_string ()</h3>
<a class="indexterm" name="id3354936"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       gtk_ui_manager_add_ui_from_string
                                            (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *buffer,
                                             <a
href="../glib/glib-Basic-Types.html#gssize"
>gssize</a> length,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<p>
Parses a string containing a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and 
merges it with the current contents of <em class="parameter"><code>self</code></em>. An enclosing &lt;ui&gt; 
element is added if it is missing.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>buffer</code></em>&#160;:</span></td>
<td> the string to parse
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></td>
<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>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
<td> return location for an error
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The merge id for the merged UI. The merge id can be used
  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,
  the return value is 0.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3355118"></a><h3>
<a name="gtk-ui-manager-add-ui-from-file"></a>gtk_ui_manager_add_ui_from_file ()</h3>
<a class="indexterm" name="id3355134"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       gtk_ui_manager_add_ui_from_file (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *filename,
                                             <a
href="../glib/glib-Error-Reporting.html#GError"
>GError</a> **error);</pre>
<p>
Parses a file containing a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> and 
merges it with the current contents of <em class="parameter"><code>self</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
<td> the name of the file to parse 
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
<td> return location for an error
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The merge id for the merged UI. The merge id can be used
  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,
  the return value is 0.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3355277"></a><h3>
<a name="gtk-ui-manager-new-merge-id"></a>gtk_ui_manager_new_merge_id ()</h3>
<a class="indexterm" name="id3355294"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a>       gtk_ui_manager_new_merge_id     (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
<p>
Returns an unused merge id, suitable for use with 
<a href="GtkUIManager.html#gtk-ui-manager-add-ui"><code class="function">gtk_ui_manager_add_ui()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> an unused merge id.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3355378"></a><h3>
<a name="GtkUIManagerItemType"></a>enum GtkUIManagerItemType</h3>
<a class="indexterm" name="id3355391"></a><pre class="programlisting">typedef enum {
  GTK_UI_MANAGER_AUTO         = 0,
  GTK_UI_MANAGER_MENUBAR      = 1 &lt;&lt; 0,
  GTK_UI_MANAGER_MENU         = 1 &lt;&lt; 1,
  GTK_UI_MANAGER_TOOLBAR      = 1 &lt;&lt; 2,
  GTK_UI_MANAGER_PLACEHOLDER  = 1 &lt;&lt; 3,
  GTK_UI_MANAGER_POPUP        = 1 &lt;&lt; 4,
  GTK_UI_MANAGER_MENUITEM     = 1 &lt;&lt; 5,
  GTK_UI_MANAGER_TOOLITEM     = 1 &lt;&lt; 6,
  GTK_UI_MANAGER_SEPARATOR    = 1 &lt;&lt; 7,
  GTK_UI_MANAGER_ACCELERATOR  = 1 &lt;&lt; 8
} GtkUIManagerItemType;
</pre>
<p>
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
what UI element to create.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-AUTO:CAPS"></a><code class="literal">GTK_UI_MANAGER_AUTO</code></span></td>
<td>Pick the type of the UI element according to context.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-MENUBAR:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENUBAR</code></span></td>
<td>Create a menubar.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-MENU:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENU</code></span></td>
<td>Create a menu.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-TOOLBAR:CAPS"></a><code class="literal">GTK_UI_MANAGER_TOOLBAR</code></span></td>
<td>Create a toolbar.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-PLACEHOLDER:CAPS"></a><code class="literal">GTK_UI_MANAGER_PLACEHOLDER</code></span></td>
<td>Insert a placeholder.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-POPUP:CAPS"></a><code class="literal">GTK_UI_MANAGER_POPUP</code></span></td>
<td>Create a popup menu.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-MENUITEM:CAPS"></a><code class="literal">GTK_UI_MANAGER_MENUITEM</code></span></td>
<td>Create a menuitem.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-TOOLITEM:CAPS"></a><code class="literal">GTK_UI_MANAGER_TOOLITEM</code></span></td>
<td>Create a toolitem.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-SEPARATOR:CAPS"></a><code class="literal">GTK_UI_MANAGER_SEPARATOR</code></span></td>
<td>Create a separator.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="GTK-UI-MANAGER-ACCELERATOR:CAPS"></a><code class="literal">GTK_UI_MANAGER_ACCELERATOR</code></span></td>
<td>Install an accelerator.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3355666"></a><h3>
<a name="gtk-ui-manager-add-ui"></a>gtk_ui_manager_add_ui ()</h3>
<a class="indexterm" name="id3355681"></a><pre class="programlisting">void        gtk_ui_manager_add_ui           (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> merge_id,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *name,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *action,
                                             <a href="GtkUIManager.html#GtkUIManagerItemType">GtkUIManagerItemType</a> type,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> top);</pre>
<p>
Adds a UI element to the current contents of <em class="parameter"><code>self</code></em>. 
</p>
<p>
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 
separator if such an element can be inserted at the place determined by 
<em class="parameter"><code>path</code></em>. Otherwise <em class="parameter"><code>type</code></em> must indicate an element that can be inserted at 
the place determined by <em class="parameter"><code>path</code></em>.
</p>
<p>
If <em class="parameter"><code>path</code></em> points to a menuitem or toolitem, the new element will be inserted
before or after this item, depending on <em class="parameter"><code>top</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>merge_id</code></em>&#160;:</span></td>
<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>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></td>
<td> a path
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em>&#160;:</span></td>
<td> the name for the added UI element
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action</code></em>&#160;:</span></td>
<td> the name of the action to be proxied, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> to add a separator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>type</code></em>&#160;:</span></td>
<td> the type of UI element to add.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>top</code></em>&#160;:</span></td>
<td> if <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>, the UI element is added before its siblings, otherwise it 
  is added after its siblings.
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3355973"></a><h3>
<a name="gtk-ui-manager-remove-ui"></a>gtk_ui_manager_remove_ui ()</h3>
<a class="indexterm" name="id3355988"></a><pre class="programlisting">void        gtk_ui_manager_remove_ui        (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self,
                                             <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> merge_id);</pre>
<p>
Unmerges the part of <em class="parameter"><code>self</code></em>s content identified by <em class="parameter"><code>merge_id</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> object
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>merge_id</code></em>&#160;:</span></td>
<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>
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356098"></a><h3>
<a name="gtk-ui-manager-get-ui"></a>gtk_ui_manager_get_ui ()</h3>
<a class="indexterm" name="id3356113"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>*      gtk_ui_manager_get_ui           (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
<p>
Creates a <a href="GtkUIManager.html#XML-UI" title="UI Definitions">UI definition</a> of the merged UI.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly allocated string containing an XML representation of 
the merged UI.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356194"></a><h3>
<a name="gtk-ui-manager-ensure-update"></a>gtk_ui_manager_ensure_update ()</h3>
<a class="indexterm" name="id3356210"></a><pre class="programlisting">void        gtk_ui_manager_ensure_update    (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *self);</pre>
<p>
Makes sure that all pending updates to the UI have been completed.
</p>
<p>
This may occasionally be necessary, since <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a> updates the 
UI in an idle function. A typical example where this function is
useful is to enforce that the menubar and toolbar have been added to 
the main window before showing it:
</p>
<div class="informalexample"><pre class="programlisting">
gtk_container_add (GTK_CONTAINER (window), vbox); 
g_signal_connect (merge, "add_widget", 
                  G_CALLBACK (add_widget), vbox);
gtk_ui_manager_add_ui_from_file (merge, "my-menus");
gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
gtk_ui_manager_ensure_update (merge);  
gtk_widget_show (window);
</pre></div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>self</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr></tbody>
</table></div>
<p>Since  2.4
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3356304"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id3356314"></a><h3>
<a name="GtkUIManager--add-tearoffs"></a>The "<code class="literal">add-tearoffs</code>" property</h3>
<a class="indexterm" name="id3356331"></a><pre class="programlisting">  "add-tearoffs"         <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>
The "add-tearoffs" property controls whether generated menus 
have tearoff menu items. 
</p>
<p>
Note that this only affects regular menus. Generated popup 
menus never have tearoff menu items.</p>
<p>

</p>
<p>Default value: FALSE</p>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356372"></a><h3>
<a name="GtkUIManager--ui"></a>The "<code class="literal">ui</code>" property</h3>
<a class="indexterm" name="id3356388"></a><pre class="programlisting">  "ui"                   <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read</pre>
<p>An XML string describing the merged UI.</p>
<p>Default value: "&lt;ui&gt;\n&lt;/ui&gt;\n"</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3356416"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id3356427"></a><h3>
<a name="GtkUIManager-actions-changed"></a>The "actions-changed" signal</h3>
<a class="indexterm" name="id3356438"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The "actions-changed" signal is emitted whenever the set of actions
changes.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>merge</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356523"></a><h3>
<a name="GtkUIManager-add-widget"></a>The "add-widget" signal</h3>
<a class="indexterm" name="id3356534"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *merge,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *widget,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The add_widget signal is emitted for each generated menubar and toolbar.
It is not emitted for generated popup menus, which can be obtained by 
<a href="GtkUIManager.html#gtk-ui-manager-get-widget"><code class="function">gtk_ui_manager_get_widget()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>merge</code></em>&#160;:</span></td>
<td> a <a href="GtkUIManager.html" title="GtkUIManager"><span class="type">GtkUIManager</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> the added widget
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356652"></a><h3>
<a name="GtkUIManager-connect-proxy"></a>The "connect-proxy" signal</h3>
<a class="indexterm" name="id3356663"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *proxy,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The connect_proxy signal is emitted after connecting a proxy to 
an action in the group. 
</p>
<p>
This is intended for simple customizations for which a custom action
class would be too clumsy, e.g. showing tooltips for menuitems in the
statusbar.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>uimanager</code></em>&#160;:</span></td>
<td> the ui manager
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action</code></em>&#160;:</span></td>
<td> the action
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>proxy</code></em>&#160;:</span></td>
<td> the proxy
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356790"></a><h3>
<a name="GtkUIManager-disconnect-proxy"></a>The "disconnect-proxy" signal</h3>
<a class="indexterm" name="id3356800"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>    *proxy,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The disconnect_proxy signal is emitted after disconnecting a proxy 
from an action in the group.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>uimanager</code></em>&#160;:</span></td>
<td> the ui manager
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action</code></em>&#160;:</span></td>
<td> the action
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>proxy</code></em>&#160;:</span></td>
<td> the proxy
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3356921"></a><h3>
<a name="GtkUIManager-post-activate"></a>The "post-activate" signal</h3>
<a class="indexterm" name="id3356932"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The post_activate signal is emitted just after the <em class="parameter"><code>action</code></em>
is activated.
</p>
<p>
This is intended for applications to get notification
just after any action is activated.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>uimanager</code></em>&#160;:</span></td>
<td> the ui manager
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action</code></em>&#160;:</span></td>
<td> the action
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3357041"></a><h3>
<a name="GtkUIManager-pre-activate"></a>The "pre-activate" signal</h3>
<a class="indexterm" name="id3357052"></a><pre class="programlisting">void        user_function                  (<a href="GtkUIManager.html" title="GtkUIManager">GtkUIManager</a> *uimanager,
                                            <a href="GtkAction.html" title="GtkAction">GtkAction</a>    *action,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>      user_data)      : Run first / No recursion</pre>
<p>
The pre_activate signal is emitted just before the <em class="parameter"><code>action</code></em>
is activated.
</p>
<p>
This is intended for applications to get notification
just before any action is activated.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>uimanager</code></em>&#160;:</span></td>
<td> the ui manager
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>action</code></em>&#160;:</span></td>
<td> the action
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021