Learn R Programming

traitr (version 0.14)

graphicDeviceItem: A graphic device item. (Only with RGtk2 and cairoDevice!)

Description

This device will become the current one if the mouse clicks in the window, This isn't perfect, but should be easy enough to get used to. This only works with gWidgetsRGtk2, gWidgetsQt

Usage

graphicDeviceItem(value = "", name, label = name, help = "", tooltip = "", attr = list(size = c(480, 480)), model, editor, ...)

Arguments

value
ingored
name
Required name for object. Names should be unique within a group of items
label
Optional label, default value is the name
help
Optional help string
tooltip
Optional tooltip to display
attr
A list of attributes to pass to widget on construction. Eg. attr=list(size=c(100,200)).
model
ignored
editor
ignored
...
Passed to parent proto object during call to proto

Value

A proto object. Call obj$show_help() to view its methods and properties.

See Also

Item

Examples

Run this code
graphIt <- function(n, ...) hist(rnorm(n))
dlg <- aDialog(items=list(n=integerItem(10), out=graphicDeviceItem()),
model_value_changed=function(.) do.call("graphIt", .$to_R()) ## ... allows out to pass in unnoticed
)
## Not run: dlg$make_gui()
# graphIt(dlg$get_n()) ## initial graphic
# ## End(Not run)

Run the code above in your browser using DataLab