The R Project SVN R

Rev

Rev 68948 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 75092
Line 1... Line 1...
1
% File src/library/utils/man/windows/arrangeWindows.Rd
1
% File src/library/utils/man/arrangeWindows.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 2009-2013 Duncan Murdoch and the R Core Team
3
% Copyright 2009-2018 Duncan Murdoch and the R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{arrangeWindows}
6
\name{arrangeWindows}
7
\alias{arrangeWindows}
7
\alias{arrangeWindows}
8
\title{
-
 
9
Rearrange windows in the R GUI.
8
\title{Rearrange Windows on MS Windows}
10
}
-
 
11
\description{
9
\description{
12
This function allows you to tile or cascade windows, or to minimize or restore them.
10
  This function allows you to tile or cascade windows, or to minimize or
-
 
11
  restore them (on Windows, i.e. when \code{(\link{.Platform}$OS.type == "windows")}).
-
 
12
  This may include windows not \dQuote{belonging} to \R.
13
}
13
}
14
\usage{
14
\usage{
15
arrangeWindows(action, windows, preserve = TRUE, outer = FALSE)
15
arrangeWindows(action, windows, preserve = TRUE, outer = FALSE)
16
}
16
}
17
\arguments{
17
\arguments{
-
 
18
  \item{action}{a character string, the action to perform on the
18
  \item{action}{
19
    windows.  The choices are
19
  The action to perform on the windows.  The choices are \code{c("vertical", "horizontal", "cascade", "minimize", 
20
    \code{c("vertical", "horizontal", "cascade", "minimize", "restore")}
20
    "restore")} with default \code{"vertical"}; see the Details below for the interpretation.
21
    with default \code{"vertical"}; see the \sQuote{Details} for the interpretation.
21
    Abbreviations may be used.
22
    Abbreviations may be used.
22
    }
23
    }
23
  \item{windows}{
24
  \item{windows}{a \code{\link{list}} of window handles, by default
24
  A list of window handles, by default produced by \code{\link{getWindowsHandles}()}.  
25
    produced by \code{\link{getWindowsHandles}()}.}
25
}
-
 
26
  \item{preserve}{
26
  \item{preserve}{If \code{TRUE}, when tiling preserve the outer
27
  If \code{TRUE}, when tiling preserve the outer boundary of the collection of windows; otherwise 
27
    boundary of the collection of windows; otherwise make them as large
28
  make them as large as will fit.
28
    as will fit.}
29
}
-
 
30
  \item{outer}{
-
 
31
  This argument is only used in MDI mode.  If \code{TRUE}, tile the windows on the system
29
  \item{outer}{This argument is only used in MDI mode.  If \code{TRUE},
32
  desktop.  Otherwise, tile them within the MDI frame.
30
    tile the windows on the system desktop.  Otherwise, tile them within
33
}
31
    the MDI frame.}
34
}
32
}
35
\details{
33
\details{
36
The actions are as follows:
34
The actions are as follows:
37
\describe{
35
\describe{
38
\item{\code{"vertical"}}{Tile vertically.}
36
\item{\code{"vertical"}}{Tile vertically.}
Line 40... Line 38...
40
\item{\code{"cascade"}}{Cascade the windows.}
38
\item{\code{"cascade"}}{Cascade the windows.}
41
\item{\code{"minimize"}}{Minimize all of the windows.}
39
\item{\code{"minimize"}}{Minimize all of the windows.}
42
\item{\code{"restore"}}{Restore all of the windows to normal size (not minimized, not maximized).}
40
\item{\code{"restore"}}{Restore all of the windows to normal size (not minimized, not maximized).}
43
}
41
}
44
The tiling and cascading are done by the standard Windows API functions, but unlike those functions,
42
The tiling and cascading are done by the standard Windows API functions, but unlike those functions,
45
they will apply to all of the windows in the \code{windows} list.  
43
they will apply to all of the windows in the \code{windows} list.
46
 
44
 
47
By default, \code{windows} is set to the result of
45
By default, \code{windows} is set to the result of
48
\code{\link{getWindowsHandles}()} (with one exception described
46
\code{\link{getWindowsHandles}()} (with one exception described
49
below).  This will select windows belonging to the current \R process.
47
below).  This will select windows belonging to the current \R process.
50
However, if the global environment contains a variable named
48
However, if the global environment contains a variable named
Line 54... Line 52...
54
 
52
 
55
When \code{action = "restore"} is used with \code{windows} unspecified,
53
When \code{action = "restore"} is used with \code{windows} unspecified,
56
\code{minimized = TRUE} is added to the argument list of
54
\code{minimized = TRUE} is added to the argument list of
57
\code{\link{getWindowsHandles}} so that minimized windows will be restored.
55
\code{\link{getWindowsHandles}} so that minimized windows will be restored.
58
 
56
 
59
In MDI mode, by default tiling and cascading will happen within the R
57
In MDI mode, by default tiling and cascading will happen within the \R
60
GUI frame. However, if \code{outer = TRUE}, tiling is done on the system
58
GUI frame. However, if \code{outer = TRUE}, tiling is done on the system
61
desktop. This will generally not give desirable results if any R child
59
desktop. This will generally not give desirable results if any \R child
62
windows are included within \code{windows}.
60
windows are included within \code{windows}.
63
 
61
 
64
}
62
}
65
 
63
 
66
\note{
64
\note{
67
  This is only available on Windows.
65
  This is only available on Windows.
68
}
66
}
69
 
67
 
70
\value{
68
\value{
71
This function is called for the side effect of arranging the windows.
69
  This function is called for the side effect of arranging the windows.
72
The list of window handles is returned invisibly.
70
  The list of window handles is returned invisibly.
73
}
71
}
74
\author{
72
\author{
75
Duncan Murdoch
73
Duncan Murdoch
76
}
74
}
77
 
-
 
78
\seealso{
75
\seealso{
79
\code{\link{getWindowsHandles}}
76
\code{\link{getWindowsHandles}}
80
}
77
}
81
\examples{
78
\examples{
82
\dontrun{
79
\dontrun{## Only available on Windows :
83
arrangeWindows("v")
80
arrangeWindows("v")
84
# This default is useful only in SDI mode:  it will tile any Firefox window 
81
# This default is useful only in SDI mode:  it will tile any Firefox window
85
# along with the R windows
82
# along with the R windows
86
.arrangeWindowsDefaults <- list(c("R", "all"), pattern = c("", "Firefox"))
83
.arrangeWindowsDefaults <- list(c("R", "all"), pattern = c("", "Firefox"))
87
arrangeWindows("v")
84
arrangeWindows("v")
88
}
85
}
89
}
86
}