]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkradiomenuitem.sgml
897c5f64d1dd1b08815fac50facd6e33b38cdb90
[~andy/gtk] / docs / reference / gtk / tmpl / gtkradiomenuitem.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkRadioMenuItem
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A choice from multiple check menu items
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 A radio menu item is a check menu item that belongs to a group. At each
10 instant exactly one of the radio menu items from a group is selected.
11 </para>
12 <para>
13 The group list does not need to be freed, as each #GtkRadioMenuItem will 
14 remove itself and its list item when it is destroyed.
15 </para>
16 <para>
17 The correct way to create a group of radio menu items is approximatively
18 this:
19 </para>
20 <example>
21 <title>How to create a group of radio menu items.</title>
22 <programlisting>
23 GSList *group = NULL;
24 GtkWidget *item;
25 gint i;
26
27 for (i = 0; i &lt; 5; i++)
28 {
29   item = gtk_radio_menu_item_new_with_label (group, "This is an example");
30   group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
31   if (i == 1)
32     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
33 }
34 </programlisting>
35 </example>
36
37 <!-- ##### SECTION See_Also ##### -->
38 <para>
39 <variablelist>
40 <varlistentry>
41 <term>#GtkMenuItem</term>
42 <listitem><para>because a radio menu item is a menu item.</para></listitem>
43 </varlistentry>
44 <varlistentry>
45 <term>#GtkCheckMenuItem</term>
46 <listitem><para>to know how to handle the check.</para></listitem>
47 </varlistentry>
48 </variablelist>
49 </para>
50
51 <!-- ##### SECTION Stability_Level ##### -->
52
53
54 <!-- ##### STRUCT GtkRadioMenuItem ##### -->
55 <para>
56 The structure contains only private data that must be accessed through
57 the interface functions.
58 </para>
59
60
61 <!-- ##### SIGNAL GtkRadioMenuItem::group-changed ##### -->
62 <para>
63
64 </para>
65
66 @radiomenuitem: the object which received the signal.
67
68 <!-- ##### ARG GtkRadioMenuItem:group ##### -->
69 <para>
70
71 </para>
72
73 <!-- ##### FUNCTION gtk_radio_menu_item_new ##### -->
74 <para>
75 Creates a new #GtkRadioMenuItem.
76 </para>
77
78 @group: the group to which the radio menu item is to be attached
79 @Returns: a new #GtkRadioMenuItem
80
81
82 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_label ##### -->
83
84
85 @group: 
86 @label: 
87 @Returns: 
88
89
90 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic ##### -->
91 <para>
92
93 </para>
94
95 @group: 
96 @label: 
97 @Returns: 
98
99
100 <!-- ##### FUNCTION gtk_radio_menu_item_new_from_widget ##### -->
101 <para>
102
103 </para>
104
105 @group: 
106 @Returns: 
107
108
109 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_label_from_widget ##### -->
110 <para>
111
112 </para>
113
114 @group: 
115 @label: 
116 @Returns: 
117
118
119 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic_from_widget ##### -->
120 <para>
121
122 </para>
123
124 @group: 
125 @label: 
126 @Returns: 
127
128
129 <!-- ##### MACRO gtk_radio_menu_item_group ##### -->
130 <para>
131 Deprecated compatibility macro. Use gtk_radio_menu_item_get_group() instead.
132 </para>
133
134
135
136 <!-- ##### FUNCTION gtk_radio_menu_item_set_group ##### -->
137 <para>
138 Sets the group of a radio menu item, or changes it.
139 </para>
140
141 @radio_menu_item: a #GtkRadioMenuItem.
142 @group: the new group.
143
144
145 <!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
146 <para>
147 Returns the group to which the radio menu item belongs, as a #GList of
148 #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
149 </para>
150
151 @radio_menu_item: a #GtkRadioMenuItem.
152 @Returns: the group of @radio_menu_item.
153
154