A Menu is a MenuShell that implements a drop down menu consisting of
a list of MenuItem objects which can be navigated and activated by the
user to perform application functions.
detach
public void detach()
Detaches the menu from the widget to which it had been attached.
getAttachedMenus
public ArrayList getAttachedMenus()
Returns a list of the menus which are attached to this
widget.
getTitle
public String getTitle()
Returns the title of the menu.
- The title for the menu.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface MenuShell
gtk_menu_attach
protected static final void gtk_menu_attach(Handle menu,
Handle child,
int left,
int right,
int top,
int bottom)
gtk_menu_detach
protected static final void gtk_menu_detach(Handle menu)
gtk_menu_get_accel_group
protected static final Handle gtk_menu_get_accel_group(Handle menu)
gtk_menu_get_active
protected static final int gtk_menu_get_active(Handle menu)
gtk_menu_get_attach_widget
protected static final Handle gtk_menu_get_attach_widget(Handle menu)
gtk_menu_get_tearoff_state
protected static final boolean gtk_menu_get_tearoff_state(Handle menu)
gtk_menu_get_title
protected static final String gtk_menu_get_title(Handle menu)
gtk_menu_get_type
protected static final int gtk_menu_get_type()
gtk_menu_new
protected static final Handle gtk_menu_new()
gtk_menu_popdown
protected static final void gtk_menu_popdown(Handle menu)
gtk_menu_popup
protected static final void gtk_menu_popup(Handle menu)
gtk_menu_reorder_child
protected static final void gtk_menu_reorder_child(Handle menu,
Handle child,
int position)
gtk_menu_reposition
protected static final void gtk_menu_reposition(Handle menu)
gtk_menu_set_accel_group
protected static final void gtk_menu_set_accel_group(Handle menu,
Handle accelGroup)
gtk_menu_set_accel_path
protected static final void gtk_menu_set_accel_path(Handle menu,
String accelPath)
gtk_menu_set_active
protected static final void gtk_menu_set_active(Handle menu,
int index)
gtk_menu_set_monitor
protected static final void gtk_menu_set_monitor(Handle menu,
int monitorNum)
gtk_menu_set_screen
protected static final void gtk_menu_set_screen(Handle menu,
Handle screen)
gtk_menu_set_tearoff_state
protected static final void gtk_menu_set_tearoff_state(Handle menu,
boolean tornOff)
gtk_menu_set_title
protected static final void gtk_menu_set_title(Handle menu,
String title)
popup
public void popup()
Displays a menu and makes it available for selection. Applications
can use this method to provide context-sensitive menus.
reorderMenuItem
public void reorderMenuItem(MenuItem child,
int position)
Move a MenuItem to a new position within the Menu.
child
- The MenuItem to be moved.position
- The new position to place the MenuItem.
setAccelGroup
public void setAccelGroup(AccelGroup accelGroup)
Set the AccelGroup which holds global accelerators for the menu.
The accelerator group needs to also be added to all windows that
this menu is being used in.
accelGroup
- The AccelGroup to be associated with this Menu.
setTitle
public void setTitle(String title)
Sets the title string for this Menu. The title is displayed when
the menu is shown as a tearoff menu.
title
- The title for the Menu.