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] 2.12.0.0 Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. GLib.Object Constructs 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 to
add an insensitive "Empty" item
The behaviour is chosen based on the "is_important" property of the action to which the submenu is associated.
- Constructor
  2.12.0.0
  Default constructor
- Constructor
  2.12.0.0
  System.Obsolete
  a
  Internal constructor
- Constructor
  2.12.0.0
  a
  Internal constructor
- Property
  2.12.0.0
  Gtk.AccelGroup The associated with this UIManager a
- Property
  2.12.0.0
  Gtk.ActionGroup[] The list of action groups associated with this UIManager. a
- Event
  2.12.0.0
  GLib.Signal("actions_changed")
  System.EventHandler The "actions-changed" signal is emitted whenever the set of actions changes.
- Property
  2.12.0.0
  GLib.Property("add-tearoffs")
  System.Boolean Sets the "add_tearoffs" property, which controls whether menus generated by this will have tearoff menu items. a , whether tearoff menu items are added Note that this only affects regular menus. Generated popup menus never have tearoff menu items.
- Method
  2.12.0.0
  System.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.
- Method
  2.12.0.0
  System.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.
- Method
  2.12.0.0
  System.UInt32 `` a Adds a UI element to the current contents from an embedded resource. a
- Method
  2.12.0.0
  System.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.
- Event
  2.12.0.0
  GLib.Signal("add_widget")
  Gtk.AddWidgetHandler The AddWidget signal is emitted for each generated menubar and toolbar. It is not emitted for generated popup menus, which can be obtained by .
- Event
  2.12.0.0
  GLib.Signal("connect_proxy")
  Gtk.ConnectProxyHandler The 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.
- Event
  2.12.0.0
  GLib.Signal("disconnect_proxy")
  Gtk.DisconnectProxyHandler The DisconnectProxy signal is emitted after disconnecting a proxy from an action in the group.
- Method
  2.12.0.0
  System.Void Makes sure that all pending updates to the UI have been completed. This may occasionally be necessary, since updates the UI in an idle function.
- Method
  2.12.0.0
  Gtk.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.
- Method
  2.12.0.0
  Gtk.Widget[] `` a Obtains a list of all toplevel widgets of the requested types. a Allowed types are , and .
- Method
  2.12.0.0
  Gtk.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.

- Property
  2.12.0.0
  GLib.GType GType Property. a Returns the native value for .
- Method
  2.12.0.0
  System.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 UIManager Actions in earlier groups hide actions with the same name in later groups.
- Method
  2.12.0.0
  System.UInt32 Returns an unused merge id, suitable for use with . a
- Method
  2.12.0.0
  GLib.DefaultSignalHandler(ConnectionMethod="OverrideActionsChanged", Type=typeof(Gtk.UIManager))
  System.Void Default handler for the event. Override this method in a subclass to provide a default handler for the event.
- Method
  2.12.0.0
  GLib.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.
- Method
  2.12.0.0
  GLib.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.
- Method
  2.12.0.0
  GLib.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.
- Method
  2.12.0.0
  GLib.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.
- Method
  2.12.0.0
  GLib.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.
- Event
  2.12.0.0
  GLib.Signal("post_activate")
  Gtk.PostActivateHandler The PostActivate signal is emitted just after the action is activated. This is intended for applications to get notification just after any action is activated.
- Event
  2.12.0.0
  GLib.Signal("pre_activate")
  Gtk.PreActivateHandler The PreActivate signal is emitted just before the action is activated. This is intended for applications to get notification just before any action is activated.
- Method
  2.12.0.0
  System.Void `` a emoves an action group from the list of action groups
- Method
  2.12.0.0
  System.Void `` a from when the ui was added. Unmerges the content identified by .
- Property
  2.12.0.0
  GLib.Property("ui")
  System.String The UI represented in XML. a