deprecated menu widget replaced by
ComboBox
in gtk 2.3.
An OptionMenu is a widget that allows the user to choose from a list
of valid choices. When activated the OptionMenu displays a popup
Menu which allows the user to make a new choice.
addEvents
protected static void addEvents(EventMap evtMap)
Implementation method to build an EventMap for this widget class.
Not useful (or supported) for application use.
fireOptionMenuEvent
protected void fireOptionMenuEvent(OptionMenuEvent event)
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface Button
getEventType
public EventType getEventType(String signal)
- getEventType in interface Button
getHistory
public int getHistory()
Retrieves the index of the currently selected menu item. The menu items
are numbered from top to bottom, starting with 0.
- index of the selected menu item, or -1 if there are no menu
items
getMenu
public Menu getMenu()
Returns the Menu associated with this OptionMenu.
- The Menu assoicated with this OptionMenu.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Button
gtk_option_menu_get_history
protected static final int gtk_option_menu_get_history(Handle option_menu)
gtk_option_menu_get_menu
protected static final Handle gtk_option_menu_get_menu(Handle option_menu)
gtk_option_menu_get_type
protected static final int gtk_option_menu_get_type()
gtk_option_menu_new
protected static final Handle gtk_option_menu_new()
gtk_option_menu_remove_menu
protected static final void gtk_option_menu_remove_menu(Handle option_menu)
gtk_option_menu_set_history
protected static final void gtk_option_menu_set_history(Handle option_menu,
int index)
gtk_option_menu_set_menu
protected static final void gtk_option_menu_set_menu(Handle option_menu,
Handle menu)
removeMenu
public void removeMenu()
Removes the Menu from the OptionMenu
setHistory
public void setHistory(int index)
Selects the menu item specified by index
making it the newly
selected value for the option menu.
index
- the index of the menu item to select. Index values are
from 0 to n-1.
setMenu
public void setMenu(Menu menu)
Provides the Menu 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.
menu
- The Menu to add to the OptionMenu.