gtk2/docs/reference/gtk/tmpl/gtkradiomenuitem.sgml

112 lines
2.5 KiB
Plaintext
Raw Normal View History

1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Title ##### -->
GtkRadioMenuItem
<!-- ##### SECTION Short_Description ##### -->
A choice from multiple check menu items.
1999-08-16 18:51:52 +00:00
<!-- ##### SECTION Long_Description ##### -->
<para>
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>
The correct way to create a group of radio menu items is aproximativly
this:
1999-08-16 18:51:52 +00:00
</para>
<example>
<title>How to create a group of radio menu items.</title>
<programlisting>
GList *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_group (GTK_RADIO_MENU_ITEM (item));
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>
<variablelist>
<varlistentry>
<term>#GtkMenuItem</term>
<listitem><para>because a radio menu item is a menu item.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkCheckItem</term>
<listitem><para>to know how to handle the check.</para></listitem>
</varlistentry>
</variablelist>
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### STRUCT GtkRadioMenuItem ##### -->
<para>
The structure contains only private data that must be accessed through
the interface functions.
1999-08-16 18:51:52 +00:00
</para>
<!-- ##### FUNCTION gtk_radio_menu_item_new ##### -->
<para>
Creates a new #GtkRadioMenuItem.
1999-08-16 18:51:52 +00:00
</para>
@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>
@group: the group to which the radio menu item is to be attached
@label: the text for the label
@Returns: a new #GtkRadioMenuItem
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic ##### -->
<para>
</para>
@group:
@label:
@Returns:
<!-- ##### MACRO gtk_radio_menu_item_group ##### -->
1999-08-16 18:51:52 +00:00
<para>
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.
1999-08-16 18:51:52 +00:00
</para>
@Returns: its group
<!-- # Unused Parameters # -->
@radio_menu_item: the radio menu item
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_radio_menu_item_set_group ##### -->
<para>
Sets the group of a radio menu item, or changes it.
1999-08-16 18:51:52 +00:00
</para>
@radio_menu_item: the radio menu item
@group: the new group
1999-08-16 18:51:52 +00:00
<!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
<para>
</para>
@radio_menu_item:
@Returns: