]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkradiomenuitem.sgml
2.7.0
[~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 <para>
84 Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
85 </para>
86
87 @group: the group to which the radio menu item is to be attached
88 @label: the text for the label
89 @Returns: a new #GtkRadioMenuItem
90
91
92 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic ##### -->
93 <para>
94
95 </para>
96
97 @group: 
98 @label: 
99 @Returns: 
100
101
102 <!-- ##### FUNCTION gtk_radio_menu_item_new_from_widget ##### -->
103 <para>
104
105 </para>
106
107 @group: 
108 @Returns: 
109
110
111 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_label_from_widget ##### -->
112 <para>
113
114 </para>
115
116 @group: 
117 @label: 
118 @Returns: 
119
120
121 <!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic_from_widget ##### -->
122 <para>
123
124 </para>
125
126 @group: 
127 @label: 
128 @Returns: 
129
130
131 <!-- ##### MACRO gtk_radio_menu_item_group ##### -->
132 <para>
133 Deprecated compatibility macro. Use gtk_radio_menu_item_get_group() instead.
134 </para>
135
136
137
138 <!-- ##### FUNCTION gtk_radio_menu_item_set_group ##### -->
139 <para>
140 Sets the group of a radio menu item, or changes it.
141 </para>
142
143 @radio_menu_item: a #GtkRadioMenuItem.
144 @group: the new group.
145
146
147 <!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
148 <para>
149 Returns the group to which the radio menu item belongs, as a #GList of
150 #GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
151 </para>
152
153 @radio_menu_item: a #GtkRadioMenuItem.
154 @Returns: the group of @radio_menu_item.
155
156