Description Usage Arguments Details Value Examples
A menubar for gwindow instances. Menu items are specified
with a named list. The heirarchical nature of the list
maps to the heirarchical menu structure, with the names
giving the menu names. The menu actions are specified
using gaction
elements. These may also be
gseperator()
instances.
1 2 |
menulist |
list of actions. Actions must have parent specified |
popup |
Logical. ignored for now |
action |
optional value to paramaterize handler |
container |
parent container |
... |
passed along to |
ext.args |
A list of extra arguments to pass to the ExtJS constructor |
Menubars should only be added to gwindow
instances, but this is not strictly enforced, any
Ext.Panel
-based container would do.
Menubars can take checkboxes and radio buttons. Specify them without a parent container.
an ExtWidget object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | w <- gwindow()
sb <- gstatusbar("Powered by gWidgetsWWW and Rook", cont=w)
stub = function(...) galert("stub", parent=w)
l <- list(
File = list(open=gaction("Open", handler=stub, parent=w),
new = gaction("New", handler=stub, parent=w),
gseparator(),
quit = gaction("Quit", handler=stub, parent=w)),
Edit = list(save = gaction("Save", handler=stub, parent=w),
gcheckbox("some state", checked=TRUE, handler=stub)
)
)
m <- gmenu(l, cont=w)
gtext("Text goes here", cont=w)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.