1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A widget used to choose from a list of valid choices
7 <!-- ##### SECTION Long_Description ##### -->
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.
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().
26 As of GTK+ 2.4, #GtkOptionMenu has been deprecated in favor of #GtkComboBox.
29 <!-- ##### SECTION See_Also ##### -->
32 <!-- ##### SECTION Stability_Level ##### -->
35 <!-- ##### STRUCT GtkOptionMenu ##### -->
37 The #GtkOptionMenu-struct struct contains private data only, and
38 should be accessed using the functions below.
41 @Deprecated: Use #GtkComboBox instead.
43 <!-- ##### SIGNAL GtkOptionMenu::changed ##### -->
48 @optionmenu: the object which received the signal.
50 <!-- ##### ARG GtkOptionMenu:menu ##### -->
55 <!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
60 <!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
65 <!-- ##### FUNCTION gtk_option_menu_new ##### -->
67 Creates a new #GtkOptionMenu.
70 @Returns: a new #GtkOptionMenu.
71 @Deprecated: Use #GtkComboBox instead.
74 <!-- ##### FUNCTION gtk_option_menu_get_menu ##### -->
76 Returns the #GtkMenu associated with the #GtkOptionMenu.
79 @option_menu: a #GtkOptionMenu.
80 @Returns: the #GtkMenu associated with the #GtkOptionMenu.
81 @Deprecated: Use #GtkComboBox instead.
84 <!-- ##### FUNCTION gtk_option_menu_set_menu ##### -->
86 Provides the #GtkMenu that is popped up to allow the user to choose
87 a new value. You should provide a simple menu avoiding the
88 use of tearoff menu items, submenus, and accelerators.
91 @option_menu: a #GtkOptionMenu.
92 @menu: the #GtkMenu to associate with the #GtkOptionMenu.
93 @Deprecated: Use #GtkComboBox instead.
96 <!-- ##### FUNCTION gtk_option_menu_remove_menu ##### -->
98 Removes the menu from the option menu.
101 @option_menu: a #GtkOptionMenu.
102 @Deprecated: Use #GtkComboBox instead.
105 <!-- ##### FUNCTION gtk_option_menu_set_history ##### -->
107 Selects the menu item specified by @index_ making it the newly
108 selected value for the option menu.
111 @option_menu: a #GtkOptionMenu.
112 @index_: the index of the menu item to select. Index values are from 0 to n-1.
113 @Deprecated: Use #GtkComboBox instead.
116 <!-- ##### FUNCTION gtk_option_menu_get_history ##### -->