1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkRadioMenuItem
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 18:08:35 +00:00
|
|
|
A choice from multiple check menu items
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
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.
|
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-16 22:46:30 +00:00
|
|
|
The group list does not need to be freed, as each #GtkRadioMenuItem will
|
|
|
|
remove itself and its list item when it is destroyed.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The correct way to create a group of radio menu items is approximatively
|
2000-02-28 21:39:41 +00:00
|
|
|
this:
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
2000-02-28 21:39:41 +00:00
|
|
|
<example>
|
|
|
|
<title>How to create a group of radio menu items.</title>
|
|
|
|
<programlisting>
|
2003-05-26 22:35:16 +00:00
|
|
|
GSList *group = NULL;
|
2000-02-28 21:39:41 +00:00
|
|
|
GtkWidget *item;
|
|
|
|
gint i;
|
|
|
|
|
2002-05-28 22:23:55 +00:00
|
|
|
for (i = 0; i < 5; i++)
|
2000-02-28 21:39:41 +00:00
|
|
|
{
|
|
|
|
item = gtk_radio_menu_item_new_with_label (group, "This is an example");
|
2001-12-31 00:05:30 +00:00
|
|
|
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
|
2000-02-28 21:39:41 +00:00
|
|
|
if (i == 1)
|
|
|
|
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
|
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>#GtkMenuItem</term>
|
|
|
|
<listitem><para>because a radio menu item is a menu item.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2002-04-20 23:57:41 +00:00
|
|
|
<term>#GtkCheckMenuItem</term>
|
2000-02-28 21:39:41 +00:00
|
|
|
<listitem><para>to know how to handle the check.</para></listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### STRUCT GtkRadioMenuItem ##### -->
|
|
|
|
<para>
|
2001-05-11 17:13:44 +00:00
|
|
|
The structure contains only private data that must be accessed through
|
2000-02-28 21:39:41 +00:00
|
|
|
the interface functions.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2004-07-20 02:26:06 +00:00
|
|
|
<!-- ##### SIGNAL GtkRadioMenuItem::group-changed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@radiomenuitem: the object which received the signal.
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### ARG GtkRadioMenuItem:group ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Creates a new #GtkRadioMenuItem.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-05-11 17:13:44 +00:00
|
|
|
@group: the group to which the radio menu item is to be attached
|
|
|
|
@Returns: a new #GtkRadioMenuItem
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_label ##### -->
|
|
|
|
<para>
|
2001-08-20 17:01:47 +00:00
|
|
|
Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-05-11 17:13:44 +00:00
|
|
|
@group: the group to which the radio menu item is to be attached
|
2000-02-28 21:39:41 +00:00
|
|
|
@label: the text for the label
|
2001-05-11 17:13:44 +00:00
|
|
|
@Returns: a new #GtkRadioMenuItem
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-09-08 06:24:46 +00:00
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@group:
|
|
|
|
@label:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2004-02-21 17:05:32 +00:00
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new_from_widget ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@group:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_label_from_widget ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@group:
|
|
|
|
@label:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic_from_widget ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@group:
|
|
|
|
@label:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-07-12 22:45:05 +00:00
|
|
|
<!-- ##### MACRO gtk_radio_menu_item_group ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-10-10 21:52:42 +00:00
|
|
|
Deprecated compatibility macro. Use gtk_radio_menu_item_get_group() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_set_group ##### -->
|
|
|
|
<para>
|
2000-02-28 21:39:41 +00:00
|
|
|
Sets the group of a radio menu item, or changes it.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
@radio_menu_item: a #GtkRadioMenuItem.
|
2001-10-10 21:52:42 +00:00
|
|
|
@group: the new group.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-09-08 06:24:46 +00:00
|
|
|
<!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
|
|
|
|
<para>
|
2001-10-10 21:52:42 +00:00
|
|
|
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.
|
2001-09-08 06:24:46 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
@radio_menu_item: a #GtkRadioMenuItem.
|
2001-10-10 21:52:42 +00:00
|
|
|
@Returns: the group of @radio_menu_item.
|
2001-10-13 05:52:14 +00:00
|
|
|
|
|
|
|
|