]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/place.n
Ck console graphics toolkit
[oss/ck.git] / doc / place.n
1 '\"
2 '\" Copyright (c) 1992 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 place 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 place \- Geometry manager for fixed or rubber-sheet placement
15 .SH SYNOPSIS
16 \fBplace \fIwindow option value \fR?\fIoption value ...\fR?
17 .sp
18 \fBplace configure \fIwindow option value \fR?\fIoption value ...\fR?
19 .sp
20 \fBplace forget \fIwindow\fR
21 .sp
22 \fBplace info \fIwindow\fR
23 .sp
24 \fBplace slaves \fIwindow\fR
25 .BE
26
27 .SH DESCRIPTION
28 .PP
29 The placer is a geometry manager for Ck.
30 It provides simple fixed placement of windows, where you specify
31 the exact size and location of one window, called the \fIslave\fR,
32 within another window, called the \fImaster\fR.
33 The placer also provides rubber-sheet placement, where you specify the
34 size and location of the slave in terms of the dimensions of
35 the master, so that the slave changes size and location
36 in response to changes in the size of the master.
37 Lastly, the placer allows you to mix these styles of placement so
38 that, for example, the slave has a fixed width and height but is
39 centered inside the master.
40 .PP
41 If the first argument to the \fBplace\fR command is a window path
42 name or \fBconfigure\fR then the command arranges for the placer
43 to manage the geometry of a slave whose path name is \fIwindow\fR.
44 The remaining arguments consist of one or more \fIoption\-value\fR
45 pairs that specify the way in which \fIwindow\fR's
46 geometry is managed.
47 If the placer is already managing \fIwindow\fR, then the
48 \fIoption\-value\fR pairs modify the configuration for \fIwindow\fR.
49 In this form the \fBplace\fR command returns an empty string as result.
50 The following \fIoption\-value\fR pairs are supported:
51 .TP
52 \fB\-x \fIlocation\fR
53 \fILocation\fR specifies the x-coordinate within the master window
54 of the anchor point for \fIwindow\fR.
55 The location is specified in screen columns and need not lie within
56 the bounds of the master window.
57 .TP
58 \fB\-relx \fIlocation\fR
59 \fILocation\fR specifies the x-coordinate within the master window
60 of the anchor point for \fIwindow\fR.
61 In this case the location is specified in a relative fashion
62 as a floating-point number:  0.0 corresponds to the left edge
63 of the master and 1.0 corresponds to the right edge of the master.
64 \fILocation\fR need not be in the range 0.0\-1.0.
65 If both \fB\-x\fR and \fB\-relx\fR are specified for a slave
66 then their values are summed.  For example, \fB\-relx 0.5 \-x \-2\fR
67 positions the left edge of the slave 2 columns to the left of the
68 center of its master.
69 .TP
70 \fB\-y \fIlocation\fR
71 \fILocation\fR specifies the y-coordinate within the master window
72 of the anchor point for \fIwindow\fR.
73 The location is specified in screen lines and need not lie within
74 the bounds of the master window.
75 .TP
76 \fB\-rely \fIlocation\fR
77 \fILocation\fR specifies the y-coordinate within the master window
78 of the anchor point for \fIwindow\fR.
79 In this case the value is specified in a relative fashion
80 as a floating-point number:  0.0 corresponds to the top edge
81 of the master and 1.0 corresponds to the bottom edge of the master.
82 \fILocation\fR need not be in the range 0.0\-1.0.
83 If both \fB\-y\fR and \fB\-rely\fR are specified for a slave
84 then their values are summed.  For example, \fB\-rely 0.5 \-x 3\fR
85 positions the top edge of the slave 3 lines below the center of its master.
86 .TP
87 \fB\-anchor \fIwhere\fR
88 \fIWhere\fR specifies which point of \fIwindow\fR is to be positioned
89 at the (x,y) location selected by the \fB\-x\fR, \fB\-y\fR,
90 \fB\-relx\fR, and \fB\-rely\fR options.
91 The anchor point is in terms of the outer area of \fIwindow\fR
92 including its border, if any.
93 Thus if \fIwhere\fR is \fBse\fR then the lower-right corner of
94 \fIwindow\fR's border will appear at the given (x,y) location
95 in the master.
96 The anchor position defaults to \fBnw\fR.
97 .TP
98 \fB\-width \fIsize\fR
99 \fISize\fR specifies the width for \fIwindow\fR in screen columns.
100 The width will be the outer width of \fIwindow\fR including its
101 border, if any.
102 If \fIsize\fR is an empty string, or if no \fB\-width\fR
103 or \fB\-relwidth\fR option is specified, then the width requested
104 internally by the window will be used.
105 .TP
106 \fB\-relwidth \fIsize\fR
107 \fISize\fR specifies the width for \fIwindow\fR.
108 In this case the width is specified as a floating-point number
109 relative to the width of the master: 0.5 means \fIwindow\fR will
110 be half as wide as the master, 1.0 means \fIwindow\fR will have
111 the same width as the master, and so on.
112 If both \fB\-width\fR and \fB\-relwidth\fR are specified for a slave,
113 their values are summed.  For example, \fB\-relwidth 1.0 \-width 5\fR
114 makes the slave 5 columns wider than the master.
115 .TP
116 \fB\-height \fIsize\fR
117 \fISize\fR specifies the height for \fIwindow\fR in screen lines.
118 The height will be the outer dimension of \fIwindow\fR including its
119 border, if any.
120 If \fIsize\fR is an empty string, or if no \fB\-height\fR or
121 \fB\-relheight\fR option is specified, then the height requested
122 internally by the window will be used.
123 .TP
124 \fB\-relheight \fIsize\fR
125 \fISize\fR specifies the height for \fIwindow\fR.
126 In this case the height is specified as a floating-point number
127 relative to the height of the master: 0.5 means \fIwindow\fR will
128 be half as high as the master, 1.0 means \fIwindow\fR will have
129 the same height as the master, and so on.
130 If both \fB\-height\fR and \fB\-relheight\fR are specified for a slave,
131 their values are summed.  For example, \fB\-relheight 1.0 \-height \-2\fR
132 makes the slave 2 lines shorter than the master.
133 .TP
134 \fB\-bordermode \fImode\fR
135 \fIMode\fR determines the degree to which borders within the
136 master are used in determining the placement of the slave.
137 The default and most common value is \fBinside\fR.
138 In this case the placer considers the area of the master to
139 be the innermost area of the master, inside any border:
140 an option of \fB\-x 0\fR corresponds to an x-coordinate just
141 inside the border and an option of \fB\-relwidth 1.0\fR
142 means \fIwindow\fR will fill the area inside the master's
143 border.
144 If \fImode\fR is \fBignore\fR, borders are ignored:
145 the area of the master is considered to be its official area, which
146 includes any internal border.
147 .PP
148 If the same value is specified separately with
149 two different options, such as \fB\-x\fR and \fB\-relx\fR, then
150 the most recent option is used and the older one is ignored.
151 .PP
152 The \fBplace slaves\fR command returns a list of all the slave
153 windows for which \fIwindow\fR is the master.
154 If there are no slaves for \fIwindow\fR then an empty string is
155 returned.
156 .PP
157 The \fBplace forget\fR command causes the placer to stop managing
158 the geometry of \fIwindow\fR.  As a side effect of this command
159 \fIwindow\fR will be unmapped so that it doesn't appear on the
160 screen.
161 If \fIwindow\fR isn't currently managed by the placer then the
162 command has no effect.
163 \fBPlace forget\fR returns an empty string as result.
164 .PP
165 The \fBplace info\fR command returns a list giving the current
166 configuration of \fIwindow\fR.
167 The list consists of \fIoption\-value\fR pairs in exactly the
168 same form as might be specified to the \fBplace configure\fR
169 command.
170 If the configuration of a window has been retrieved with
171 \fBplace info\fR, that configuration can be restored later by
172 first using \fBplace forget\fR to erase any existing information
173 for the window and then invoking \fBplace configure\fR with
174 the saved information.
175
176 .SH "FINE POINTS"
177 .PP
178 Unlike many other geometry managers (such as the packer)
179 the placer does not make any attempt to manipulate the geometry of
180 the master windows or the parents of slave windows (i.e. it doesn't
181 set their requested sizes).
182 To control the sizes of these windows, make them windows like
183 frames and canvases that provide configuration options for this purpose.
184 .PP
185 The \fBplace\fR command is the only way to position toplevel windows
186 on the screen. In this special case, the master of a toplevel window
187 is assumed to be the entire screen area and the toplevel's location and
188 area is computed based on the screen's area.
189
190 .SH KEYWORDS
191 geometry manager, height, location, master, place, rubber sheet, slave, width,
192 toplevel