MenuShell
open class MenuShell : Container, MenuShellProtocol
A GtkMenuShell is the abstract base class used to derive the
GtkMenu and GtkMenuBar subclasses.
A GtkMenuShell is a container of GtkMenuItem objects arranged
in a list which can be navigated, selected, and activated by the
user to perform application functions. A GtkMenuItem can have a
submenu associated with it, allowing for nested hierarchical menus.
Terminology
A menu item can be “selected”, this means that it is displayed in the prelight state, and if it has a submenu, that submenu will be popped up.
A menu is “active” when it is visible onscreen and the user is selecting from it. A menubar is not active until the user clicks on one of its menuitems. When a menu is active, passing the mouse over a submenu will pop it up.
There is also is a concept of the current menu and a current menu item. The current menu item is the selected menu item that is furthest down in the hierarchy. (Every active menu shell does not necessarily contain a selected menu item, but if it does, then the parent menu shell must also contain a selected menu item.) The current menu is the menu that contains the current menu item. It will always have a GTK grab and receive all key presses.
The MenuShell type acts as a reference-counted owner of an underlying GtkMenuShell instance.
It provides the methods that can operate on this data type through MenuShellProtocol conformance.
Use MenuShell as a strong reference or owner of a GtkMenuShell instance.
-
Designated initialiser from the underlying `C` data type.This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
MenuShellinstance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkMenuShell>)Parameters
oppointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkMenuShell>)Parameters
oppointer to the underlying object
-
Optional initialiser from a non-mutating
gpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)Parameters
opgpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)Parameters
oppointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkMenuShell>?)Parameters
oppointer to the underlying object
-
Optional initialiser from the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkMenuShell>?)Parameters
oppointer to the underlying object
-
Designated initialiser from the underlying
Cdata type. Will retainGtkMenuShell. i.e., ownership is transferred to theMenuShellinstance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkMenuShell>)Parameters
oppointer to the underlying object
-
Reference intialiser for a related type that implements
MenuShellProtocolWill retainGtkMenuShell.Declaration
Swift
@inlinable public init<T>(menuShell other: T) where T : MenuShellProtocolParameters
otheran instance of a related type that implements
MenuShellProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)Parameters
praw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init(retainingRaw raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable public required init(raw p: UnsafeMutableRawPointer)Parameters
pmutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)Parameters
rawmutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
MenuShellProtocol.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
View on GitHub
Install in Dash
MenuShell Class Reference