The R Project SVN R

Rev

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