From simon.urbanek at r-project.org  Fri May  4 20:09:44 2007
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Fri, 4 May 2007 14:09:44 -0400
Subject: [Rd] Qt device update
In-Reply-To: <eb555e660705031752p5a96153fifaabd0d5fdf0bdeb@mail.gmail.com>
References: <eb555e660705031752p5a96153fifaabd0d5fdf0bdeb@mail.gmail.com>
Message-ID: <7B29DCD1-E483-482B-8CCE-526305FE2E9F@r-project.org>


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?

Cheers,
Simon



[Rd] Qt device update
Simon Urbanek