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 <!-- ##### STRUCT GtkOptionMenu ##### -->
34 The #GtkOptionMenu-struct struct contains private data only, and
35 should be accessed using the functions below.
38 @Deprecated: Use #GtkComboBox instead.
40 <!-- ##### SIGNAL GtkOptionMenu::changed ##### -->
45 @optionmenu: the object which received the signal.
47 <!-- ##### ARG GtkOptionMenu:menu ##### -->
52 <!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
57 <!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
62 <!-- ##### FUNCTION gtk_option_menu_new ##### -->
64 Creates a new #GtkOptionMenu.
67 @Returns: a new #GtkOptionMenu.
68 @Deprecated: Use #GtkComboBox instead.
71 <!-- ##### FUNCTION gtk_option_menu_get_menu ##### -->
73 Returns the #GtkMenu associated with the #GtkOptionMenu.
76 @option_menu: a #GtkOptionMenu.
77 @Returns: the #GtkMenu associated with the #GtkOptionMenu.
78 @Deprecated: Use #GtkComboBox instead.
81 <!-- ##### FUNCTION gtk_option_menu_set_menu ##### -->
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.
88 @option_menu: a #GtkOptionMenu.
89 @menu: the #GtkMenu to associate with the #GtkOptionMenu.
90 @Deprecated: Use #GtkComboBox instead.
93 <!-- ##### FUNCTION gtk_option_menu_remove_menu ##### -->
95 Removes the menu from the option menu.
98 @option_menu: a #GtkOptionMenu.
99 @Deprecated: Use #GtkComboBox instead.
102 <!-- ##### FUNCTION gtk_option_menu_set_history ##### -->
104 Selects the menu item specified by @index_ making it the newly
105 selected value for the option menu.
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.
113 <!-- ##### FUNCTION gtk_option_menu_get_history ##### -->