UIManagerProtocol

public protocol UIManagerProtocol : ObjectProtocol, BuildableProtocol

> GtkUIManager is deprecated since GTK+ 3.10. To construct user interfaces > from XML definitions, you should use GtkBuilder, GMenuModel, et al. To > work with actions, use GAction, GtkActionable et al. These newer classes > support richer functionality and integration with various desktop shells. > It should be possible to migrate most/all functionality from GtkUIManager.

A GtkUIManager constructs a user interface (menus and toolbars) from one or more UI definitions, which reference actions from one or more action groups.

UI Definitions #

The UI definitions are specified in an XML format which can be roughly described by the following DTD.

> Do not confuse the GtkUIManager UI Definitions described here with > the similarly named GtkBuilder UI Definitions.

<!ELEMENT menubar     (menuitem|separator|placeholder|menu)* >
<!ELEMENT menu        (menuitem|separator|placeholder|menu)* >
<!ELEMENT popup       (menuitem|separator|placeholder|menu)* >
<!ELEMENT toolbar     (toolitem|separator|placeholder)* >
<!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
<!ELEMENT menuitem     EMPTY >
<!ELEMENT toolitem     (menu?) >
<!ELEMENT separator    EMPTY >
<!ELEMENT accelerator  EMPTY >
<!ATTLIST menubar      name                      #IMPLIED
                       action                    #IMPLIED >
<!ATTLIST toolbar      name                      #IMPLIED
                       action                    #IMPLIED >
<!ATTLIST popup        name                      #IMPLIED
                       action                    #IMPLIED
                       accelerators (true|false) #IMPLIED >
<!ATTLIST placeholder  name                      #IMPLIED
                       action                    #IMPLIED >
<!ATTLIST separator    name                      #IMPLIED
                       action                    #IMPLIED
                       expand       (true|false) #IMPLIED >
<!ATTLIST menu         name                      #IMPLIED
                       action                    #REQUIRED
                       position     (top|bot)    #IMPLIED >
<!ATTLIST menuitem     name                      #IMPLIED
                       action                    #REQUIRED
                       position     (top|bot)    #IMPLIED
                       always-show-image (true|false) #IMPLIED >
<!ATTLIST toolitem     name                      #IMPLIED
                       action                    #REQUIRED
                       position     (top|bot)    #IMPLIED >
<!ATTLIST accelerator  name                      #IMPLIED
                       action                    #REQUIRED >

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 GMarkupParser is used to parse the UI description, it must not only be valid XML, but valid markup.

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 “ entity.

A UI definition

<ui>
  <menubar>
    <menu name="FileMenu" action="FileMenuAction">
      <menuitem name="New" action="New2Action" />
      <placeholder name="FileMenuAdditions" />
    </menu>
    <menu name="JustifyMenu" action="JustifyMenuAction">
      <menuitem name="Left" action="justify-left"/>
      <menuitem name="Centre" action="justify-center"/>
      <menuitem name="Right" action="justify-right"/>
      <menuitem name="Fill" action="justify-fill"/>
    </menu>
  </menubar>
  <toolbar action="toolbar1">
    <placeholder name="JustifyToolItems">
      <separator/>
      <toolitem name="Left" action="justify-left"/>
      <toolitem name="Centre" action="justify-center"/>
      <toolitem name="Right" action="justify-right"/>
      <toolitem name="Fill" action="justify-fill"/>
      <separator/>
    </placeholder>
  </toolbar>
</ui>

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:

  • menubar

a GtkMenuBar

  • toolbar

a GtkToolbar

  • popup

a toplevel GtkMenu

  • menu

a GtkMenu attached to a menuitem

  • menuitem

a GtkMenuItem subclass, the exact type depends on the action

  • toolitem

a GtkToolItem 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 GtkMenuToolButton as proxy.

  • separator

a GtkSeparatorMenuItem or GtkSeparatorToolItem

  • accelerator

a keyboard accelerator

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.

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.

For separators in toolbars, you can set expand="true" to turn them from a small, visible separator to an expanding, invisible one. Toolitems following an expanding separator are effectively right-aligned.

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 “hide_if_empty” property of the action to which the submenu is associated.

GtkUIManager as GtkBuildable #

The GtkUIManager implementation of the GtkBuildable interface accepts GtkActionGroup objects as <child> elements in UI definitions.

A GtkUIManager UI definition as described above can be embedded in an GtkUIManager <object> element in a GtkBuilder UI definition.

The widgets that are constructed by a GtkUIManager can be embedded in other parts of the constructed user interface with the help of the “constructor” attribute. See the example below.

An embedded GtkUIManager UI definition

<object class="GtkUIManager" id="uiman">
  <child>
    <object class="GtkActionGroup" id="actiongroup">
      <child>
        <object class="GtkAction" id="file">
          <property name="label">_File</property>
        </object>
      </child>
    </object>
  </child>
  <ui>
    <menubar name="menubar1">
      <menu action="file">
      </menu>
    </menubar>
  </ui>
