gtk2/docs/reference/gtk/tmpl/gtkoptionmenu.sgml
Soeren Sandmann b1165617b7 docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml
Fri Nov  8 20:14:52 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gdk/tmpl/dnd.sgml
	docs/reference/gdk/tmpl/drawing.sgml
	docs/reference/gdk/tmpl/gdk-unused.sgml
	docs/reference/gdk/tmpl/gdkdisplay.sgml
	docs/reference/gdk/tmpl/general.sgml
	docs/reference/gdk/tmpl/input_devices.sgml
	docs/reference/gdk/tmpl/selections.sgml
	docs/reference/gtk/tmpl/gtkcellrenderer.sgml
	docs/reference/gtk/tmpl/gtkcurve.sgml
	docs/reference/gtk/tmpl/gtkdnd.sgml
	docs/reference/gtk/tmpl/gtkitemfactory.sgml
	docs/reference/gtk/tmpl/gtkmenu.sgml
	docs/reference/gtk/tmpl/gtkoldeditable.sgml
	docs/reference/gtk/tmpl/gtkoptionmenu.sgml
	docs/reference/gtk/tmpl/gtkpreview.sgml
	docs/reference/gtk/tmpl/gtkselection.sgml
	docs/reference/gtk/tmpl/gtksocket.sgml
	docs/reference/gtk/tmpl/gtkstyle.sgml
	docs/reference/gtk/tmpl/gtktextbuffer.sgml
	docs/reference/gtk/tmpl/gtktreemodel.sgml
	docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c
	gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h
	gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c
	gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h
	gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h
	gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h
	gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h
	gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h
	gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h
	gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c
	gtk/gtktreemodel.h gtk/gtkwidget.h

	Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow
	without warnings. (#91680)
2002-11-08 19:41:50 +00:00

113 lines
2.6 KiB
Plaintext

<!-- ##### 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>
<!-- ##### 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>
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.
<!-- ##### FUNCTION gtk_option_menu_get_history ##### -->
<para>
</para>
@option_menu:
@Returns:
<!-- ##### 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>