gtk.radio_menu_item

Module for [RadioMenuItem] class

Types 3

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.

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

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.

Methods
GType _gType() @property
RadioMenuItem self()Returns `this`, for use in `with` statements.
RadioMenuItemGidBuilder builder()Get builder for [gtk.radiomenuitem.RadioMenuItem] Returns: New builder object
void group(gtk.radio_menu_item.RadioMenuItem propval) @propertySet `group` property. Params: propval = The radio menu item whose group this widget belongs to.
gtk.radio_menu_item.RadioMenuItem newFromWidget(gtk.radio_menu_item.RadioMenuItem group = null)Creates a new #GtkRadioMenuItem adding it to the same group as group.
gtk.radio_menu_item.RadioMenuItem newWithLabel(gtk.radio_menu_item.RadioMenuItem[] group, string label)Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
gtk.radio_menu_item.RadioMenuItem newWithLabelFromWidget(gtk.radio_menu_item.RadioMenuItem group = null, string label = null)Creates a new GtkRadioMenuItem whose child is a simple GtkLabel. The new #GtkRadioMenuItem is added to the same group as group.
gtk.radio_menu_item.RadioMenuItem newWithMnemonic(gtk.radio_menu_item.RadioMenuItem[] group, string label)Creates a new #GtkRadioMenuItem containing a label. The label will be created using [gtk.label.Label.newWithMnemonic], so underscores in label indicate the mnemonic for the menu item.
gtk.radio_menu_item.RadioMenuItem newWithMnemonicFromWidget(gtk.radio_menu_item.RadioMenuItem group = null, string label = null)Creates a new GtkRadioMenuItem containing a label. The label will be created using [gtk.label.Label.newWithMnemonic], so underscores in label indicate the mnemonic for the menu item.
gtk.radio_menu_item.RadioMenuItem[] getGroup()Returns the group to which the radio menu item belongs, as a #GList of #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed. Returns: the group of radiomenuitem
void joinGroup(gtk.radio_menu_item.RadioMenuItem groupSource = null)Joins a #GtkRadioMenuItem object to the group of another #GtkRadioMenuItem object.
void setGroup(gtk.radio_menu_item.RadioMenuItem[] group = null)Sets the group of a radio menu item, or changes it.
gulong connectGroupChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.radio_menu_item.RadioMenuItem))) && Parameters!T.length < 2)Connect to `GroupChanged` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.radio_menu_item.RadioMenuItem[] group = null)Creates a new #GtkRadioMenuItem.
Methods
T group(gtk.radio_menu_item.RadioMenuItem propval)Set `group` property. Params: propval = The radio menu item whose group this widget belongs to. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.radio_menu_item.RadioMenuItem]