</object>
<object class="GtkWindow" id="main-window">
  <child>
    <object class="GtkMenuBar" id="menubar1" constructor="uiman"/>
  </child>
</object>

The UIManagerProtocol protocol exposes the methods and properties of an underlying GtkUIManager instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see UIManager. Alternatively, use UIManagerRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkUIManager instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • ui_manager_ptr Default implementation

    Typed pointer to the underlying GtkUIManager instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkUIManager instance.

    Declaration

    Swift

    var ui_manager_ptr: UnsafeMutablePointer<GtkUIManager>! { get }
  • Required Initialiser for types conforming to UIManagerProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

UIManager Class

  • Bind a UIManagerPropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: UIManagerPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a UIManager property

    Declaration

    Swift

    @inlinable
    func get(property: UIManagerPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    Set the value of a UIManager property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: UIManagerPropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

UIManager signals

  • Connect a Swift signal handler to the given, typed UIManagerSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: UIManagerSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The Swift signal handler (function or callback) to invoke on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • Connect a C signal handler to the given, typed UIManagerSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: UIManagerSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • The actions-changed signal is emitted whenever the set of actions changes.

    Note

    This represents the underlying actions-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onActionsChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the actionsChanged signal is emitted

  • actionsChangedSignal Extension method

    Typed actions-changed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var actionsChangedSignal: UIManagerSignalName { get }
  • onAddWidget(flags:handler:) Extension method

    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 gtk_ui_manager_get_widget().

    Note

    This represents the underlying add-widget signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onAddWidget(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ widget: WidgetRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    widget

    the added widget

    handler

    The signal handler to call Run the given callback whenever the addWidget signal is emitted

  • addWidgetSignal Extension method

    Typed add-widget signal for using the connect(signal:) methods

    Declaration

    Swift

    static var addWidgetSignal: UIManagerSignalName { get }
  • The connect-proxy 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.

    Note

    This represents the underlying connect-proxy signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onConnectProxy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef, _ proxy: WidgetRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    action

    the action

    proxy

    the proxy

    handler

    The signal handler to call Run the given callback whenever the connectProxy signal is emitted

  • connectProxySignal Extension method

    Typed connect-proxy signal for using the connect(signal:) methods

    Declaration

    Swift

    static var connectProxySignal: UIManagerSignalName { get }
  • The disconnect-proxy signal is emitted after disconnecting a proxy from an action in the group.

    Note

    This represents the underlying disconnect-proxy signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onDisconnectProxy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef, _ proxy: WidgetRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    action

    the action

    proxy

    the proxy

    handler

    The signal handler to call Run the given callback whenever the disconnectProxy signal is emitted

  • disconnectProxySignal Extension method

    Typed disconnect-proxy signal for using the connect(signal:) methods

    Declaration

    Swift

    static var disconnectProxySignal: UIManagerSignalName { get }
  • The post-activate signal is emitted just after the action is activated.

    This is intended for applications to get notification just after any action is activated.

    Note

    This represents the underlying post-activate signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onPostActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    action

    the action

    handler

    The signal handler to call Run the given callback whenever the postActivate signal is emitted

  • postActivateSignal Extension method

    Typed post-activate signal for using the connect(signal:) methods

    Declaration

    Swift

    static var postActivateSignal: UIManagerSignalName { get }
  • The pre-activate signal is emitted just before the action is activated.

    This is intended for applications to get notification just before any action is activated.

    Note

    This represents the underlying pre-activate signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onPreActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    action

    the action

    handler

    The signal handler to call Run the given callback whenever the preActivate signal is emitted

  • preActivateSignal Extension method

    Typed pre-activate signal for using the connect(signal:) methods

    Declaration

    Swift

    static var preActivateSignal: UIManagerSignalName { get }
  • The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::add-tearoffs signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyAddTearoffs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyAddTearoffs signal is emitted

  • notifyAddTearoffsSignal Extension method

    Typed notify::add-tearoffs signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyAddTearoffsSignal: UIManagerSignalName { get }
  • onNotifyUi(flags:handler:) Extension method

    The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

    Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with G_PARAM_EXPLICIT_NOTIFY, then any call to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

    This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

    (C Language Example):

    g_signal_connect (text_view->buffer, "notify::paste-target-list",
                      G_CALLBACK (gtk_text_view_target_list_notify),
                      text_view)
    

    It is important to note that you must use canonical parameter names as detail strings for the notify signal.

    Note

    This represents the underlying notify::ui signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyUi(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyUi signal is emitted

  • notifyUiSignal Extension method

    Typed notify::ui signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyUiSignal: UIManagerSignalName { get }

UIManager Class: UIManagerProtocol extension (methods and fields)

  • Adds a UI element to the current contents of manager.

    If type is GTK_UI_MANAGER_AUTO, 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.

    If path points to a menuitem or toolitem, the new element will be inserted before or after this item, depending on top.

    add_ui is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func addUi(mergeID: Int, path: UnsafePointer<gchar>!, name: UnsafePointer<gchar>!, action: UnsafePointer<gchar>? = nil, type: UIManagerItemType, top: Bool)
  • addUiFromFile(filename:) Extension method

    Parses a file containing a UI definition and merges it with the current contents of manager.

    add_ui_from_file is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func addUiFromFile(filename: UnsafePointer<gchar>!) throws -> Int
  • addUiFrom(resourcePath:) Extension method

    Parses a resource file containing a UI definition and merges it with the current contents of manager.

    add_ui_from_resource is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func addUiFrom(resourcePath: UnsafePointer<gchar>!) throws -> Int
  • Parses a string containing a UI definition and merges it with the current contents of manager. An enclosing <ui> element is added if it is missing.

    add_ui_from_string is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func addUiFrom(stringBuffer buffer: UnsafePointer<gchar>!, length: gssize) throws -> Int
  • ensureUpdate() Extension method

    Makes sure that all pending updates to the UI have been completed.

    This may occasionally be necessary, since GtkUIManager 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: (C Language Example):

    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);
    

    ensure_update is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func ensureUpdate()
  • getAccelGroup() Extension method

    Returns the GtkAccelGroup associated with manager.

    get_accel_group is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getAccelGroup() -> AccelGroupRef!
  • getAction(path:) Extension method

    Looks up an action by following a path. See gtk_ui_manager_get_widget() for more information about paths.

    get_action is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getAction(path: UnsafePointer<gchar>!) -> ActionRef!
  • getActionGroups() Extension method

    Returns the list of action groups associated with manager.

    get_action_groups is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getActionGroups() -> GLib.ListRef!
  • getAddTearoffs() Extension method

    Returns whether menus generated by this GtkUIManager will have tearoff menu items.

    get_add_tearoffs is deprecated: Tearoff menus are deprecated and should not be used in newly written code.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getAddTearoffs() -> Bool
  • getToplevels(types:) Extension method

    Obtains a list of all toplevel widgets of the requested types.

    get_toplevels is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getToplevels(types: UIManagerItemType) -> GLib.SListRef!
  • getUi() Extension method

    Creates a UI definition of the merged UI.

    get_ui is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getUi() -> String!
  • getWidget(path:) Extension method

    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. <popup>) can be addressed by their XML element name (e.g. “popup”). The root element (“/ui”) can be omitted in the path.

    Note that 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 it manages.

    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.

    get_widget is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getWidget(path: UnsafePointer<gchar>!) -> WidgetRef!
  • insert(actionGroup:pos:) Extension method

    Inserts an action group into the list of action groups associated with manager. Actions in earlier groups hide actions with the same name in later groups.

    If pos is larger than the number of action groups in manager, or negative, action_group will be inserted at the end of the internal list.

    insert_action_group is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func insert<ActionGroupT>(actionGroup: ActionGroupT, pos: Int) where ActionGroupT : ActionGroupProtocol
  • newMergeID() Extension method

    Returns an unused merge id, suitable for use with gtk_ui_manager_add_ui().

    new_merge_id is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func newMergeID() -> Int
  • remove(actionGroup:) Extension method

    Removes an action group from the list of action groups associated with manager.

    remove_action_group is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func remove<ActionGroupT>(actionGroup: ActionGroupT) where ActionGroupT : ActionGroupProtocol
  • removeUi(mergeID:) Extension method

    Unmerges the part of manager‘s content identified by merge_id.

    remove_ui is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func removeUi(mergeID: Int)
  • set(addTearoffs:) Extension method

    Sets the “add_tearoffs” property, which controls whether menus generated by this GtkUIManager will have tearoff menu items.

    Note that this only affects regular menus. Generated popup menus never have tearoff menu items.

    set_add_tearoffs is deprecated: Tearoff menus are deprecated and should not be used in newly written code.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func set(addTearoffs: Bool)
  • accelGroup Extension method

    Returns the GtkAccelGroup associated with manager.

    get_accel_group is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var accelGroup: AccelGroupRef! { get }
  • actionGroups Extension method

    Returns the list of action groups associated with manager.

    get_action_groups is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var actionGroups: GLib.ListRef! { get }
  • addTearoffs Extension method

    Returns whether menus generated by this GtkUIManager will have tearoff menu items.

    get_add_tearoffs is deprecated: Tearoff menus are deprecated and should not be used in newly written code.

    Declaration

    Swift

    @inlinable
    var addTearoffs: Bool { get nonmutating set }
  • ui Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var ui: String! { get }
  • parent Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parent: GObject { get }