OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tk/] [doc/] [winfo.n] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1990-1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: winfo.n,v 1.1.1.1 2002-01-16 10:25:50 markom Exp $
9
'\"
10
.so man.macros
11
.TH winfo n 4.3 Tk "Tk Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
winfo \- Return window-related information
16
.SH SYNOPSIS
17
\fBwinfo\fR \fIoption \fR?\fIarg arg ...\fR?
18
.BE
19
 
20
.SH DESCRIPTION
21
.PP
22
The \fBwinfo\fR command is used to retrieve information about windows
23
managed by Tk.  It can take any of a number of different forms,
24
depending on the \fIoption\fR argument.  The legal forms are:
25
.TP
26
\fBwinfo atom \fR?\fB\-displayof \fIwindow\fR? \fIname\fR
27
Returns a decimal string giving the integer identifier for the
28
atom whose name is \fIname\fR.  If no atom exists with the name
29
\fIname\fR then a new one is created.
30
If the \fB\-displayof\fR option is given then the atom is looked
31
up on the display of \fIwindow\fR;  otherwise it is looked up on
32
the display of the application's main window.
33
.TP
34
\fBwinfo atomname \fR?\fB\-displayof \fIwindow\fR? \fIid\fR
35
Returns the textual name for the atom whose integer identifier is
36
\fIid\fR.
37
If the \fB\-displayof\fR option is given then the identifier is looked
38
up on the display of \fIwindow\fR;  otherwise it is looked up on
39
the display of the application's main window.
40
This command is the inverse of the \fBwinfo atom\fR command.
41
It generates an error if no such atom exists.
42
.TP
43
\fBwinfo cells \fIwindow\fR
44
Returns a decimal string giving the number of cells in the
45
color map for \fIwindow\fR.
46
.TP
47
\fBwinfo children \fIwindow\fR
48
Returns a list containing the path names of all the children
49
of \fIwindow\fR.  The list is in stacking order, with the lowest
50
window first.  Top-level windows are returned as children
51
of their logical parents.
52
.TP
53
\fBwinfo class \fIwindow\fR
54
Returns the class name for \fIwindow\fR.
55
.TP
56
\fBwinfo colormapfull \fIwindow\fR
57
Returns 1 if the colormap for \fIwindow\fR is known to be full, 0
58
otherwise.  The colormap for a window is ``known'' to be full if the last
59
attempt to allocate a new color on that window failed and this
60
application hasn't freed any colors in the colormap since the
61
failed allocation.
62
.TP
63
\fBwinfo containing \fR?\fB\-displayof \fIwindow\fR? \fIrootX rootY\fR
64
Returns the path name for the window containing the point given
65
by \fIrootX\fR and \fIrootY\fR.
66
\fIRootX\fR and \fIrootY\fR are specified in screen units (i.e.
67
any form acceptable to \fBTk_GetPixels\fR) in the coordinate
68
system of the root window (if a virtual-root window manager is in
69
use then the coordinate system of the virtual root window is used).
70
If the \fB\-displayof\fR option is given then the coordinates refer
71
to the screen containing \fIwindow\fR;  otherwise they refer to the
72
screen of the application's main window.
73
If no window in this application contains the point then an empty
74
string is returned.
75
In selecting the containing window, children are given higher priority
76
than parents and among siblings the highest one in the stacking order is
77
chosen.
78
.TP
79
\fBwinfo depth \fIwindow\fR
80
Returns a decimal string giving the depth of \fIwindow\fR (number
81
of bits per pixel).
82
.TP
83
\fBwinfo exists \fIwindow\fR
84
Returns 1 if there exists a window named \fIwindow\fR, 0 if no such
85
window exists.
86
.TP
87
\fBwinfo fpixels \fIwindow\fR \fInumber\fR
88
Returns a floating-point value giving the number of pixels
89
in \fIwindow\fR corresponding to the distance given by \fInumber\fR.
90
\fINumber\fR may be specified in any of the forms acceptable
91
to \fBTk_GetScreenMM\fR, such as ``2.0c'' or ``1i''.
92
The return value may be fractional;  for an integer value, use
93
\fBwinfo pixels\fR.
94
.TP
95
\fBwinfo geometry \fIwindow\fR
96
Returns the geometry for \fIwindow\fR, in the form
97
\fIwidth\fBx\fIheight\fB+\fIx\fB+\fIy\fR.  All dimensions are
98
in pixels.
99
.TP
100
\fBwinfo height \fIwindow\fR
101
Returns a decimal string giving \fIwindow\fR's height in pixels.
102
When a window is first created its height will be 1 pixel;  the
103
height will eventually be changed by a geometry manager to fulfill
104
the window's needs.
105
If you need the true height immediately after creating a widget,
106
invoke \fBupdate\fR to force the geometry manager to arrange it,
107
or use \fBwinfo reqheight\fR to get the window's requested height
108
instead of its actual height.
109
.TP
110
\fBwinfo id \fIwindow\fR
111
.VS
112
Returns a hexadecimal string giving a low-level platform-specific
113
identifier for \fIwindow\fR.  On Unix platforms, this is the X
114
window identifier.  Under Windows, this is the Windows
115
HWND.  On the Macintosh the value has no meaning outside Tk.
116
.VE
117
.TP
118
\fBwinfo interps \fR?\fB\-displayof \fIwindow\fR?
119
Returns a list whose members are the names of all Tcl interpreters
120
(e.g. all Tk-based applications) currently registered for a particular display.
121
If the \fB\-displayof\fR option is given then the return value refers
122
to the display of \fIwindow\fR;  otherwise it refers to
123
the display of the application's main window.
124
.TP
125
\fBwinfo ismapped \fIwindow\fR
126
Returns \fB1\fR if \fIwindow\fR is currently mapped, \fB0\fR otherwise.
127
.TP
128
\fBwinfo manager \fIwindow\fR
129
Returns the name of the geometry manager currently
130
responsible for \fIwindow\fR, or an empty string if \fIwindow\fR
131
isn't managed by any geometry manager.
132
The name is usually the name of the Tcl command for the geometry
133
manager, such as \fBpack\fR or \fBplace\fR.
134
If the geometry manager is a widget, such as canvases or text, the
135
name is the widget's class command, such as \fBcanvas\fR.
136
.TP
137
\fBwinfo name \fIwindow\fR
138
Returns \fIwindow\fR's name (i.e. its name within its parent, as opposed
139
to its full path name).
140
The command \fBwinfo name .\fR will return the name of the application.
141
.TP
142
\fBwinfo parent \fIwindow\fR
143
Returns the path name of \fIwindow\fR's parent, or an empty string
144
if \fIwindow\fR is the main window of the application.
145
.TP
146
\fBwinfo pathname \fR?\fB\-displayof \fIwindow\fR? \fIid\fR
147
Returns the path name of the window whose X identifier is \fIid\fR.
148
\fIId\fR must be a decimal, hexadecimal, or octal integer and must
149
correspond to a window in the invoking application.
150
If the \fB\-displayof\fR option is given then the identifier is looked
151
up on the display of \fIwindow\fR;  otherwise it is looked up on
152
the display of the application's main window.
153
.TP
154
\fBwinfo pixels \fIwindow\fR \fInumber\fR
155
Returns the number of pixels in \fIwindow\fR corresponding
156
to the distance given by \fInumber\fR.
157
\fINumber\fR may be specified in any of the forms acceptable
158
to \fBTk_GetPixels\fR, such as ``2.0c'' or ``1i''.
159
The result is rounded to the nearest integer value;  for a
160
fractional result, use \fBwinfo fpixels\fR.
161
.TP
162
\fBwinfo pointerx \fIwindow\fR
163
If the mouse pointer is on the same screen as \fIwindow\fR, returns the
164
pointer's x coordinate, measured in pixels in the screen's root window.
165
If a virtual root window is in use on the screen, the position is
166
measured in the virtual root.
167
If the mouse pointer isn't on the same screen as \fIwindow\fR then
168
-1 is returned.
169
.TP
170
\fBwinfo pointerxy \fIwindow\fR
171
If the mouse pointer is on the same screen as \fIwindow\fR, returns a list
172
with two elements, which are the pointer's x and y coordinates measured
173
in pixels in the screen's root window.
174
If a virtual root window is in use on the screen, the position
175
is computed in the virtual root.
176
If the mouse pointer isn't on the same screen as \fIwindow\fR then
177
both of the returned coordinates are -1.
178
.TP
179
\fBwinfo pointery \fIwindow\fR
180
If the mouse pointer is on the same screen as \fIwindow\fR, returns the
181
pointer's y coordinate, measured in pixels in the screen's root window.
182
If a virtual root window is in use on the screen, the position
183
is computed in the virtual root.
184
If the mouse pointer isn't on the same screen as \fIwindow\fR then
185
-1 is returned.
186
.TP
187
\fBwinfo reqheight \fIwindow\fR
188
Returns a decimal string giving \fIwindow\fR's requested height,
189
in pixels.  This is the value used by \fIwindow\fR's geometry
190
manager to compute its geometry.
191
.TP
192
\fBwinfo reqwidth \fIwindow\fR
193
Returns a decimal string giving \fIwindow\fR's requested width,
194
in pixels.  This is the value used by \fIwindow\fR's geometry
195
manager to compute its geometry.
196
.TP
197
\fBwinfo rgb \fIwindow color\fR
198
Returns a list containing three decimal values, which are the
199
red, green, and blue intensities that correspond to \fIcolor\fR in
200
the window given by \fIwindow\fR.  \fIColor\fR
201
may be specified in any of the forms acceptable for a color
202
option.
203
.TP
204
\fBwinfo rootx \fIwindow\fR
205
Returns a decimal string giving the x-coordinate, in the root
206
window of the screen, of the
207
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
208
has no border).
209
.TP
210
\fBwinfo rooty \fIwindow\fR
211
Returns a decimal string giving the y-coordinate, in the root
212
window of the screen, of the
213
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
214
has no border).
215
.TP
216
\fBwinfo screen \fIwindow\fR
217
Returns the name of the screen associated with \fIwindow\fR, in
218
the form \fIdisplayName\fR.\fIscreenIndex\fR.
219
.TP
220
\fBwinfo screencells \fIwindow\fR
221
Returns a decimal string giving the number of cells in the default
222
color map for \fIwindow\fR's screen.
223
.TP
224
\fBwinfo screendepth \fIwindow\fR
225
Returns a decimal string giving the depth of the root window
226
of \fIwindow\fR's screen (number of bits per pixel).
227
.TP
228
\fBwinfo screenheight \fIwindow\fR
229
Returns a decimal string giving the height of \fIwindow\fR's screen,
230
in pixels.
231
.TP
232
\fBwinfo screenmmheight \fIwindow\fR
233
Returns a decimal string giving the height of \fIwindow\fR's screen,
234
in millimeters.
235
.TP
236
\fBwinfo screenmmwidth \fIwindow\fR
237
Returns a decimal string giving the width of \fIwindow\fR's screen,
238
in millimeters.
239
.TP
240
\fBwinfo screenvisual \fIwindow\fR
241
Returns one of the following strings to indicate the default visual
242
class for \fIwindow\fR's screen: \fBdirectcolor\fR, \fBgrayscale\fR,
243
\fBpseudocolor\fR, \fBstaticcolor\fR, \fBstaticgray\fR, or
244
\fBtruecolor\fR.
245
.TP
246
\fBwinfo screenwidth \fIwindow\fR
247
Returns a decimal string giving the width of \fIwindow\fR's screen,
248
in pixels.
249
.TP
250
\fBwinfo server \fIwindow\fR
251
Returns a string containing information about the server for
252
\fIwindow\fR's display.  The exact format of this string may vary
253
from platform to platform.  For X servers the string
254
has the form ``\fBX\fImajor\fBR\fIminor vendor vendorVersion\fR''
255
where \fImajor\fR and \fIminor\fR are the version and revision
256
numbers provided by the server (e.g., \fBX11R5\fR), \fIvendor\fR
257
is the name of the vendor for the server, and \fIvendorRelease\fR
258
is an integer release number provided by the server.
259
.TP
260
\fBwinfo toplevel \fIwindow\fR
261
Returns the path name of the top-level window containing \fIwindow\fR.
262
.TP
263
\fBwinfo viewable \fIwindow\fR
264
Returns 1 if \fIwindow\fR and all of its ancestors up through the
265
nearest toplevel window are mapped.  Returns 0 if any of these
266
windows are not mapped.
267
.TP
268
\fBwinfo visual \fIwindow\fR
269
Returns one of the following strings to indicate the visual
270
class for \fIwindow\fR: \fBdirectcolor\fR, \fBgrayscale\fR,
271
\fBpseudocolor\fR, \fBstaticcolor\fR, \fBstaticgray\fR, or
272
\fBtruecolor\fR.
273
.TP
274
\fBwinfo visualid \fIwindow\fR
275
Returns the X identifier for the visual for \fIwindow\fR.
276
.TP
277
\fBwinfo visualsavailable \fIwindow\fR ?\fBincludeids\fR?
278
Returns a list whose elements describe the visuals available for
279
\fIwindow\fR's screen.
280
Each element consists of a visual class followed by an integer depth.
281
The class has the same form as returned by \fBwinfo visual\fR.
282
The depth gives the number of bits per pixel in the visual.
283
In addition, if the \fBincludeids\fR argument is provided, then the
284
depth is followed by the X identifier for the visual.
285
.TP
286
\fBwinfo vrootheight \fIwindow\fR
287
Returns the height of the virtual root window associated with \fIwindow\fR
288
if there is one;  otherwise returns the height of \fIwindow\fR's screen.
289
.TP
290
\fBwinfo vrootwidth \fIwindow\fR
291
Returns the width of the virtual root window associated with \fIwindow\fR
292
if there is one;  otherwise returns the width of \fIwindow\fR's screen.
293
.TP
294
\fBwinfo vrootx \fIwindow\fR
295
Returns the x-offset of the virtual root window associated with \fIwindow\fR,
296
relative to the root window of its screen.
297
This is normally either zero or negative.
298
Returns 0 if there is no virtual root window for \fIwindow\fR.
299
.TP
300
\fBwinfo vrooty \fIwindow\fR
301
Returns the y-offset of the virtual root window associated with \fIwindow\fR,
302
relative to the root window of its screen.
303
This is normally either zero or negative.
304
Returns 0 if there is no virtual root window for \fIwindow\fR.
305
.TP
306
\fBwinfo width \fIwindow\fR
307
Returns a decimal string giving \fIwindow\fR's width in pixels.
308
When a window is first created its width will be 1 pixel;  the
309
width will eventually be changed by a geometry manager to fulfill
310
the window's needs.
311
If you need the true width immediately after creating a widget,
312
invoke \fBupdate\fR to force the geometry manager to arrange it,
313
or use \fBwinfo reqwidth\fR to get the window's requested width
314
instead of its actual width.
315
.TP
316
\fBwinfo x \fIwindow\fR
317
Returns a decimal string giving the x-coordinate, in \fIwindow\fR's
318
parent, of the
319
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
320
has no border).
321
.TP
322
\fBwinfo y \fIwindow\fR
323
Returns a decimal string giving the y-coordinate, in \fIwindow\fR's
324
parent, of the
325
upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
326
has no border).
327
 
328
.SH KEYWORDS
329
atom, children, class, geometry, height, identifier, information, interpreters,
330
mapped, parent, path name, screen, virtual root, width, window

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.