RadioMenuItemRef
public struct RadioMenuItemRef : RadioMenuItemProtocol, GWeakCapturing
A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected.
The group list does not need to be freed, as each GtkRadioMenuItem will
remove itself and its list item when it is destroyed.
The correct way to create a group of radio menu items is approximatively this:
How to create a group of radio menu items.
(C Language Example):
GSList *group = NULL;
GtkWidget *item;
gint i;
for (i = 0; i < 5; i++)
{
item = gtk_radio_menu_item_new_with_label (group, "This is an example");
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
if (i == 1)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
}
CSS nodes
(plain Language Example):
menuitem
├── radio.left
╰── <child>
GtkRadioMenuItem has a main CSS node with name menuitem, and a subnode with name radio, which gets the .left or .right style class.
The RadioMenuItemRef type acts as a lightweight Swift reference to an underlying GtkRadioMenuItem instance.
It exposes methods that can operate on this data type through RadioMenuItemProtocol conformance.
Use RadioMenuItemRef only as an unowned reference to an existing GtkRadioMenuItem instance.
-
Untyped pointer to the underlying `GtkRadioMenuItem` instance.For type-safe access, use the generated, typed pointer
radio_menu_item_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkRadioMenuItem>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkRadioMenuItem>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkRadioMenuItem>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkRadioMenuItem>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
RadioMenuItemProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : RadioMenuItemProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> RadioMenuItemRef where T : RadioMenuItemProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
RadioMenuItemProtocol.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>) -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
RadioMenuItemProtocol.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
RadioMenuItemProtocol.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
RadioMenuItemProtocol.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
RadioMenuItemProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Creates a new
GtkRadioMenuItem.Declaration
Swift
@inlinable init<SListT>(group: SListT?) where SListT : SListProtocol -
Creates a new
GtkRadioMenuItemwhose child is a simpleGtkLabel.Declaration
Swift
@inlinable init<SListT>(group: SListT?, label: UnsafePointer<gchar>!) where SListT : SListProtocol -
Creates a new
GtkRadioMenuItemcontaining a label. The label will be created usinggtk_label_new_with_mnemonic(), so underscores inlabelindicate the mnemonic for the menu item.Declaration
Swift
@inlinable init<SListT>(group: SListT?, mnemonic label: UnsafePointer<gchar>!) where SListT : SListProtocol -
Creates a new
GtkRadioMenuItemwhose child is a simpleGtkLabel.Declaration
Swift
@inlinable static func newWith<SListT>(group: SListT?, label: UnsafePointer<gchar>!) -> WidgetRef! where SListT : SListProtocol -
Creates a new
GtkRadioMenuItemcontaining a label. The label will be created usinggtk_label_new_with_mnemonic(), so underscores inlabelindicate the mnemonic for the menu item.Declaration
Swift
@inlinable static func newWith<SListT>(group: SListT?, mnemonic label: UnsafePointer<gchar>!) -> WidgetRef! where SListT : SListProtocol
View on GitHub
Install in Dash
RadioMenuItemRef Structure Reference