]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/winfo.n
Ck console graphics toolkit
[oss/ck.git] / doc / winfo.n
1 '\"
2 '\" Copyright (c) 1990-1994 The Regents of the University of California.
3 '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
4 '\" Copyright (c) 1996-1999 Christian Werner
5 '\"
6 '\" See the file "license.terms" for information on usage and redistribution
7 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 '\" 
9 .so man.macros
10 .TH winfo n 8.0 Ck "Ck Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 winfo \- Return window-related information
15 .SH SYNOPSIS
16 \fBwinfo\fR \fIoption \fR?\fIarg arg ...\fR?
17 .BE
18
19 .SH DESCRIPTION
20 .PP
21 The \fBwinfo\fR command is used to retrieve information about windows
22 managed by Ck.  It can take any of a number of different forms,
23 depending on the \fIoption\fR argument.  The legal forms are:
24 .TP
25 \fBwinfo children \fIwindow\fR
26 Returns a list containing the path names of all the children
27 of \fIwindow\fR.  Top-level windows are returned as children
28 of their logical parents.
29 .TP
30 \fBwinfo class \fIwindow\fR
31 Returns the class name for \fIwindow\fR.
32 .TP
33 \fBwinfo containing \fIrootX rootY\fR
34 Returns the path name for the window containing the point given
35 by \fIrootX\fR and \fIrootY\fR.
36 \fIRootX\fR and \fIrootY\fR are specified as cursor position
37 in the coordinate system of the terminal.
38 If no window in this application contains the point then an empty
39 string is returned.
40 In selecting the containing window, children are given higher priority
41 than parents and among siblings the highest one in the stacking order is
42 chosen.
43 .TP
44 \fBwinfo depth \fIwindow\fR
45 Returns a decimal string giving the depth of \fIwindow\fR. 1 means the
46 terminal's screen is monochrome. Any number higher than 1 means that
47 the terminal supports colors.
48 .TP
49 \fBwinfo exists \fIwindow\fR
50 Returns 1 if there exists a window named \fIwindow\fR, 0 if no such
51 window exists.
52 .TP
53 \fBwinfo geometry \fIwindow\fR
54 Returns the geometry for \fIwindow\fR, in the form
55 \fIwidth\fBx\fIheight\fB+\fIx\fB+\fIy\fR.  All dimensions are
56 in terminal coordinates.
57 .TP
58 \fBwinfo height \fIwindow\fR
59 Returns a decimal string giving \fIwindow\fR's height in terminal lines.
60 When a window is first created its height will be 1;  the
61 height will eventually be changed by a geometry manager to fulfill
62 the window's needs.
63 If you need the true height immediately after creating a widget,
64 invoke \fBupdate\fR to force the geometry manager to arrange it,
65 or use \fBwinfo reqheight\fR to get the window's requested height
66 instead of its actual height.
67 .TP
68 \fBwinfo ismapped \fIwindow\fR
69 Returns \fB1\fR if \fIwindow\fR is currently mapped, \fB0\fR otherwise.
70 .TP
71 \fBwinfo manager \fIwindow\fR
72 Returns the name of the geometry manager currently
73 responsible for \fIwindow\fR, or an empty string if \fIwindow\fR
74 isn't managed by any geometry manager.
75 The name is usually the name of the Tcl command for the geometry
76 manager, such as \fBpack\fR or \fBplace\fR.
77 .TP
78 \fBwinfo name \fIwindow\fR
79 Returns \fIwindow\fR's name (i.e. its name within its parent, as opposed
80 to its full path name).
81 The command \fBwinfo name .\fR will return the name of the application.
82 .TP
83 \fBwinfo parent \fIwindow\fR
84 Returns the path name of \fIwindow\fR's parent, or an empty string
85 if \fIwindow\fR is the main window of the application.
86 .TP
87 \fBwinfo reqheight \fIwindow\fR
88 Returns a decimal string giving \fIwindow\fR's requested height,
89 in lines.  This is the value used by \fIwindow\fR's geometry
90 manager to compute its geometry.
91 .TP
92 \fBwinfo reqwidth \fIwindow\fR
93 Returns a decimal string giving \fIwindow\fR's requested width,
94 in columns.  This is the value used by \fIwindow\fR's geometry
95 manager to compute its geometry.
96 .TP
97 \fBwinfo rootx \fIwindow\fR
98 Returns a decimal string giving the x-coordinate, in the root
99 window of the screen, of the
100 upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
101 has no border).
102 .TP
103 \fBwinfo rooty \fIwindow\fR
104 Returns a decimal string giving the y-coordinate, in the root
105 window of the screen, of the
106 upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
107 has no border).
108 .TP
109 \fBwinfo screenheight \fIwindow\fR
110 Returns a decimal string giving the height of \fIwindow\fR's terminal
111 screen, in lines.
112 .TP
113 \fBwinfo screenwidth \fIwindow\fR
114 Returns a decimal string giving the width of \fIwindow\fR's terminal screen,
115 in columns.
116 .TP
117 \fBwinfo toplevel \fIwindow\fR
118 Returns the path name of the top-level window containing \fIwindow\fR.
119 .TP
120 \fBwinfo width \fIwindow\fR
121 Returns a decimal string giving \fIwindow\fR's width in columns.
122 When a window is first created its width will be 1;  the
123 width will eventually be changed by a geometry manager to fulfill
124 the window's needs.
125 If you need the true width immediately after creating a widget,
126 invoke \fBupdate\fR to force the geometry manager to arrange it,
127 or use \fBwinfo reqwidth\fR to get the window's requested width
128 instead of its actual width.
129 .TP
130 \fBwinfo x \fIwindow\fR
131 Returns a decimal string giving the x-coordinate, in \fIwindow\fR's
132 parent, of the
133 upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
134 has no border).
135 .TP
136 \fBwinfo y \fIwindow\fR
137 Returns a decimal string giving the y-coordinate, in \fIwindow\fR's
138 parent, of the
139 upper-left corner of \fIwindow\fR's border (or \fIwindow\fR if it
140 has no border).
141
142 .SH KEYWORDS
143 children, class, geometry, height, identifier, information,
144 mapped, parent, path name, screen, terminal, width, window