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, useGAction,GtkActionableet 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.
-
Untyped pointer to the underlying
GtkUIManagerinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
ui_manager_ptrDefault implementationTyped pointer to the underlying
GtkUIManagerinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkUIManagerinstance.Declaration
Swift
var ui_manager_ptr: UnsafeMutablePointer<GtkUIManager>! { get } -
Required Initialiser for types conforming to
UIManagerProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
UIManagerPropertyNamesource 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a UIManager property
Declaration
Swift
@inlinable func get(property: UIManagerPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) 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
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
UIManagerSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: UIManagerSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe 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(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
UIManagerSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: UIManagerSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onActionsChanged(flags:Extension methodhandler: ) The
actions-changedsignal is emitted whenever the set of actions changes.Note
This represents the underlyingactions-changedsignalDeclaration
Swift
@discardableResult @inlinable func onActionsChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
actionsChangedsignal is emitted -
actionsChangedSignalExtension methodTyped
actions-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var actionsChangedSignal: UIManagerSignalName { get } -
onAddWidget(flags:Extension methodhandler: ) The
add-widgetsignal is emitted for each generated menubar and toolbar. It is not emitted for generated popup menus, which can be obtained bygtk_ui_manager_get_widget().Note
This represents the underlyingadd-widgetsignalDeclaration
Swift
@discardableResult @inlinable func onAddWidget(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ widget: WidgetRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
widgetthe added widget
handlerThe signal handler to call Run the given callback whenever the
addWidgetsignal is emitted -
addWidgetSignalExtension methodTyped
add-widgetsignal for using theconnect(signal:)methodsDeclaration
Swift
static var addWidgetSignal: UIManagerSignalName { get } -
onConnectProxy(flags:Extension methodhandler: ) The
connect-proxysignal 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 underlyingconnect-proxysignalDeclaration
Swift
@discardableResult @inlinable func onConnectProxy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef, _ proxy: WidgetRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
actionthe action
proxythe proxy
handlerThe signal handler to call Run the given callback whenever the
connectProxysignal is emitted -
connectProxySignalExtension methodTyped
connect-proxysignal for using theconnect(signal:)methodsDeclaration
Swift
static var connectProxySignal: UIManagerSignalName { get } -
onDisconnectProxy(flags:Extension methodhandler: ) The
disconnect-proxysignal is emitted after disconnecting a proxy from an action in the group.Note
This represents the underlyingdisconnect-proxysignalDeclaration
Swift
@discardableResult @inlinable func onDisconnectProxy(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef, _ proxy: WidgetRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
actionthe action
proxythe proxy
handlerThe signal handler to call Run the given callback whenever the
disconnectProxysignal is emitted -
disconnectProxySignalExtension methodTyped
disconnect-proxysignal for using theconnect(signal:)methodsDeclaration
Swift
static var disconnectProxySignal: UIManagerSignalName { get } -
onPostActivate(flags:Extension methodhandler: ) The
post-activatesignal is emitted just after theactionis activated.This is intended for applications to get notification just after any action is activated.
Note
This represents the underlyingpost-activatesignalDeclaration
Swift
@discardableResult @inlinable func onPostActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
actionthe action
handlerThe signal handler to call Run the given callback whenever the
postActivatesignal is emitted -
postActivateSignalExtension methodTyped
post-activatesignal for using theconnect(signal:)methodsDeclaration
Swift
static var postActivateSignal: UIManagerSignalName { get } -
onPreActivate(flags:Extension methodhandler: ) The
pre-activatesignal is emitted just before theactionis activated.This is intended for applications to get notification just before any action is activated.
Note
This represents the underlyingpre-activatesignalDeclaration
Swift
@discardableResult @inlinable func onPreActivate(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ action: ActionRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
actionthe action
handlerThe signal handler to call Run the given callback whenever the
preActivatesignal is emitted -
preActivateSignalExtension methodTyped
pre-activatesignal for using theconnect(signal:)methodsDeclaration
Swift
static var preActivateSignal: UIManagerSignalName { get } -
onNotifyAddTearoffs(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::add-tearoffssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyAddTearoffs(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyAddTearoffssignal is emitted -
notifyAddTearoffsSignalExtension methodTyped
notify::add-tearoffssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyAddTearoffsSignal: UIManagerSignalName { get } -
onNotifyUi(flags:Extension methodhandler: ) 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 tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_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 underlyingnotify::uisignalDeclaration
Swift
@discardableResult @inlinable func onNotifyUi(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: UIManagerRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyUisignal is emitted -
notifyUiSignalExtension methodTyped
notify::uisignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyUiSignal: UIManagerSignalName { get }
-
addUi(mergeID:Extension methodpath: name: action: type: top: ) Adds a UI element to the current contents of
manager.If
typeisGTK_UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or separator if such an element can be inserted at the place determined bypath. Otherwisetypemust indicate an element that can be inserted at the place determined bypath.If
pathpoints to a menuitem or toolitem, the new element will be inserted before or after this item, depending ontop.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 -
addUiFrom(stringBuffer:Extension methodlength: ) 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 methodMakes sure that all pending updates to the UI have been completed.
This may occasionally be necessary, since
GtkUIManagerupdates 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 methodReturns the
GtkAccelGroupassociated withmanager.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 methodReturns 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 methodReturns whether menus generated by this
GtkUIManagerwill 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 methodCreates 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:Extension methodpos: ) 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
posis larger than the number of action groups inmanager, or negative,action_groupwill 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 methodReturns 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 bymerge_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
GtkUIManagerwill 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) -
accelGroupExtension methodReturns the
GtkAccelGroupassociated withmanager.get_accel_group is deprecated: This method is deprecated.
Declaration
Swift
@inlinable var accelGroup: AccelGroupRef! { get } -
actionGroupsExtension methodReturns 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 } -
addTearoffsExtension methodReturns whether menus generated by this
GtkUIManagerwill 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 } -
uiExtension methodUndocumented
Declaration
Swift
@inlinable var ui: String! { get } -
parentExtension methodUndocumented
Declaration
Swift
@inlinable var parent: GObject { get }
View on GitHub
Install in Dash
UIManagerProtocol Protocol Reference