Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

traitr (version 0.13)

graphicDeviceItem: A graphic device item.

Description

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

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.

Details

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

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
)
dlg$make_gui()
graphIt(dlg$get_n()) ## initial graphic

Run the code above in your browser using DataLab