1% File src/library/tcltk/man/TkCommands.Rd
2% Part of the R package, https://www.R-project.org
3% Copyright 1995-2007 R Core Team
4% Distributed under GPL 2 or later
5
6\name{TkCommands}
7\alias{TkCommands}
8\alias{tcl}
9\alias{tktitle}
10\alias{tktitle<-}
11\alias{tkbell}
12\alias{tkbind}
13\alias{tkbindtags}
14\alias{tkfocus}
15\alias{tklower}
16\alias{tkraise}
17\alias{tkclipboard.append}
18\alias{tkclipboard.clear}
19\alias{tkevent.add}
20\alias{tkevent.delete}
21\alias{tkevent.generate}
22\alias{tkevent.info}
23\alias{tkfont.actual}
24\alias{tkfont.configure}
25\alias{tkfont.create}
26\alias{tkfont.delete}
27\alias{tkfont.families}
28\alias{tkfont.measure}
29\alias{tkfont.metrics}
30\alias{tkfont.names}
31\alias{tkgrab}
32\alias{tkgrab.current}
33\alias{tkgrab.release}
34\alias{tkgrab.set}
35\alias{tkgrab.status}
36\alias{tkimage.create}
37\alias{tkimage.delete}
38\alias{tkimage.height}
39\alias{tkimage.inuse}
40\alias{tkimage.names}
41\alias{tkimage.type}
42\alias{tkimage.types}
43\alias{tkimage.width}
44\alias{tkXselection.clear}
45\alias{tkXselection.get}
46\alias{tkXselection.handle}
47\alias{tkXselection.own}
48\alias{tkwait.variable}
49\alias{tkwait.visibility}
50\alias{tkwait.window}
51\alias{tkwinfo}
52\alias{tkwm.aspect}
53\alias{tkwm.client}
54\alias{tkwm.colormapwindows}
55\alias{tkwm.command}
56\alias{tkwm.deiconify}
57\alias{tkwm.focusmodel}
58\alias{tkwm.frame}
59\alias{tkwm.geometry}
60\alias{tkwm.grid}
61\alias{tkwm.group}
62\alias{tkwm.iconbitmap}
63\alias{tkwm.iconify}
64\alias{tkwm.iconmask}
65\alias{tkwm.iconname}
66\alias{tkwm.iconposition}
67\alias{tkwm.iconwindow}
68\alias{tkwm.maxsize}
69\alias{tkwm.minsize}
70\alias{tkwm.overrideredirect}
71\alias{tkwm.positionfrom}
72\alias{tkwm.protocol}
73\alias{tkwm.resizable}
74\alias{tkwm.sizefrom}
75\alias{tkwm.state}
76\alias{tkwm.title}
77\alias{tkwm.transient}
78\alias{tkwm.withdraw}
79\alias{tkgrid}
80\alias{tkgrid.bbox}
81\alias{tkgrid.columnconfigure}
82\alias{tkgrid.configure}
83\alias{tkgrid.forget}
84\alias{tkgrid.info}
85\alias{tkgrid.location}
86\alias{tkgrid.propagate}
87\alias{tkgrid.rowconfigure}
88\alias{tkgrid.remove}
89\alias{tkgrid.size}
90\alias{tkgrid.slaves}
91\alias{tkpack}
92\alias{tkpack.configure}
93\alias{tkpack.forget}
94\alias{tkpack.info}
95\alias{tkpack.propagate}
96\alias{tkpack.slaves}
97\alias{tkplace}
98\alias{tkplace.configure}
99\alias{tkplace.forget}
100\alias{tkplace.info}
101\alias{tkplace.slaves}
102\alias{tkgetOpenFile}
103\alias{tkgetSaveFile}
104\alias{tkchooseDirectory}
105\alias{tkmessageBox}
106\alias{tkdialog}
107\alias{tkpopup}
108\alias{tclfile.tail}
109\alias{tclfile.dir}
110\alias{tclopen}
111\alias{tclclose}
112\alias{tclputs}
113\alias{tclread}
114
115\title{Tk non-widget commands}
116\description{
117  These functions interface to Tk non-widget commands, such as the
118  window manager interface commands and the geometry managers.
119}
120\usage{
121tcl(...)
122tktitle(x)
123
124tktitle(x) <- value
125
126tkbell(...)
127tkbind(...)
128tkbindtags(...)
129tkfocus(...)
130tklower(...)
131tkraise(...)
132
133tkclipboard.append(...)
134tkclipboard.clear(...)
135
136tkevent.add(...)
137tkevent.delete(...)
138tkevent.generate(...)
139tkevent.info(...)
140
141tkfont.actual(...)
142tkfont.configure(...)
143tkfont.create(...)
144tkfont.delete(...)
145tkfont.families(...)
146tkfont.measure(...)
147tkfont.metrics(...)
148tkfont.names(...)
149
150tkgrab(...)
151tkgrab.current(...)
152tkgrab.release(...)
153tkgrab.set(...)
154tkgrab.status(...)
155
156tkimage.create(...)
157tkimage.delete(...)
158tkimage.height(...)
159tkimage.inuse(...)
160tkimage.names(...)
161tkimage.type(...)
162tkimage.types(...)
163tkimage.width(...)
164
165## NB: some widgets also have a selection.clear command,
166## hence the "X".
167
168tkXselection.clear(...)
169tkXselection.get(...)
170tkXselection.handle(...)
171tkXselection.own(...)
172
173tkwait.variable(...)
174tkwait.visibility(...)
175tkwait.window(...)
176
177## winfo actually has a large number of subcommands,
178## but it's rarely used,
179## so use tkwinfo("atom", ...) etc. instead.
180
181tkwinfo(...)
182
183# Window manager interface
184
185tkwm.aspect(...)
186tkwm.client(...)
187tkwm.colormapwindows(...)
188tkwm.command(...)
189tkwm.deiconify(...)
190tkwm.focusmodel(...)
191tkwm.frame(...)
192tkwm.geometry(...)
193tkwm.grid(...)
194tkwm.group(...)
195tkwm.iconbitmap(...)
196tkwm.iconify(...)
197tkwm.iconmask(...)
198tkwm.iconname(...)
199tkwm.iconposition(...)
200tkwm.iconwindow(...)
201tkwm.maxsize(...)
202tkwm.minsize(...)
203tkwm.overrideredirect(...)
204tkwm.positionfrom(...)
205tkwm.protocol(...)
206tkwm.resizable(...)
207tkwm.sizefrom(...)
208tkwm.state(...)
209tkwm.title(...)
210tkwm.transient(...)
211tkwm.withdraw(...)
212
213
214### Geometry managers
215
216tkgrid(...)
217tkgrid.bbox(...)
218tkgrid.columnconfigure(...)
219tkgrid.configure(...)
220tkgrid.forget(...)
221tkgrid.info(...)
222tkgrid.location(...)
223tkgrid.propagate(...)
224tkgrid.rowconfigure(...)
225tkgrid.remove(...)
226tkgrid.size(...)
227tkgrid.slaves(...)
228
229tkpack(...)
230tkpack.configure(...)
231tkpack.forget(...)
232tkpack.info(...)
233tkpack.propagate(...)
234tkpack.slaves(...)
235
236tkplace(...)
237tkplace.configure(...)
238tkplace.forget(...)
239tkplace.info(...)
240tkplace.slaves(...)
241
242## Standard dialogs
243tkgetOpenFile(...)
244tkgetSaveFile(...)
245tkchooseDirectory(...)
246tkmessageBox(...)
247tkdialog(...)
248tkpopup(...)
249
250
251## File handling functions
252tclfile.tail(...)
253tclfile.dir(...)
254tclopen(...)
255tclclose(...)
256tclputs(...)
257tclread(...)
258}
259\arguments{
260  \item{x}{A window object}
261  \item{value}{For \code{tktitle} assignments, a character string.}
262  \item{\dots}{Handled via \code{.Tcl.args}}
263}
264\details{
265
266  \code{tcl} provides a generic interface to calling any Tk or Tcl
267  command by simply running \code{.Tcl.args.objv} on the argument list
268  and passing the
269  result to \code{.Tcl.objv}.  Most of the other commands simply call
270  \code{tcl} with a particular
271  first argument and sometimes also a second argument giving the
272  subcommand.
273
274  \code{tktitle} and its assignment form provides an alternate interface
275  to Tk's \code{wm title}
276
277  There are far too many of these commands to describe them and their
278  arguments in full.  Please refer to the Tcl/Tk documentation for details.
279  With a few exceptions, the pattern is that Tk subcommands like
280  \code{pack configure} are converted to function names like
281  \code{tkpack.configure}, and Tcl subcommands are like
282  \code{tclfile.dir}.
283}
284\seealso{\code{\link{TclInterface}}, \code{\link{TkWidgets}},
285  \code{\link{TkWidgetcmds}}}
286
287\examples{
288\dontrun{
289## These cannot be run by examples() but should be OK when pasted
290## into an interactive R session with the tcltk package loaded
291
292tt <- tktoplevel()
293tkpack(l1 <- tklabel(tt, text = "Heave"), l2 <- tklabel(tt, text = "Ho"))
294tkpack.configure(l1, side = "left")
295
296## Try stretching the window and then
297
298tkdestroy(tt)
299}
300
301}
302\keyword{misc}
303