]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkoptionmenu.sgml
Add g_return_if_fail() (_gtk_file_chooser_embed_get_resizable_hints): Add
[~andy/gtk] / docs / reference / gtk / tmpl / gtkoptionmenu.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkOptionMenu
3
4 <!-- ##### SECTION Short_Description ##### -->
5 a widget used to choose from a list of valid choices.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 A #GtkOptionMenu is a widget that allows the user to choose from a
10 list of valid choices.  The #GtkOptionMenu displays the selected 
11 choice.  When activated the #GtkOptionMenu displays a popup #GtkMenu 
12 which allows the user to make a new choice.
13 </para>
14
15 <para>
16 Using a #GtkOptionMenu is simple; build a #GtkMenu, by calling
17 gtk_menu_new(), then appending menu items to it with 
18 gtk_menu_shell_append(). Set that menu on the option menu 
19 with gtk_option_menu_set_menu(). Set the selected menu item with
20 gtk_option_menu_set_history(); connect to the "changed" signal on
21 the option menu; in the "changed" signal, check the new selected 
22 menu item with gtk_option_menu_get_history().
23 </para>
24
25 <para>
26 As of GTK+ 2.4, #GtkOptionMenu has been deprecated in favor of #GtkComboBox.
27 </para>
28
29 <!-- ##### SECTION See_Also ##### -->
30
31
32 <!-- ##### STRUCT GtkOptionMenu ##### -->
33 <para>
34 The #GtkOptionMenu-struct struct contains private data only, and 
35 should be accessed using the functions below.
36 </para>
37
38 @Deprecated: Use #GtkComboBox instead.
39
40 <!-- ##### SIGNAL GtkOptionMenu::changed ##### -->
41 <para>
42
43 </para>
44
45 @optionmenu: the object which received the signal.
46
47 <!-- ##### ARG GtkOptionMenu:menu ##### -->
48 <para>
49
50 </para>
51
52 <!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
53 <para>
54
55 </para>
56
57 <!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
58 <para>
59
60 </para>
61
62 <!-- ##### FUNCTION gtk_option_menu_new ##### -->
63 <para>
64 Creates a new #GtkOptionMenu.
65 </para>
66
67 @Returns: a new #GtkOptionMenu.
68 @Deprecated: Use #GtkComboBox instead.
69
70
71 <!-- ##### FUNCTION gtk_option_menu_get_menu ##### -->
72 <para>
73 Returns the #GtkMenu associated with the #GtkOptionMenu.
74 </para>
75
76 @option_menu: a #GtkOptionMenu.
77 @Returns: the #GtkMenu associated with the #GtkOptionMenu.
78 @Deprecated: Use #GtkComboBox instead.
79
80
81 <!-- ##### FUNCTION gtk_option_menu_set_menu ##### -->
82 <para>
83 Provides the #GtkMenu that is popped up to allow the user to choose
84 a new value.  You should provide a simple menu avoiding the
85 use of tearoff menu items, submenus, and accelerators.
86 </para>
87
88 @option_menu: a #GtkOptionMenu.
89 @menu: the #GtkMenu to associate with the #GtkOptionMenu.
90 @Deprecated: Use #GtkComboBox instead.
91
92
93 <!-- ##### FUNCTION gtk_option_menu_remove_menu ##### -->
94 <para>
95 Removes the menu from the option menu.
96 </para>
97
98 @option_menu: a #GtkOptionMenu.
99 @Deprecated: Use #GtkComboBox instead.
100
101
102 <!-- ##### FUNCTION gtk_option_menu_set_history ##### -->
103 <para>
104 Selects the menu item specified by @index_ making it the newly
105 selected value for the option menu.
106 </para>
107
108 @option_menu: a #GtkOptionMenu.
109 @index_: the index of the menu item to select.  Index values are from 0 to n-1.
110 @Deprecated: Use #GtkComboBox instead.
111
112
113 <!-- ##### FUNCTION gtk_option_menu_get_history ##### -->
114 <para>
115
116 </para>
117
118 @option_menu: 
119 @Returns: 
120
121