I've no idea here...
[gtkD.git] / src / gtk / UIManager.d
blobeaee87550ab4ded73094d35dedac4988390ab937
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkUIManager.html
26 * outPack = gtk
27 * outFile = UIManager
28 * strct = GtkUIManager
29 * realStrct=
30 * ctorStrct=
31 * clss = UIManager
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_ui_manager_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * - glib.Str
46 * - gtk.ActionGroup
47 * - glib.ListG
48 * - gtk.AccelGroup
49 * - gtk.Widget
50 * - glib.ListSG
51 * - gtk.Action
52 * structWrap:
53 * - GList* -> ListG
54 * - GSList* -> ListSG
55 * - GtkAccelGroup* -> AccelGroup
56 * - GtkAction* -> Action
57 * - GtkActionGroup* -> ActionGroup
58 * - GtkWidget* -> Widget
59 * local aliases:
62 module gtk.UIManager;
64 private import gtk.gtktypes;
66 private import lib.gtk;
68 private import glib.Str;
69 private import gtk.ActionGroup;
70 private import glib.ListG;
71 private import gtk.AccelGroup;
72 private import gtk.Widget;
73 private import glib.ListSG;
74 private import gtk.Action;
76 /**
77 * Description
78 * A GtkUIManager constructs a user interface (menus and toolbars) from
79 * one or more UI definitions, which reference actions from one or more
80 * action groups.
81 * UI Definitions
82 * The UI definitions are specified in an XML format which can be
83 * roughly described by the following DTD.
84 * <!ELEMENT ui (menubar|toolbar|popup|accelerator)* >
85 * <!ELEMENT menubar (menuitem|separator|placeholder|menu)* >
86 * <!ELEMENT menu (menuitem|separator|placeholder|menu)* >
87 * <!ELEMENT popup (menuitem|separator|placeholder|menu)* >
88 * <!ELEMENT toolbar (toolitem|separator|placeholder)* >
89 * <!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
90 * <!ELEMENT menuitem EMPTY >
91 * <!ELEMENT toolitem (menu?) >
92 * <!ELEMENT separator EMPTY >
93 * <!ELEMENT accelerator EMPTY >
94 * <!ATTLIST menubar name #IMPLIED
95 * action #IMPLIED >
96 * <!ATTLIST toolbar name #IMPLIED
97 * action #IMPLIED >
98 * <!ATTLIST popup name #IMPLIED
99 * action #IMPLIED >
100 * <!ATTLIST placeholder name #IMPLIED
101 * action #IMPLIED >
102 * <!ATTLIST separator name #IMPLIED
103 * action #IMPLIED
104 * expand (true|false) #IMPLIED >
105 * <!ATTLIST menu name #IMPLIED
106 * action #REQUIRED
107 * position (top|bot) #IMPLIED >
108 * <!ATTLIST menuitem name #IMPLIED
109 * action #REQUIRED
110 * position (top|bot) #IMPLIED >
111 * <!ATTLIST toolitem name #IMPLIED
112 * action #REQUIRED
113 * position (top|bot) #IMPLIED >
114 * <!ATTLIST accelerator name #IMPLIED
115 * action #REQUIRED >
116 * There are some additional restrictions beyond those specified in the
117 * DTD, e.g. every toolitem must have a toolbar in its anchestry and
118 * every menuitem must have a menubar or popup in its anchestry. Since
119 * a GMarkup parser is used to parse the UI description, it must not only
120 * be valid XML, but valid GMarkup.
121 * If a name is not specified, it defaults to the action. If an action is
122 * not specified either, the element name is used. The name and action
123 * attributes must not contain '/' characters after parsing (since that
124 * would mess up path lookup) and must be usable as XML attributes when
125 * enclosed in doublequotes, thus they must not '"' characters or references
126 * to the quot; entity.
127 * Example1.A UI definition
128 * <ui>
129 * <menubar>
130 * <menu name="FileMenu" action="FileMenuAction">
131 * <menuitem name="New" action="New2Action" />
132 * <placeholder name="FileMenuAdditions" />
133 * </menu>
134 * <menu name="JustifyMenu" action="JustifyMenuAction">
135 * <menuitem name="Left" action="justify-left"/>
136 * <menuitem name="Centre" action="justify-center"/>
137 * <menuitem name="Right" action="justify-right"/>
138 * <menuitem name="Fill" action="justify-fill"/>
139 * </menu>
140 * </menubar>
141 * <toolbar action="toolbar1">
142 * <placeholder name="JustifyToolItems">
143 * <separator/>
144 * <toolitem name="Left" action="justify-left"/>
145 * <toolitem name="Centre" action="justify-center"/>
146 * <toolitem name="Right" action="justify-right"/>
147 * <toolitem name="Fill" action="justify-fill"/>
148 * <separator/>
149 * </placeholder>
150 * </toolbar>
151 * </ui>
152 * The constructed widget hierarchy is very similar to the element tree
153 * of the XML, with the exception that placeholders are merged into their
154 * parents. The correspondence of XML elements to widgets should be
155 * almost obvious:
156 * menubar
157 * a GtkMenuBar
158 * toolbar
159 * a GtkToolbar
160 * popup
161 * a toplevel GtkMenu
162 * menu
163 * a GtkMenu attached to a menuitem
164 * menuitem
165 * a GtkMenuItem subclass, the exact type depends on the
166 * action
167 * toolitem
168 * a GtkToolItem subclass, the exact type depends on the
169 * action. Note that toolitem elements may contain a menu element, but only
170 * if their associated action specifies a GtkMenuToolButton as proxy.
171 * separator
172 * a GtkSeparatorMenuItem or
173 * GtkSeparatorToolItem
174 * accelerator
175 * a keyboard accelerator
176 * The "position" attribute determines where a constructed widget is positioned
177 * wrt. to its siblings in the partially constructed tree. If it is
178 * "top", the widget is prepended, otherwise it is appended.
179 * <hr>
180 * UI Merging
181 * The most remarkable feature of GtkUIManager is that it can overlay a set
182 * of menuitems and toolitems over another one, and demerge them later.
183 * Merging is done based on the names of the XML elements. Each element is
184 * identified by a path which consists of the names of its anchestors, separated
185 * by slashes. For example, the menuitem named "Left" in the example above
186 * has the path /ui/menubar/JustifyMenu/Left and the
187 * toolitem with the same name has path
188 * /ui/toolbar1/JustifyToolItems/Left.
189 * <hr>
190 * Accelerators
191 * Every action has an accelerator path. Accelerators are installed together with
192 * menuitem proxies, but they can also be explicitly added with <accelerator>
193 * elements in the UI definition. This makes it possible to have accelerators for
194 * actions even if they have no visible proxies.
195 * <hr>
196 * Smart Separators
197 * The separators created by GtkUIManager are "smart", i.e. they do not show up
198 * in the UI unless they end up between two visible menu or tool items. Separators
199 * which are located at the very beginning or end of the menu or toolbar
200 * containing them, or multiple separators next to each other, are hidden. This
201 * is a useful feature, since the merging of UI elements from multiple sources
202 * can make it hard or impossible to determine in advance whether a separator
203 * will end up in such an unfortunate position.
204 * For separators in toolbars, you can set expand="true" to
205 * turn them from a small, visible separator to an expanding, invisible one.
206 * Toolitems following an expanding separator are effectively right-aligned.
207 * <hr>
208 * Empty Menus
209 * Submenus pose similar problems to separators inconnection with merging. It is
210 * impossible to know in advance whether they will end up empty after merging.
211 * GtkUIManager offers two ways to treat empty submenus:
212 * make them disappear by hiding the menu item they're attached to
213 * add an insensitive "Empty" item
214 * The behaviour is chosen based on the "hide_if_empty" property of the action
215 * to which the submenu is associated.
217 private import gobject.ObjectG;
218 public class UIManager : ObjectG
221 /** the main Gtk struct */
222 protected GtkUIManager* gtkUIManager;
225 public GtkUIManager* getUIManagerStruct()
227 return gtkUIManager;
231 /** the main Gtk struct as a void* */
232 protected void* getStruct()
234 return cast(void*)gtkUIManager;
238 * Sets our main struct and passes it to the parent class
240 public this (GtkUIManager* gtkUIManager)
242 super(cast(GObject*)gtkUIManager);
243 this.gtkUIManager = gtkUIManager;
249 // imports for the signal processing
250 private import gobject.Signals;
251 private import gdk.gdktypes;
252 int[char[]] connectedSignals;
254 void delegate(UIManager)[] onActionsChangedListeners;
255 void addOnActionsChanged(void delegate(UIManager) dlg)
257 if ( !("actions-changed" in connectedSignals) )
259 Signals.connectData(
260 getStruct(),
261 "actions-changed",
262 cast(GCallback)&callBackActionsChanged,
263 this,
264 null,
265 cast(ConnectFlags)0);
266 connectedSignals["actions-changed"] = 1;
268 onActionsChangedListeners ~= dlg;
270 extern(C) static void callBackActionsChanged(GtkUIManager* mergeStruct, UIManager uIManager)
272 bit consumed = false;
274 foreach ( void delegate(UIManager) dlg ; uIManager.onActionsChangedListeners )
276 dlg(uIManager);
279 return consumed;
282 void delegate(Widget, UIManager)[] onAddWidgetListeners;
283 void addOnAddWidget(void delegate(Widget, UIManager) dlg)
285 if ( !("add-widget" in connectedSignals) )
287 Signals.connectData(
288 getStruct(),
289 "add-widget",
290 cast(GCallback)&callBackAddWidget,
291 this,
292 null,
293 cast(ConnectFlags)0);
294 connectedSignals["add-widget"] = 1;
296 onAddWidgetListeners ~= dlg;
298 extern(C) static void callBackAddWidget(GtkUIManager* mergeStruct, GtkWidget* widget, UIManager uIManager)
300 bit consumed = false;
302 foreach ( void delegate(Widget, UIManager) dlg ; uIManager.onAddWidgetListeners )
304 dlg(new Widget(widget), uIManager);
307 return consumed;
310 void delegate(Action, Widget, UIManager)[] onConnectProxyListeners;
311 void addOnConnectProxy(void delegate(Action, Widget, UIManager) dlg)
313 if ( !("connect-proxy" in connectedSignals) )
315 Signals.connectData(
316 getStruct(),
317 "connect-proxy",
318 cast(GCallback)&callBackConnectProxy,
319 this,
320 null,
321 cast(ConnectFlags)0);
322 connectedSignals["connect-proxy"] = 1;
324 onConnectProxyListeners ~= dlg;
326 extern(C) static void callBackConnectProxy(GtkUIManager* uimanagerStruct, GtkAction* action, GtkWidget* proxy, UIManager uIManager)
328 bit consumed = false;
330 foreach ( void delegate(Action, Widget, UIManager) dlg ; uIManager.onConnectProxyListeners )
332 dlg(new Action(action), new Widget(proxy), uIManager);
335 return consumed;
338 void delegate(Action, Widget, UIManager)[] onDisconnectProxyListeners;
339 void addOnDisconnectProxy(void delegate(Action, Widget, UIManager) dlg)
341 if ( !("disconnect-proxy" in connectedSignals) )
343 Signals.connectData(
344 getStruct(),
345 "disconnect-proxy",
346 cast(GCallback)&callBackDisconnectProxy,
347 this,
348 null,
349 cast(ConnectFlags)0);
350 connectedSignals["disconnect-proxy"] = 1;
352 onDisconnectProxyListeners ~= dlg;
354 extern(C) static void callBackDisconnectProxy(GtkUIManager* uimanagerStruct, GtkAction* action, GtkWidget* proxy, UIManager uIManager)
356 bit consumed = false;
358 foreach ( void delegate(Action, Widget, UIManager) dlg ; uIManager.onDisconnectProxyListeners )
360 dlg(new Action(action), new Widget(proxy), uIManager);
363 return consumed;
366 void delegate(Action, UIManager)[] onPostActivateListeners;
367 void addOnPostActivate(void delegate(Action, UIManager) dlg)
369 if ( !("post-activate" in connectedSignals) )
371 Signals.connectData(
372 getStruct(),
373 "post-activate",
374 cast(GCallback)&callBackPostActivate,
375 this,
376 null,
377 cast(ConnectFlags)0);
378 connectedSignals["post-activate"] = 1;
380 onPostActivateListeners ~= dlg;
382 extern(C) static void callBackPostActivate(GtkUIManager* uimanagerStruct, GtkAction* action, UIManager uIManager)
384 bit consumed = false;
386 foreach ( void delegate(Action, UIManager) dlg ; uIManager.onPostActivateListeners )
388 dlg(new Action(action), uIManager);
391 return consumed;
394 void delegate(Action, UIManager)[] onPreActivateListeners;
395 void addOnPreActivate(void delegate(Action, UIManager) dlg)
397 if ( !("pre-activate" in connectedSignals) )
399 Signals.connectData(
400 getStruct(),
401 "pre-activate",
402 cast(GCallback)&callBackPreActivate,
403 this,
404 null,
405 cast(ConnectFlags)0);
406 connectedSignals["pre-activate"] = 1;
408 onPreActivateListeners ~= dlg;
410 extern(C) static void callBackPreActivate(GtkUIManager* uimanagerStruct, GtkAction* action, UIManager uIManager)
412 bit consumed = false;
414 foreach ( void delegate(Action, UIManager) dlg ; uIManager.onPreActivateListeners )
416 dlg(new Action(action), uIManager);
419 return consumed;
425 * Creates a new ui manager object.
426 * Returns:
427 * a new ui manager object.
428 * Since 2.4
430 public this ()
432 // GtkUIManager* gtk_ui_manager_new (void);
433 this(cast(GtkUIManager*)gtk_ui_manager_new() );
437 * Sets the "add_tearoffs" property, which controls whether menus
438 * generated by this GtkUIManager will have tearoff menu items.
439 * Note that this only affects regular menus. Generated popup
440 * menus never have tearoff menu items.
441 * self:
442 * a GtkUIManager
443 * add_tearoffs:
444 * whether tearoff menu items are added
445 * Since 2.4
447 public void setAddTearoffs(int addTearoffs)
449 // void gtk_ui_manager_set_add_tearoffs (GtkUIManager *self, gboolean add_tearoffs);
450 gtk_ui_manager_set_add_tearoffs(gtkUIManager, addTearoffs);
454 * Returns whether menus generated by this GtkUIManager
455 * will have tearoff menu items.
456 * self:
457 * a GtkUIManager
458 * Returns:
459 * whether tearoff menu items are added
460 * Since 2.4
462 public int getAddTearoffs()
464 // gboolean gtk_ui_manager_get_add_tearoffs (GtkUIManager *self);
465 return gtk_ui_manager_get_add_tearoffs(gtkUIManager);
469 * Inserts an action group into the list of action groups associated
470 * with self. Actions in earlier groups hide actions with the same
471 * name in later groups.
472 * self:
473 * a GtkUIManager object
474 * action_group:
475 * the action group to be inserted
476 * pos:
477 * the position at which the group will be inserted.
478 * Since 2.4
480 public void insertActionGroup(ActionGroup actionGroup, int pos)
482 // void gtk_ui_manager_insert_action_group (GtkUIManager *self, GtkActionGroup *action_group, gint pos);
483 gtk_ui_manager_insert_action_group(gtkUIManager, (actionGroup is null) ? null : actionGroup.getActionGroupStruct(), pos);
487 * Removes an action group from the list of action groups associated
488 * with self.
489 * self:
490 * a GtkUIManager object
491 * action_group:
492 * the action group to be removed
493 * Since 2.4
495 public void removeActionGroup(ActionGroup actionGroup)
497 // void gtk_ui_manager_remove_action_group (GtkUIManager *self, GtkActionGroup *action_group);
498 gtk_ui_manager_remove_action_group(gtkUIManager, (actionGroup is null) ? null : actionGroup.getActionGroupStruct());
502 * Returns the list of action groups associated with self.
503 * self:
504 * a GtkUIManager object
505 * Returns:
506 * a GList of action groups. The list is owned by GTK+
507 * and should not be modified.
508 * Since 2.4
510 public ListG getActionGroups()
512 // GList* gtk_ui_manager_get_action_groups (GtkUIManager *self);
513 return new ListG( gtk_ui_manager_get_action_groups(gtkUIManager) );
517 * Returns the GtkAccelGroup associated with self.
518 * self:
519 * a GtkUIManager object
520 * Returns:
521 * the GtkAccelGroup.
522 * Since 2.4
524 public AccelGroup getAccelGroup()
526 // GtkAccelGroup* gtk_ui_manager_get_accel_group (GtkUIManager *self);
527 return new AccelGroup( gtk_ui_manager_get_accel_group(gtkUIManager) );
531 * Looks up a widget by following a path.
532 * The path consists of the names specified in the XML description of the UI.
533 * separated by '/'. Elements which don't have a name or action attribute in
534 * the XML (e.g. <popup>) can be addressed by their XML element name
535 * (e.g. "popup"). The root element ("/ui") can be omitted in the path.
536 * Note that the widget found by following a path that ends in a <menu>
537 * element is the menuitem to which the menu is attached, not the menu itself.
538 * Also note that the widgets constructed by a ui manager are not tied to
539 * the lifecycle of the ui manager. If you add the widgets returned by this
540 * function to some container or explicitly ref them, they will survive the
541 * destruction of the ui manager.
542 * self:
543 * a GtkUIManager
544 * path:
545 * a path
546 * Returns:
547 * the widget found by following the path, or NULL if no widget
548 * was found.
549 * Since 2.4
551 public Widget getWidget(char[] path)
553 // GtkWidget* gtk_ui_manager_get_widget (GtkUIManager *self, const gchar *path);
554 return new Widget( gtk_ui_manager_get_widget(gtkUIManager, Str.toStringz(path)) );
558 * Obtains a list of all toplevel widgets of the requested types.
559 * self:
560 * a GtkUIManager
561 * types:
562 * specifies the types of toplevel widgets to include. Allowed
563 * types are GTK_UI_MANAGER_MENUBAR, GTK_UI_MANAGER_TOOLBAR and
564 * GTK_UI_MANAGER_POPUP.
565 * Returns:
566 * a newly-allocated of all toplevel widgets of the requested
567 * types.
568 * Since 2.4
570 public ListSG getToplevels(GtkUIManagerItemType types)
572 // GSList* gtk_ui_manager_get_toplevels (GtkUIManager *self, GtkUIManagerItemType types);
573 return new ListSG( gtk_ui_manager_get_toplevels(gtkUIManager, types) );
577 * Looks up an action by following a path. See gtk_ui_manager_get_widget()
578 * for more information about paths.
579 * self:
580 * a GtkUIManager
581 * path:
582 * a path
583 * Returns:
584 * the action whose proxy widget is found by following the path,
585 * or NULL if no widget was found.
586 * Since 2.4
588 public Action getAction(char[] path)
590 // GtkAction* gtk_ui_manager_get_action (GtkUIManager *self, const gchar *path);
591 return new Action( gtk_ui_manager_get_action(gtkUIManager, Str.toStringz(path)) );
595 * Parses a string containing a UI definition and
596 * merges it with the current contents of self. An enclosing <ui>
597 * element is added if it is missing.
598 * self:
599 * a GtkUIManager object
600 * buffer:
601 * the string to parse
602 * length:
603 * the length of buffer (may be -1 if buffer is nul-terminated)
604 * error:
605 * return location for an error
606 * Returns:
607 * The merge id for the merged UI. The merge id can be used
608 * to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
609 * the return value is 0.
610 * Since 2.4
612 public uint addUiFromString(char[] buffer, int length, GError** error)
614 // guint gtk_ui_manager_add_ui_from_string (GtkUIManager *self, const gchar *buffer, gssize length, GError **error);
615 return gtk_ui_manager_add_ui_from_string(gtkUIManager, Str.toStringz(buffer), length, error);
619 * Parses a file containing a UI definition and
620 * merges it with the current contents of self.
621 * self:
622 * a GtkUIManager object
623 * filename:
624 * the name of the file to parse
625 * error:
626 * return location for an error
627 * Returns:
628 * The merge id for the merged UI. The merge id can be used
629 * to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
630 * the return value is 0.
631 * Since 2.4
633 public uint addUiFromFile(char[] filename, GError** error)
635 // guint gtk_ui_manager_add_ui_from_file (GtkUIManager *self, const gchar *filename, GError **error);
636 return gtk_ui_manager_add_ui_from_file(gtkUIManager, Str.toStringz(filename), error);
640 * Returns an unused merge id, suitable for use with
641 * gtk_ui_manager_add_ui().
642 * self:
643 * a GtkUIManager
644 * Returns:
645 * an unused merge id.
646 * Since 2.4
648 public uint newMergeId()
650 // guint gtk_ui_manager_new_merge_id (GtkUIManager *self);
651 return gtk_ui_manager_new_merge_id(gtkUIManager);
656 * Adds a UI element to the current contents of self.
657 * If type is GTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
658 * separator if such an element can be inserted at the place determined by
659 * path. Otherwise type must indicate an element that can be inserted at
660 * the place determined by path.
661 * If path points to a menuitem or toolitem, the new element will be inserted
662 * before or after this item, depending on top.
663 * self:
664 * a GtkUIManager
665 * merge_id:
666 * the merge id for the merged UI, see gtk_ui_manager_new_merge_id()
667 * path:
668 * a path
669 * name:
670 * the name for the added UI element
671 * action:
672 * the name of the action to be proxied, or NULL to add a separator
673 * type:
674 * the type of UI element to add.
675 * top:
676 * if TRUE, the UI element is added before its siblings, otherwise it
677 * is added after its siblings.
678 * Since 2.4
680 public void addUi(uint mergeId, char[] path, char[] name, char[] action, GtkUIManagerItemType type, int top)
682 // void gtk_ui_manager_add_ui (GtkUIManager *self, guint merge_id, const gchar *path, const gchar *name, const gchar *action, GtkUIManagerItemType type, gboolean top);
683 gtk_ui_manager_add_ui(gtkUIManager, mergeId, Str.toStringz(path), Str.toStringz(name), Str.toStringz(action), type, top);
687 * Unmerges the part of selfs content identified by merge_id.
688 * self:
689 * a GtkUIManager object
690 * merge_id:
691 * a merge id as returned by gtk_ui_manager_add_ui_from_string()
692 * Since 2.4
694 public void removeUi(uint mergeId)
696 // void gtk_ui_manager_remove_ui (GtkUIManager *self, guint merge_id);
697 gtk_ui_manager_remove_ui(gtkUIManager, mergeId);
701 * Creates a UI definition of the merged UI.
702 * self:
703 * a GtkUIManager
704 * Returns:
705 * A newly allocated string containing an XML representation of
706 * the merged UI.
707 * Since 2.4
709 public char[] getUi()
711 // gchar* gtk_ui_manager_get_ui (GtkUIManager *self);
712 return Str.toString(gtk_ui_manager_get_ui(gtkUIManager) );
716 * Makes sure that all pending updates to the UI have been completed.
717 * This may occasionally be necessary, since GtkUIManager updates the
718 * UI in an idle function. A typical example where this function is
719 * useful is to enforce that the menubar and toolbar have been added to
720 * the main window before showing it:
721 * gtk_container_add (GTK_CONTAINER (window), vbox);
722 * g_signal_connect (merge, "add_widget",
723 * G_CALLBACK (add_widget), vbox);
724 * gtk_ui_manager_add_ui_from_file (merge, "my-menus");
725 * gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
726 * gtk_ui_manager_ensure_update (merge);
727 * gtk_widget_show (window);
728 * self:
729 * a GtkUIManager
730 * Since 2.4
731 * Property Details
732 * The "add-tearoffs" property
733 * "add-tearoffs" gboolean : Read / Write
734 * The "add-tearoffs" property controls whether generated menus
735 * have tearoff menu items.
736 * Note that this only affects regular menus. Generated popup
737 * menus never have tearoff menu items.
738 * Default value: FALSE
739 * Since 2.4
741 public void ensureUpdate()
743 // void gtk_ui_manager_ensure_update (GtkUIManager *self);
744 gtk_ui_manager_ensure_update(gtkUIManager);