getMenuBar.ggobi {Rggobi} | R Documentation |
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.
getMenuBar.ggobi(.gobi = getDefaultGGobi())
.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. |
This uses the RGtk package to determine the class of the Gtk widget.
An object of class GtkWidget.
Duncan Temple Lang
gtkMenubarNew
gtkMenubarAppend
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)