Description
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.
CSS nodes
GtkRadioMenuItem has a main CSS node with name menuitem, and a subnode
with name radio, which gets the .left or .right style class.
Functions
gtk_radio_menu_item_new_from_widget ()
GtkWidget *
gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group);
Creates a new GtkRadioMenuItem adding it to the same group as group
.
[constructor]
Since: 2.4
gtk_radio_menu_item_new_with_label_from_widget ()
GtkWidget *
gtk_radio_menu_item_new_with_label_from_widget
(GtkRadioMenuItem *group,
const gchar *label);
Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
The new GtkRadioMenuItem is added to the same group as group
.
[constructor]
Since: 2.4
gtk_radio_menu_item_new_with_mnemonic_from_widget ()
GtkWidget *
gtk_radio_menu_item_new_with_mnemonic_from_widget
(GtkRadioMenuItem *group,
const gchar *label);
Creates a new GtkRadioMenuItem containing a label. The label will be
created using gtk_label_new_with_mnemonic(), so underscores in label
indicate the mnemonic for the menu item.
The new GtkRadioMenuItem is added to the same group as group
.
[constructor]
Since: 2.4
gtk_radio_menu_item_set_group ()
void
gtk_radio_menu_item_set_group (GtkRadioMenuItem *radio_menu_item,
GSList *group);
Sets the group of a radio menu item, or changes it.
gtk_radio_menu_item_get_group ()
GSList *
gtk_radio_menu_item_get_group (GtkRadioMenuItem *radio_menu_item);
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 radio_menu_item
.
[element-type GtkRadioMenuItem][transfer none]