Toplevel menu bar

Description

The GMenuBar class provides functionality for a top-level menubar. In tlctk the menubars can show either gaction items (proxied as buttons), gradio items or gcheckbox items. In the latter two cases, one uses the parent argument – not the container argument – to specify the parent container. Such items can also be shared with toolbars.

Usage

1

Arguments

...

passed to constructor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
w <- gwindow("having fun?")
sb <- gstatusbar("Your message here...", cont=w)
g <- ggroup(cont=w, horizontal=FALSE)
f <- function(h,...) message(h$obj$get_value())

l <- list(file=gaction("file", handler=function(h,...) print("file"),
               key.accel="<Control-x><Control-s>", parent=w),
          ok=gaction("ok", icon="ok", handler=function(h,...) print("ok")),
          radio=list(
            rb=gradio(state.name[1:3], parent=w, handler=function(h,...)
               print(h$obj$get_value()))
            )
          sep=gseparator(vertical=TRUE),
          ,cb=gcheckbox("really", parent=w, handler=function(h,...) print(h$obj$get_value()))
          )
mlist <- list(File=l)
mb <- gmenu(mlist, cont=w)

## End(Not run)