1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### 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>
|
|
|
|
|
2001-12-01 18:30:49 +00:00
|
|
|
<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>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GtkOptionMenu ##### -->
|
|
|
|
<para>
|
|
|
|
The #GtkOptionMenu-struct struct contains private data only, and
|
|
|
|
should be accessed using the functions below.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_option_menu_new ##### -->
|
|
|
|
<para>
|
|
|
|
Creates a new #GtkOptionMenu.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns: a new #GtkOptionMenu.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### 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.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### 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.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_option_menu_remove_menu ##### -->
|
|
|
|
<para>
|
|
|
|
Removes the menu from the option menu.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@option_menu: a #GtkOptionMenu.
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_option_menu_set_history ##### -->
|
|
|
|
<para>
|
2002-11-08 19:41:50 +00:00
|
|
|
Selects the menu item specified by @index_ making it the newly
|
1999-08-16 18:51:52 +00:00
|
|
|
selected value for the option menu.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@option_menu: a #GtkOptionMenu.
|
2002-11-08 19:41:50 +00:00
|
|
|
@index_: the index of the menu item to select. Index values are from
|
1999-08-16 18:51:52 +00:00
|
|
|
0 to n-1.
|
|
|
|
|
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### FUNCTION gtk_option_menu_get_history ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@option_menu:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### SIGNAL GtkOptionMenu::changed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@optionmenu: the object which received the signal.
|
|
|
|
|
2001-11-01 00:06:32 +00:00
|
|
|
<!-- ##### ARG GtkOptionMenu:menu ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-11-02 18:18:50 +00:00
|
|
|
<!-- ##### ARG GtkOptionMenu:indicator-size ##### -->
|
2002-05-14 20:55:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-11-02 18:18:50 +00:00
|
|
|
<!-- ##### ARG GtkOptionMenu:indicator-spacing ##### -->
|
2002-05-14 20:55:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|