The R Project SVN R

Rev

Rev 68948 | Rev 85981 | Go to most recent revision | 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/setWindowTitle.Rd
1
% File src/library/utils/man/setWindowTitle.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 1995-2007 R Core Team
3
% Copyright 1995-2018 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{setWindowTitle}
6
\name{setWindowTitle}
7
\alias{setWindowTitle}
7
\alias{setWindowTitle}
8
\alias{getWindowTitle}
8
\alias{getWindowTitle}
9
\alias{getIdentification}
9
\alias{getIdentification}
10
\alias{setStatusBar}
10
\alias{setStatusBar}
11
\title{Set or get the Window Title, or Set the Statusbar}
11
\title{Set the Window Title or the Statusbar of the RGui in Windows}
12
\description{
12
\description{
13
  Set the title of the R window which will appear in the task bar, or of
13
  Set or get the title of the \R (i.e. \command{RGui}) window  which
14
  the statusbar (if in use).
14
  will appear in the task bar, or set the statusbar (if in use).
15
}
15
}
16
\usage{
16
\usage{
17
setWindowTitle(suffix, title = paste(getIdentification(), suffix))
17
setWindowTitle(suffix, title = paste(getIdentification(), suffix))
18
 
18
 
19
getWindowTitle()
19
getWindowTitle()
Line 28... Line 28...
28
  \item{text}{a character string of up to 255 characters, to be
28
  \item{text}{a character string of up to 255 characters, to be
29
    displayed in the status bar.}
29
    displayed in the status bar.}
30
}
30
}
31
\details{
31
\details{
32
  \code{setWindowTitle} appends \code{suffix} to the normal window
32
  \code{setWindowTitle} appends \code{suffix} to the normal window
33
  identification (\code{RGui}, \code{R Console} or \code{Rterm}).  Use
33
  identification (\command{RGui}, \command{R Console} or
-
 
34
  \command{Rterm}).  Use
34
  \code{suffix = ""} to reset the title.
35
  \code{suffix = ""} to reset the title.
35
 
36
 
36
  \code{getWindowTitle} gets the current title.
37
  \code{getWindowTitle} gets the current title.
37
 
38
 
38
  This sets the title of the frame in MDI mode, the title of the console
39
  This sets the title of the frame in MDI mode, the title of the console
Line 52... Line 53...
52
 
53
 
53
  \code{getWindowTitle} and \code{getIdentification} return the current
54
  \code{getWindowTitle} and \code{getIdentification} return the current
54
  window title and the normal window identification, respectively.
55
  window title and the normal window identification, respectively.
55
}
56
}
56
\note{
57
\note{
57
  This is only available on Windows.
58
  These functions are only available on Windows and only make sense when
-
 
59
  using the \command{Rgui}.  E.g., in \command{Rterm} (and hence in \command{ESS})
-
 
60
  the title is not visible (but can be set and gotten), and in a version of
-
 
61
  \command{RStudio} it has been \code{""}, invariably.
58
}
62
}
59
\examples{
63
\examples{
-
 
64
if(.Platform$OS.type == "windows") withAutoprint({
60
## show the current working directory in the title, saving the old one
65
## show the current working directory in the title, saving the old one
61
oldtitle <- setWindowTitle(getwd())
66
oldtitle <- setWindowTitle(getwd())
62
Sys.sleep(0.5)
67
Sys.sleep(0.5)
63
## reset the title
68
## reset the title
64
setWindowTitle("")
69
setWindowTitle("")
65
Sys.sleep(0.5)
70
Sys.sleep(0.5)
66
## restore the original title
71
## restore the original title
67
setWindowTitle(title = oldtitle)
72
setWindowTitle(title = oldtitle)
-
 
73
})% Windows-only
68
}
74
}
69
\keyword{utilities}
75
\keyword{utilities}