The R Project SVN R

Rev

Rev 59039 | Rev 65999 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
42333 ripley 1
% File src/library/grDevices/man/dev.interactive.Rd
2
% Part of the R package, http://www.R-project.org
59039 ripley 3
% Copyright 1995-2007 R Core Team
42333 ripley 4
% Distributed under GPL 2 or later
5
 
57939 hornik 6
\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
7
 
29780 ripley 8
\name{dev.interactive}
56186 murdoch 9
\alias{dev.interactive}
41432 ripley 10
\alias{deviceIsInteractive}
50821 ripley 11
\title{Is the Current Graphics Device Interactive?}
29780 ripley 12
\description{
41432 ripley 13
  Test if the current graphics device (or that which would be opened) is
14
  interactive.
29780 ripley 15
}
16
\usage{
37948 maechler 17
dev.interactive(orNone = FALSE)
41432 ripley 18
 
43679 ripley 19
deviceIsInteractive(name = NULL)
29780 ripley 20
}
37948 maechler 21
\arguments{
22
  \item{orNone}{logical; if \code{TRUE}, the function also returns
23
    \code{TRUE} when \code{\link{.Device} == "null device"} and
41432 ripley 24
    \code{\link{getOption}("device")} is among the known
25
    interactive devices.}
43679 ripley 26
  \item{name}{one or more device names as a character vector,
27
    or \code{NULL} to give the existing list.}
37948 maechler 28
}
29780 ripley 29
\details{
30
  The \code{X11} (Unix), \code{windows} (Windows) and \code{quartz}
62602 ripley 31
  (OS X, on-screen types only) are regarded as interactive, together
44817 ripley 32
  with \code{JavaGD} (from the package of the same name) and
57939 hornik 33
  \code{CairoWin} and \code{CairoX11} (from package \CRANpkg{Cairo}).
44817 ripley 34
  Packages can add their devices to the list by calling
35
  \code{deviceIsInteractive}.
29780 ripley 36
}
41659 ripley 37
\value{
38
  \code{dev.interactive()} returns a logical, \code{TRUE} if and only if an
39
  interactive (screen) device is in use.
40
 
41
  \code{deviceIsInteractive} returns the updated list of known
43679 ripley 42
  interactive devices, invisibly unless \code{name = NULL}.
41659 ripley 43
}
29780 ripley 44
\seealso{
45
  \code{\link{Devices}} for the available devices on your platform.
46
}
37960 maechler 47
\examples{
41659 ripley 48
dev.interactive()
49
print(deviceIsInteractive(NULL))
37960 maechler 50
}
29780 ripley 51
\keyword{device}