summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkoptionmenu.sgml
blob: ea474d90ae1c791d4b38cb6611452b4f4a9007b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!-- ##### SECTION Title ##### -->
GtkOptionMenu

<!-- ##### SECTION Short_Description ##### -->
A widget used to choose from a list of valid choices

<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkOptionMenu is a widget that allows the user to choose from a
list of valid choices.  The #GtkOptionMenu displays the selected 
choice.  When activated the #GtkOptionMenu displays a popup #GtkMenu 
which allows the user to make a new choice.
</para>

<para>
Using a #GtkOptionMenu is simple; build a #GtkMenu, by calling
gtk_menu_new(), then appending menu items to it with 
gtk_menu_shell_append(). Set that menu on the option menu 
with gtk_option_menu_set_menu(). Set the selected menu item with
gtk_option_menu_set_history(); connect to the "changed" signal on
the option menu; in the "changed" signal, check the new selected 
menu item with gtk_option_menu_get_history().
</para>

<para>
As of GTK+ 2.4, #GtkOptionMenu has been deprecated in favor of #GtkComboBox.
</para>

<!-- ##### SECTION See_Also ##### -->


<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### STRUCT GtkOptionMenu ##### -->
<para>
The #GtkOptionMenu-struct struct contains private data only, and 
should be accessed using the functions below.
</para>

@Deprecated: 2.4: Use #GtkComboBox instead.

<!-- ##### SIGNAL GtkOptionMenu::changed ##### -->
<para>

</para>

@optionmenu: the object which received the signal.

<!-- ##### ARG GtkOptionMenu:menu ##### -->
<para>

</para>

<!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
<para>

</para>

<!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_option_menu_new ##### -->
<para>
Creates a new #GtkOptionMenu.
</para>

@void: 
@Returns: a new #GtkOptionMenu.
@Deprecated: 2.4: Use #GtkComboBox instead.


<!-- ##### FUNCTION gtk_option_menu_get_menu ##### -->
<para>
Returns the #GtkMenu associated with the #GtkOptionMenu.
</para>

@option_menu: a #GtkOptionMenu.
@Returns: the #GtkMenu associated with the #GtkOptionMenu.
@Deprecated: 2.4: Use #GtkComboBox instead.


<!-- ##### FUNCTION gtk_option_menu_set_menu ##### -->
<para>
Provides the #GtkMenu that is popped up to allow the user to choose
a new value.  You should provide a simple menu avoiding the
use of tearoff menu items, submenus, and accelerators.
</para>

@option_menu: a #GtkOptionMenu.
@menu: the #GtkMenu to associate with the #GtkOptionMenu.
@Deprecated: 2.4: Use #GtkComboBox instead.


<!-- ##### FUNCTION gtk_option_menu_remove_menu ##### -->
<para>
Removes the menu from the option menu.
</para>

@option_menu: a #GtkOptionMenu.
@Deprecated: 2.4: Use #GtkComboBox instead.


<!-- ##### FUNCTION gtk_option_menu_set_history ##### -->
<para>
Selects the menu item specified by @index_ making it the newly
selected value for the option menu.
</para>

@option_menu: a #GtkOptionMenu.
@index_: the index of the menu item to select.  Index values are from 0 to n-1.
@Deprecated: 2.4: Use #GtkComboBox instead.


<!-- ##### FUNCTION gtk_option_menu_get_history ##### -->
<para>

</para>

@option_menu: 
@Returns: