menu constructor, main and popup
A menu may be viewed as a heirarchical collection of buttons, each
invoked by clicking on the button. These buttons are exposed
through submenus. More generally, a widget may replace the
button. This widget intends to support buttons (gactions),
separators (gseparator), radio button (gradio) and checkbutton
(gcheckbox), but this may be toolkit independent. When using a
radio button or checkbox, one should pass in a parent
argument to the constructor – not a container
.
generic for toolkit dispatch
add menubar items to a menu
For a menubar, svalue
returns the list of action items
etc. that defined the menubar. This can be useful to access the
underlying item being proxied. (For gaction
items the
enabled<-
method may be used on the item, but this may not
extend to gradio
and gcheckbox
items)
for a menubar, svalue<-
replaces the menubar items with new
ones specified by value.
gmenu(menu.list, popup = FALSE, container = NULL, ..., toolkit = guiToolkit()) .gmenu(toolkit, menu.list = list(), popup = FALSE, container = NULL, ...) ## S3 method for class 'GMenuBar' add(obj, child, expand = FALSE, fill = NULL, anchor = NULL, ...) ## S3 method for class 'GMenuBar' svalue(obj, index = NULL, drop = NULL, ...) ## S3 replacement method for class 'GMenuBar' svalue(obj, index=NULL, ...) <- value
menu.list |
A list defining the menu structure. Named sub
lists determine the submenu titles and structure. The list may
have components of class: |
popup |
logical. If true, make a popup window to be added through a handler call |
container |
A parent container. When a widget is created it can be incorporated into the widget heirarchy by passing in a parent container at construction time. (For some toolkits this is not optional, e.g. gWidgets2tcltk or gWidgets2WWW2.) |
... |
These values are passed to the |
toolkit |
Each widget constructor is passed in the toolkit it
will use. This is typically done using the default, which will
lookup the toolkit through |
obj |
parent object |
child |
list. a menubar list or gmenu instance. |
expand |
NULL or logical. For box containers controls whether a child will expand to fill the allocated space. |
fill |
NULL or character. For box containers. The value of |
anchor |
NULL or integer. For box containers. The anchor argument is used to position the child within the parent when there is more space allocated than the child requests. This is specified with a Cartesian pair in -1,0,1 x -1, 0, 1. |
index |
ignored |
drop |
ignored |
value |
a list or menu bar specifying the new men ubar |
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.