[Rd] Qt device update

Simon Urbanek simon.urbanek at r-project.org
Fri May 4 20:09:44 CEST 2007

On May 3, 2007, at 8:52 PM, Deepayan Sarkar wrote:

> [...] I have a couple of related questions. First, dev.interactive 
> (), used in example() and many demo()-s to decide if the current  
> device is interactive, is currently implemented as:
>> dev.interactive
> function (orNone = FALSE)
> {
>     iDevs <- c("X11", "GTK", "gnome", "quartz", "windows", "JavaGD")
>     interactive() && (.Device %in% iDevs || (orNone && .Device ==
>         "null device" && getOption("device") %in% iDevs))
> }
> This makes it impossible for new devices to be treated as interactive.

I think we should finally pass this question to the device itself.  
For some devices like Cairo the answer depends on the parameters with  
which the device was created (e.g. type='x11' is interactive whereas  
type='png' is not), so each instance of the device will answer  
differently. We could simply add an another capability flag - that is  
IMHO the only reliable solution. Any other ideas?


More information about the R-devel mailing list