gaction: gaction implementation

Description Usage Arguments Details Value Examples

View source: R/gaction.R

Description

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)

Usage

1
2
gaction(label, tooltip = label, icon = NULL, key.accel = NULL, handler,
  parent, ...)

Arguments

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: http://docs.sencha.com/ext-js/4-1/#!/api/Ext.EventObject.

handler

function called when action is invoked

parent

toplevel window of action (where it can be called). Required here

...

ignored

Details

See the method add_keybinding to add a simple keybinding to initiate this action.

Value

a GWidget object

Examples

1
2
3
4
5
6
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"
#

gWidgetsWWW2 documentation built on May 2, 2019, 6:10 p.m.