getMenuBar.ggobi {Rggobi}R Documentation

Get GGobi control panel's menubar widget

Description

This retrieves a reference to the menubar widget in the control panel/window of the specified GGobi instance. One can use this to add new menus, etc.

Usage

getMenuBar.ggobi(.gobi = getDefaultGGobi())

Arguments

.gobi the GGobi instance in which to locate the control panel and its menubar. This can be given by index or explicit reference to the C structure representing the GGobi instance.

Details

This uses the RGtk package to determine the class of the Gtk widget.

Value

An object of class GtkWidget.

Author(s)

Duncan Temple Lang

References

http://www.ggobi.org

See Also

gtkMenubarNew gtkMenubarAppend

Examples

data(mtcars)
g = ggobi(mtcars)
mbar = g$getMenuBar()

menu = gtkMenu()
item = gtkMenuItem("My action")
item$AddCallback("activate",
                 function(label, mitem) {
                     cat(label, "\n")
                 }, "My action")

menu$Append(item)

item = gtkMenuItem("R tools")
item$SetSubmenu(menu)

mbar$Append(item)

[Package Rggobi version 1.1-3 Index]