gaction {gWidgetsWWW2} | R Documentation |
actions are reusable encapsulations of actions. The
svalue<-
method can be used to update the text associated
with an action. Use enabled<-
to adjust sensitivity to
mouse events. The visible<-
method can adjust if objects
proxying the action are visible. The set_icon
reference
class method can be used to set the icon (no S3 method)
gaction(label, tooltip = label, icon = NULL, key.accel = NULL, handler, parent, ...)
label |
Text for action |
tooltip |
tooltip. Ignored for this toolkit |
icon |
action icon class |
key.accel |
keyboard accelerator. Single key, e.g. "X",
"LEFT" (arrow), "PAGE_UP", "Ctrl-n", "Alt-X". Use "Shift" to force
that. List of key events is given here:
|
handler |
function called when action is invoked |
parent |
toplevel window of action (where it can be called). Required here |
... |
ignored |
See the method add_keybinding
to add a simple keybinding to
initiate this action.
a GWidget
object
w <- gwindow() a <- gaction("some action", handler=function(h,...) galert("asdf", parent=w), parent=w) b <- gbutton(action=a, cont=w) enabled(a) <- FALSE svalue(a) <- "new text" #