gtk-sharp[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.GLib.ObjectConstructs menus and toolbars from an XML description
A constructs a user interface (menus and toolbars) from one or more UI definitions, which reference actions from one or more action groups.
TODO: all the xml stuff
UI Merging
The most remarkable feature of GtkUIManager is that it can overlay a set of menuitems and toolitems over another one, and demerge them later.
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 /ui/menubar/JustifyMenu/Left and the toolitem with the same name has path /ui/toolbar1/JustifyToolItems/Left.
Accelerators
Every action has an accelerator path. Accelerators are installed together with menuitem proxies, but they can also be explicitly added with <accelerator> elements in the UI definition. This makes it possible to have accelerators for actions even if they have no visible proxies.
Smart Separators
The separators created by GtkUIManager 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.
Empty Menus
Submenus pose similar problems to separators inconnection with merging. It is impossible to know in advance whether they will end up empty after merging. GtkUIManager offers two ways to treat empty submenus:
make them disappear by hiding the menu item they're attached toadd an insensitive "Empty" item
The behaviour is chosen based on the "is_important" property of the action to which the submenu is associated.
ConstructorDefault constructorConstructor
a Internal constructorPropertyGtk.AccelGroupThe associated with this UIManagera PropertyGtk.ActionGroup[]The list of action groups associated with this UIManager.a EventGLib.Signal("actions-changed")System.EventHandlerThe "actions-changed" signal is emitted whenever the set of actions changes.PropertyGLib.Property("add-tearoffs")System.BooleanSets the "add_tearoffs" property, which controls whether menus generated by this will have tearoff menu items.a , whether tearoff menu items are addedNote that this only affects regular menus. Generated popup menus never have tearoff menu items.MethodSystem.Void
a , the merge id for the merged UI
a
a , the name for the added UI element
a , the name of the action to be proxied, or to add a separator
a . the type of UI element to add.
a . If , the UI element is added before its siblings, otherwise it is added after its siblings.
Adds a UI element to the current contents.If type is , Gtk inserts a menuitem, toolitem or separator if such an element can be inserted at the place determined by path. Otherwise type must indicate an element that can be inserted at the place determined by path.MethodSystem.UInt32
a , the name of the file to parse
Parses a file containing a UI definition and merges it with the current contents.a . The merge id for the merged UI. The merge id can be used to unmerge the UI with . If an error occurred, the return value is 0.MethodSystem.UInt32
a Adds a UI element to the current contents from an embedded resource.a MethodSystem.UInt32
a to parse
Parses a string containing a UI definition and merges it with the current contents.a . The merge id for the merged UI. The merge id can be used to unmerge the UI with . If an error occurred, the return value is 0.An enclosing <ui> element is added if it is missing.EventGLib.Signal("add-widget")Gtk.AddWidgetHandlerThe AddWidget signal is emitted for each generated menubar and toolbar.It is not emitted for generated popup menus, which can be obtained by .EventGLib.Signal("connect-proxy")Gtk.ConnectProxyHandlerThe ConnectProxy signal is emitted after connecting a proxy to an action in the group.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.EventGLib.Signal("disconnect-proxy")Gtk.DisconnectProxyHandlerThe DisconnectProxy signal is emitted after disconnecting a proxy from an action in the group.MethodSystem.VoidMakes sure that all pending updates to the UI have been completed.This may occasionally be necessary, since updates the UI in an idle function.MethodGtk.Action
a Looks up an action by following a path.a whose proxy widget is found by following the path, or if no widget was found.See for more information about paths.MethodGtk.Widget[]
a Obtains a list of all toplevel widgets of the requested types.a Allowed types are , and .MethodGtk.Widget
a Looks up a widget by following a path.a found by following the path, or if no widget was found.The path consists of the names specified in the XML description of the UI. separated by '/'. Elements which do not have a name or action attribute in the XML (e.g. <popup>) can be addressed by their XML element name (e.g. "popup"). The root element ("/ui") can be omitted in the path.
The widget found by following a path that ends in a <menu> element is the menuitem to which the menu is attached, not the menu itself.
PropertyGLib.GTypeGType Property.a Returns the native value for .MethodSystem.Void
a to be inserted
a , the position at which the group will be inserted.
Inserts an action group into the list of action groups associated with this UIManagerActions in earlier groups hide actions with the same name in later groups.MethodSystem.UInt32
Returns an unused merge id, suitable for use with
.
a MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideActionsChanged", Type=typeof(Gtk.UIManager))System.VoidDefault handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideAddWidget", Type=typeof(Gtk.UIManager))System.Void
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideConnectProxy", Type=typeof(Gtk.UIManager))System.Void
a
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideDisconnectProxy", Type=typeof(Gtk.UIManager))System.Void
a
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideGetAction", Type=typeof(Gtk.UIManager))Gtk.Action
To be added.
To be added.To be added.To be added.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideGetWidget", Type=typeof(Gtk.UIManager))Gtk.Widget
To be added.
To be added.To be added.To be added.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverridePostActivate", Type=typeof(Gtk.UIManager))System.Void
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverridePreActivate", Type=typeof(Gtk.UIManager))System.Void
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.EventGLib.Signal("post-activate")Gtk.PostActivateHandlerThe PostActivate signal is emitted just after the action is activated.This is intended for applications to get notification just after any action is activated.EventGLib.Signal("pre-activate")Gtk.PreActivateHandlerThe PreActivate signal is emitted just before the action is activated.This is intended for applications to get notification just before any action is activated.MethodSystem.Void
a emoves an action group from the list of action groupsMethodSystem.Void
a from when the ui was added.
Unmerges the content identified by .PropertyGLib.Property("ui")System.StringThe UI represented in XML.a