createSimpleMenu {RGtkViewers}R Documentation

Create a menu

Description

A convenience function for creating a menu by specifying a character vector giving the labels of the menu items and a single callback function that is invoked when an item is selected.

Usage

createSimpleMenu(labels, callback = NULL)

Arguments

labels ~~Describe labels here~~
callback the callback function that is registered for the activate signal for each GtkMenuItem created. The function should expect the GtkMenuItem as the first argument and the menu item's label as the second argument.

Value

A list

menu the GtkMenu object
items a list of the GtkMenuItem objects

Note

This will probably be moved to a new package named RGtkUtils in the future.

Author(s)

Duncan Temple Lang <duncan@research.bell-labs.com>

References

http://www.omegahat.org/RGtk, http://www.gtk.org

See Also

gtkMenu gtkMenuItem gtAddCallback

Examples



[Package RGtkViewers version 0.7 Index]