A choice from multiple check menu items
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 <gtk-radio-menu-item>
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:
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); }
Derives from
<gtk-check-menu-item>
.This class defines the following slots:
group
- The radio menu item whose group this widget belongs to.
<gtk-radio-group*>
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-radio-menu-item>
.
- group
- the group to which the radio menu item is to be attached
- ret
- a new
<gtk-radio-menu-item>
<gtk-radio-group*>
) (label mchars
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-radio-menu-item>
whose child is a simple<gtk-label>
.
- group
- the group to which the radio menu item is to be attached
- label
- the text for the label
- ret
- a new
<gtk-radio-menu-item>
<gtk-radio-menu-item>
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-radio-menu-item>
adding it to the same group as group.
- group
- An existing
<gtk-radio-menu-item>
- ret
- The new
<gtk-radio-menu-item>
Since 2.4
<gtk-radio-menu-item>
) (group <gtk-radio-group*>
)Sets the group of a radio menu item, or changes it.
- radio-menu-item
- a
<gtk-radio-menu-item>
.- group
- the new group.
<gtk-radio-menu-item>
) ⇒ (ret <gtk-radio-group*>
)Returns the group to which the radio menu item belongs, as a
<g-list>
of<gtk-radio-menu-item>
. The list belongs to GTK+ and should not be freed.
- radio-menu-item
- a
<gtk-radio-menu-item>
.- ret
- the group of radio-menu-item.