OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / ALPHALINUX5 / util / ALPHALINUX5 / man / mann / place.n
1 '\"
2 '\" Copyright (c) 1992 The Regents of the University of California.
3 '\" Copyright (c) 1994-1996 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: place.n,v 1.2 1998/09/14 18:22:59 stanton Exp $
9 '\" 
10 '\" The definitions below are for supplemental macros used in Tcl/Tk
11 '\" manual entries.
12 '\"
13 '\" .AP type name in/out ?indent?
14 '\"     Start paragraph describing an argument to a library procedure.
15 '\"     type is type of argument (int, etc.), in/out is either "in", "out",
16 '\"     or "in/out" to describe whether procedure reads or modifies arg,
17 '\"     and indent is equivalent to second arg of .IP (shouldn't ever be
18 '\"     needed;  use .AS below instead)
19 '\"
20 '\" .AS ?type? ?name?
21 '\"     Give maximum sizes of arguments for setting tab stops.  Type and
22 '\"     name are examples of largest possible arguments that will be passed
23 '\"     to .AP later.  If args are omitted, default tab stops are used.
24 '\"
25 '\" .BS
26 '\"     Start box enclosure.  From here until next .BE, everything will be
27 '\"     enclosed in one large box.
28 '\"
29 '\" .BE
30 '\"     End of box enclosure.
31 '\"
32 '\" .CS
33 '\"     Begin code excerpt.
34 '\"
35 '\" .CE
36 '\"     End code excerpt.
37 '\"
38 '\" .VS ?version? ?br?
39 '\"     Begin vertical sidebar, for use in marking newly-changed parts
40 '\"     of man pages.  The first argument is ignored and used for recording
41 '\"     the version when the .VS was added, so that the sidebars can be
42 '\"     found and removed when they reach a certain age.  If another argument
43 '\"     is present, then a line break is forced before starting the sidebar.
44 '\"
45 '\" .VE
46 '\"     End of vertical sidebar.
47 '\"
48 '\" .DS
49 '\"     Begin an indented unfilled display.
50 '\"
51 '\" .DE
52 '\"     End of indented unfilled display.
53 '\"
54 '\" .SO
55 '\"     Start of list of standard options for a Tk widget.  The
56 '\"     options follow on successive lines, in four columns separated
57 '\"     by tabs.
58 '\"
59 '\" .SE
60 '\"     End of list of standard options for a Tk widget.
61 '\"
62 '\" .OP cmdName dbName dbClass
63 '\"     Start of description of a specific option.  cmdName gives the
64 '\"     option's name as specified in the class command, dbName gives
65 '\"     the option's name in the option database, and dbClass gives
66 '\"     the option's class in the option database.
67 '\"
68 '\" .UL arg1 arg2
69 '\"     Print arg1 underlined, then print arg2 normally.
70 '\"
71 '\" RCS: @(#) $Id: man.macros,v 1.3 1999/04/16 00:46:35 stanton Exp $
72 '\"
73 '\"     # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
74 .if t .wh -1.3i ^B
75 .nr ^l \n(.l
76 .ad b
77 '\"     # Start an argument description
78 .de AP
79 .ie !"\\$4"" .TP \\$4
80 .el \{\
81 .   ie !"\\$2"" .TP \\n()Cu
82 .   el          .TP 15
83 .\}
84 .ta \\n()Au \\n()Bu
85 .ie !"\\$3"" \{\
86 \&\\$1  \\fI\\$2\\fP    (\\$3)
87 .\".b
88 .\}
89 .el \{\
90 .br
91 .ie !"\\$2"" \{\
92 \&\\$1  \\fI\\$2\\fP
93 .\}
94 .el \{\
95 \&\\fI\\$1\\fP
96 .\}
97 .\}
98 ..
99 '\"     # define tabbing values for .AP
100 .de AS
101 .nr )A 10n
102 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
103 .nr )B \\n()Au+15n
104 .\"
105 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
106 .nr )C \\n()Bu+\\w'(in/out)'u+2n
107 ..
108 .AS Tcl_Interp Tcl_CreateInterp in/out
109 '\"     # BS - start boxed text
110 '\"     # ^y = starting y location
111 '\"     # ^b = 1
112 .de BS
113 .br
114 .mk ^y
115 .nr ^b 1u
116 .if n .nf
117 .if n .ti 0
118 .if n \l'\\n(.lu\(ul'
119 .if n .fi
120 ..
121 '\"     # BE - end boxed text (draw box now)
122 .de BE
123 .nf
124 .ti 0
125 .mk ^t
126 .ie n \l'\\n(^lu\(ul'
127 .el \{\
128 .\"     Draw four-sided box normally, but don't draw top of
129 .\"     box if the box started on an earlier page.
130 .ie !\\n(^b-1 \{\
131 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
132 .\}
133 .el \}\
134 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
135 .\}
136 .\}
137 .fi
138 .br
139 .nr ^b 0
140 ..
141 '\"     # VS - start vertical sidebar
142 '\"     # ^Y = starting y location
143 '\"     # ^v = 1 (for troff;  for nroff this doesn't matter)
144 .de VS
145 .if !"\\$2"" .br
146 .mk ^Y
147 .ie n 'mc \s12\(br\s0
148 .el .nr ^v 1u
149 ..
150 '\"     # VE - end of vertical sidebar
151 .de VE
152 .ie n 'mc
153 .el \{\
154 .ev 2
155 .nf
156 .ti 0
157 .mk ^t
158 \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
159 .sp -1
160 .fi
161 .ev
162 .\}
163 .nr ^v 0
164 ..
165 '\"     # Special macro to handle page bottom:  finish off current
166 '\"     # box/sidebar if in box/sidebar mode, then invoked standard
167 '\"     # page bottom macro.
168 .de ^B
169 .ev 2
170 'ti 0
171 'nf
172 .mk ^t
173 .if \\n(^b \{\
174 .\"     Draw three-sided box if this is the box's first page,
175 .\"     draw two sides but no top otherwise.
176 .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
177 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
178 .\}
179 .if \\n(^v \{\
180 .nr ^x \\n(^tu+1v-\\n(^Yu
181 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
182 .\}
183 .bp
184 'fi
185 .ev
186 .if \\n(^b \{\
187 .mk ^y
188 .nr ^b 2
189 .\}
190 .if \\n(^v \{\
191 .mk ^Y
192 .\}
193 ..
194 '\"     # DS - begin display
195 .de DS
196 .RS
197 .nf
198 .sp
199 ..
200 '\"     # DE - end display
201 .de DE
202 .fi
203 .RE
204 .sp
205 ..
206 '\"     # SO - start of list of standard options
207 .de SO
208 .SH "STANDARD OPTIONS"
209 .LP
210 .nf
211 .ta 4c 8c 12c
212 .ft B
213 ..
214 '\"     # SE - end of list of standard options
215 .de SE
216 .fi
217 .ft R
218 .LP
219 See the \\fBoptions\\fR manual entry for details on the standard options.
220 ..
221 '\"     # OP - start of full description for a single option
222 .de OP
223 .LP
224 .nf
225 .ta 4c
226 Command-Line Name:      \\fB\\$1\\fR
227 Database Name:  \\fB\\$2\\fR
228 Database Class: \\fB\\$3\\fR
229 .fi
230 .IP
231 ..
232 '\"     # CS - begin code excerpt
233 .de CS
234 .RS
235 .nf
236 .ta .25i .5i .75i 1i
237 ..
238 '\"     # CE - end code excerpt
239 .de CE
240 .fi
241 .RE
242 ..
243 .de UL
244 \\$1\l'|0\(ul'\\$2
245 ..
246 .TH place n "" Tk "Tk Built-In Commands"
247 .BS
248 '\" Note:  do not modify the .SH NAME line immediately below!
249 .SH NAME
250 place \- Geometry manager for fixed or rubber-sheet placement
251 .SH SYNOPSIS
252 \fBplace \fIwindow option value \fR?\fIoption value ...\fR?
253 .sp
254 \fBplace configure \fIwindow option value \fR?\fIoption value ...\fR?
255 .sp
256 \fBplace forget \fIwindow\fR
257 .sp
258 \fBplace info \fIwindow\fR
259 .sp
260 \fBplace slaves \fIwindow\fR
261 .BE
262
263 .SH DESCRIPTION
264 .PP
265 The placer is a geometry manager for Tk.
266 It provides simple fixed placement of windows, where you specify
267 the exact size and location of one window, called the \fIslave\fR,
268 within another window, called the \fImaster\fR.
269 The placer also provides rubber-sheet placement, where you specify the
270 size and location of the slave in terms of the dimensions of
271 the master, so that the slave changes size and location
272 in response to changes in the size of the master.
273 Lastly, the placer allows you to mix these styles of placement so
274 that, for example, the slave has a fixed width and height but is
275 centered inside the master.
276 .PP
277 If the first argument to the \fBplace\fR command is a window path
278 name or \fBconfigure\fR then the command arranges for the placer
279 to manage the geometry of a slave whose path name is \fIwindow\fR.
280 The remaining arguments consist of one or more \fIoption\-value\fR
281 pairs that specify the way in which \fIwindow\fR's
282 geometry is managed.
283 If the placer is already managing \fIwindow\fR, then the
284 \fIoption\-value\fR pairs modify the configuration for \fIwindow\fR.
285 In this form the \fBplace\fR command returns an empty string as result.
286 The following \fIoption\-value\fR pairs are supported:
287 .TP
288 \fB\-in \fImaster\fR
289 \fIMaster\fR specifes the path name of the window relative
290 to which \fIwindow\fR is to be placed.
291 \fIMaster\fR must either be \fIwindow\fR's parent or a descendant
292 of \fIwindow\fR's parent.
293 In addition, \fImaster\fR and \fIwindow\fR must both be descendants
294 of the same top-level window.
295 These restrictions are necessary to guarantee
296 that \fIwindow\fR is visible whenever \fImaster\fR is visible.
297 If this option isn't specified then the master defaults to
298 \fIwindow\fR's parent.
299 .TP
300 \fB\-x \fIlocation\fR
301 \fILocation\fR specifies the x-coordinate within the master window
302 of the anchor point for \fIwindow\fR.
303 The location is specified in screen units (i.e. any of the forms
304 accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
305 of the master window.
306 .TP
307 \fB\-relx \fIlocation\fR
308 \fILocation\fR specifies the x-coordinate within the master window
309 of the anchor point for \fIwindow\fR.
310 In this case the location is specified in a relative fashion
311 as a floating-point number:  0.0 corresponds to the left edge
312 of the master and 1.0 corresponds to the right edge of the master.
313 \fILocation\fR need not be in the range 0.0\-1.0.
314 If both \fB\-x\fR and \fB\-relx\fR are specified for a slave
315 then their values are summed.  For example, \fB\-relx 0.5 \-x \-2\fR
316 positions the left edge of the slave 2 pixels to the left of the
317 center of its master.
318 .TP
319 \fB\-y \fIlocation\fR
320 \fILocation\fR specifies the y-coordinate within the master window
321 of the anchor point for \fIwindow\fR.
322 The location is specified in screen units (i.e. any of the forms
323 accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
324 of the master window.
325 .TP
326 \fB\-rely \fIlocation\fR
327 \fILocation\fR specifies the y-coordinate within the master window
328 of the anchor point for \fIwindow\fR.
329 In this case the value is specified in a relative fashion
330 as a floating-point number:  0.0 corresponds to the top edge
331 of the master and 1.0 corresponds to the bottom edge of the master.
332 \fILocation\fR need not be in the range 0.0\-1.0.
333 If both \fB\-y\fR and \fB\-rely\fR are specified for a slave
334 then their values are summed.  For example, \fB\-rely 0.5 \-x 3\fR
335 positions the top edge of the slave 3 pixels below the
336 center of its master.
337 .TP
338 \fB\-anchor \fIwhere\fR
339 \fIWhere\fR specifies which point of \fIwindow\fR is to be positioned
340 at the (x,y) location selected by the \fB\-x\fR, \fB\-y\fR,
341 \fB\-relx\fR, and \fB\-rely\fR options.
342 The anchor point is in terms of the outer area of \fIwindow\fR
343 including its border, if any.
344 Thus if \fIwhere\fR is \fBse\fR then the lower-right corner of
345 \fIwindow\fR's border will appear at the given (x,y) location
346 in the master.
347 The anchor position defaults to \fBnw\fR.
348 .TP
349 \fB\-width \fIsize\fR
350 \fISize\fR specifies the width for \fIwindow\fR in screen units
351 (i.e. any of the forms accepted by \fBTk_GetPixels\fR).
352 The width will be the outer width of \fIwindow\fR including its
353 border, if any.
354 If \fIsize\fR is an empty string, or if no \fB\-width\fR
355 or \fB\-relwidth\fR option is specified, then the width requested
356 internally by the window will be used.
357 .TP
358 \fB\-relwidth \fIsize\fR
359 \fISize\fR specifies the width for \fIwindow\fR.
360 In this case the width is specified as a floating-point number
361 relative to the width of the master: 0.5 means \fIwindow\fR will
362 be half as wide as the master, 1.0 means \fIwindow\fR will have
363 the same width as the master, and so on.
364 If both \fB\-width\fR and \fB\-relwidth\fR are specified for a slave,
365 their values are summed.  For example, \fB\-relwidth 1.0 \-width 5\fR
366 makes the slave 5 pixels wider than the master.
367 .TP
368 \fB\-height \fIsize\fR
369 \fISize\fR specifies the height for \fIwindow\fR in screen units
370 (i.e. any of the forms accepted by \fBTk_GetPixels\fR).
371 The height will be the outer dimension of \fIwindow\fR including its
372 border, if any.
373 If \fIsize\fR is an empty string, or if no \fB\-height\fR or
374 \fB\-relheight\fR option is specified, then the height requested
375 internally by the window will be used.
376 .TP
377 \fB\-relheight \fIsize\fR
378 \fISize\fR specifies the height for \fIwindow\fR.
379 In this case the height is specified as a floating-point number
380 relative to the height of the master: 0.5 means \fIwindow\fR will
381 be half as high as the master, 1.0 means \fIwindow\fR will have
382 the same height as the master, and so on.
383 If both \fB\-height\fR and \fB\-relheight\fR are specified for a slave,
384 their values are summed.  For example, \fB\-relheight 1.0 \-height \-2\fR
385 makes the slave 2 pixels shorter than the master.
386 .TP
387 \fB\-bordermode \fImode\fR
388 \fIMode\fR determines the degree to which borders within the
389 master are used in determining the placement of the slave.
390 The default and most common value is \fBinside\fR.
391 In this case the placer considers the area of the master to
392 be the innermost area of the master, inside any border:
393 an option of \fB\-x 0\fR corresponds to an x-coordinate just
394 inside the border and an option of \fB\-relwidth 1.0\fR
395 means \fIwindow\fR will fill the area inside the master's
396 border.
397 If \fImode\fR is \fBoutside\fR then the placer considers
398 the area of the master to include its border;
399 this mode is typically used when placing \fIwindow\fR
400 outside its master, as with the options \fB\-x 0 \-y 0 \-anchor ne\fR.
401 Lastly, \fImode\fR may be specified as \fBignore\fR, in which
402 case borders are ignored:  the area of the master is considered
403 to be its official X area, which includes any internal border but
404 no external border.  A bordermode of \fBignore\fR is probably
405 not very useful.
406 .PP
407 If the same value is specified separately with
408 two different options, such as \fB\-x\fR and \fB\-relx\fR, then
409 the most recent option is used and the older one is ignored.
410 .PP
411 The \fBplace slaves\fR command returns a list of all the slave
412 windows for which \fIwindow\fR is the master.
413 If there are no slaves for \fIwindow\fR then an empty string is
414 returned.
415 .PP
416 The \fBplace forget\fR command causes the placer to stop managing
417 the geometry of \fIwindow\fR.  As a side effect of this command
418 \fIwindow\fR will be unmapped so that it doesn't appear on the
419 screen.
420 If \fIwindow\fR isn't currently managed by the placer then the
421 command has no effect.
422 \fBPlace forget\fR returns an empty string as result.
423 .PP
424 The \fBplace info\fR command returns a list giving the current
425 configuration of \fIwindow\fR.
426 The list consists of \fIoption\-value\fR pairs in exactly the
427 same form as might be specified to the \fBplace configure\fR
428 command.
429 If the configuration of a window has been retrieved with
430 \fBplace info\fR, that configuration can be restored later by
431 first using \fBplace forget\fR to erase any existing information
432 for the window and then invoking \fBplace configure\fR with
433 the saved information.
434
435 .SH "FINE POINTS"
436 .PP
437 It is not necessary for the master window to be the parent
438 of the slave window.
439 This feature is useful in at least two situations.
440 First, for complex window layouts it means you can create a
441 hierarchy of subwindows whose only purpose
442 is to assist in the layout of the parent.
443 The ``real children'' of the parent (i.e. the windows that
444 are significant for the application's user interface) can be
445 children of the parent yet be placed inside the windows
446 of the geometry-management hierarchy.
447 This means that the path names of the ``real children''
448 don't reflect the geometry-management hierarchy and users
449 can specify options for the real children
450 without being aware of the structure of the geometry-management
451 hierarchy.
452 .PP
453 A second reason for having a master different than the slave's
454 parent is to tie two siblings together.
455 For example, the placer can be used to force a window always to
456 be positioned centered just below one of its
457 siblings by specifying the configuration
458 .CS
459 \fB\-in \fIsibling\fB \-relx 0.5 \-rely 1.0 \-anchor n \-bordermode outside\fR
460 .CE
461 Whenever the sibling is repositioned in the future, the slave
462 will be repositioned as well.
463 .PP
464 Unlike many other geometry managers (such as the packer)
465 the placer does not make any attempt to manipulate the geometry of
466 the master windows or the parents of slave windows (i.e. it doesn't
467 set their requested sizes).
468 To control the sizes of these windows, make them windows like
469 frames and canvases that provide configuration options for this purpose.
470
471 .SH KEYWORDS
472 geometry manager, height, location, master, place, rubber sheet, slave, width