OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / 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.3 2000/08/10 00:21:06 ericm 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.4 2000/08/25 06:18:32 ericm 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 5.5c 11c
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 \fR?\fIoption\fR? ?\fIvalue option 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 .TP
278 \fBplace \fIwindow option value \fR?\fIoption value ...\fR?
279 Arrange for the placer to manage the geometry of a slave whose
280 pathName is \fIwindow\fR.  The remaining arguments consist of one or
281 more \fIoption\-value\fR pairs that specify the way in which
282 \fIwindow\fR's geometry is managed.  \fIOption\fR may have any of the
283 values accepted by the \fBplace configure\fR command.
284 .TP
285 \fBplace configure \fIwindow \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
286 Query or modify the geometry options of the slave given by
287 \fIwindow\fR.  If no \fIoption\fR is specified, this command returns a
288 list describing the available options (see \fBTk_ConfigureInfo\fR for
289 information on the format of this list).  If \fIoption\fR is specified
290 with no \fIvalue\fR, then the command returns a list describing the
291 one named option (this list will be identical to the corresponding
292 sublist of the value returned if no \fIoption\fR is specified).  If
293 one or more \fIoption\-value\fR pairs are specified, then the command
294 modifies the given option(s) to have the given value(s); in this case
295 the command returns an empty string.
296
297 The following \fIoption\-value\fR pairs are supported:
298 .RS
299 .TP
300 \fB\-anchor \fIwhere\fR
301 \fIWhere\fR specifies which point of \fIwindow\fR is to be positioned
302 at the (x,y) location selected by the \fB\-x\fR, \fB\-y\fR,
303 \fB\-relx\fR, and \fB\-rely\fR options.
304 The anchor point is in terms of the outer area of \fIwindow\fR
305 including its border, if any.
306 Thus if \fIwhere\fR is \fBse\fR then the lower-right corner of
307 \fIwindow\fR's border will appear at the given (x,y) location
308 in the master.
309 The anchor position defaults to \fBnw\fR.
310 .TP
311 \fB\-bordermode \fImode\fR
312 \fIMode\fR determines the degree to which borders within the
313 master are used in determining the placement of the slave.
314 The default and most common value is \fBinside\fR.
315 In this case the placer considers the area of the master to
316 be the innermost area of the master, inside any border:
317 an option of \fB\-x 0\fR corresponds to an x-coordinate just
318 inside the border and an option of \fB\-relwidth 1.0\fR
319 means \fIwindow\fR will fill the area inside the master's
320 border.
321
322 If \fImode\fR is \fBoutside\fR then the placer considers
323 the area of the master to include its border;
324 this mode is typically used when placing \fIwindow\fR
325 outside its master, as with the options \fB\-x 0 \-y 0 \-anchor ne\fR.
326 Lastly, \fImode\fR may be specified as \fBignore\fR, in which
327 case borders are ignored:  the area of the master is considered
328 to be its official X area, which includes any internal border but
329 no external border.  A bordermode of \fBignore\fR is probably
330 not very useful.
331 .TP
332 \fB\-height \fIsize\fR
333 \fISize\fR specifies the height for \fIwindow\fR in screen units
334 (i.e. any of the forms accepted by \fBTk_GetPixels\fR).
335 The height will be the outer dimension of \fIwindow\fR including its
336 border, if any.
337 If \fIsize\fR is an empty string, or if no \fB\-height\fR or
338 \fB\-relheight\fR option is specified, then the height requested
339 internally by the window will be used.
340 .TP
341 \fB\-in \fImaster\fR
342 \fIMaster\fR specifes the path name of the window relative
343 to which \fIwindow\fR is to be placed.
344 \fIMaster\fR must either be \fIwindow\fR's parent or a descendant
345 of \fIwindow\fR's parent.
346 In addition, \fImaster\fR and \fIwindow\fR must both be descendants
347 of the same top-level window.
348 These restrictions are necessary to guarantee
349 that \fIwindow\fR is visible whenever \fImaster\fR is visible.
350 If this option isn't specified then the master defaults to
351 \fIwindow\fR's parent.
352 .TP
353 \fB\-relheight \fIsize\fR
354 \fISize\fR specifies the height for \fIwindow\fR.
355 In this case the height is specified as a floating-point number
356 relative to the height of the master: 0.5 means \fIwindow\fR will
357 be half as high as the master, 1.0 means \fIwindow\fR will have
358 the same height as the master, and so on.
359 If both \fB\-height\fR and \fB\-relheight\fR are specified for a slave,
360 their values are summed.  For example, \fB\-relheight 1.0 \-height \-2\fR
361 makes the slave 2 pixels shorter than the master.
362 .TP
363 \fB\-relwidth \fIsize\fR
364 \fISize\fR specifies the width for \fIwindow\fR.
365 In this case the width is specified as a floating-point number
366 relative to the width of the master: 0.5 means \fIwindow\fR will
367 be half as wide as the master, 1.0 means \fIwindow\fR will have
368 the same width as the master, and so on.
369 If both \fB\-width\fR and \fB\-relwidth\fR are specified for a slave,
370 their values are summed.  For example, \fB\-relwidth 1.0 \-width 5\fR
371 makes the slave 5 pixels wider than the master.
372 .TP
373 \fB\-relx \fIlocation\fR
374 \fILocation\fR specifies the x-coordinate within the master window
375 of the anchor point for \fIwindow\fR.
376 In this case the location is specified in a relative fashion
377 as a floating-point number:  0.0 corresponds to the left edge
378 of the master and 1.0 corresponds to the right edge of the master.
379 \fILocation\fR need not be in the range 0.0\-1.0.
380 If both \fB\-x\fR and \fB\-relx\fR are specified for a slave
381 then their values are summed.  For example, \fB\-relx 0.5 \-x \-2\fR
382 positions the left edge of the slave 2 pixels to the left of the
383 center of its master.
384 .TP
385 \fB\-rely \fIlocation\fR
386 \fILocation\fR specifies the y-coordinate within the master window
387 of the anchor point for \fIwindow\fR.
388 In this case the value is specified in a relative fashion
389 as a floating-point number:  0.0 corresponds to the top edge
390 of the master and 1.0 corresponds to the bottom edge of the master.
391 \fILocation\fR need not be in the range 0.0\-1.0.
392 If both \fB\-y\fR and \fB\-rely\fR are specified for a slave
393 then their values are summed.  For example, \fB\-rely 0.5 \-x 3\fR
394 positions the top edge of the slave 3 pixels below the
395 center of its master.
396 .TP
397 \fB\-width \fIsize\fR
398 \fISize\fR specifies the width for \fIwindow\fR in screen units
399 (i.e. any of the forms accepted by \fBTk_GetPixels\fR).
400 The width will be the outer width of \fIwindow\fR including its
401 border, if any.
402 If \fIsize\fR is an empty string, or if no \fB\-width\fR
403 or \fB\-relwidth\fR option is specified, then the width requested
404 internally by the window will be used.
405 .TP
406 \fB\-x \fIlocation\fR
407 \fILocation\fR specifies the x-coordinate within the master window
408 of the anchor point for \fIwindow\fR.
409 The location is specified in screen units (i.e. any of the forms
410 accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
411 of the master window.
412 .TP
413 \fB\-y \fIlocation\fR
414 \fILocation\fR specifies the y-coordinate within the master window
415 of the anchor point for \fIwindow\fR.
416 The location is specified in screen units (i.e. any of the forms
417 accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
418 of the master window.
419 .PP
420 If the same value is specified separately with
421 two different options, such as \fB\-x\fR and \fB\-relx\fR, then
422 the most recent option is used and the older one is ignored.
423 .RE
424 .TP
425 \fBplace forget \fIwindow\fR
426 Causes the placer to stop managing the geometry of \fIwindow\fR.  As a
427 side effect of this command \fIwindow\fR will be unmapped so that it
428 doesn't appear on the screen.  If \fIwindow\fR isn't currently managed
429 by the placer then the command has no effect.  This command returns an
430 empty string.
431 .TP
432 \fBplace info \fIwindow\fR
433 Returns a list giving the current configuration of \fIwindow\fR.
434 The list consists of \fIoption\-value\fR pairs in exactly the
435 same form as might be specified to the \fBplace configure\fR
436 command.
437 .TP
438 \fBplace slaves \fIwindow\fR
439 Returns a list of all the slave windows for which \fIwindow\fR is the master.
440 If there are no slaves for \fIwindow\fR then an empty string is returned.
441
442 If the configuration of a window has been retrieved with
443 \fBplace info\fR, that configuration can be restored later by
444 first using \fBplace forget\fR to erase any existing information
445 for the window and then invoking \fBplace configure\fR with
446 the saved information.
447
448 .SH "FINE POINTS"
449 .PP
450 It is not necessary for the master window to be the parent
451 of the slave window.
452 This feature is useful in at least two situations.
453 First, for complex window layouts it means you can create a
454 hierarchy of subwindows whose only purpose
455 is to assist in the layout of the parent.
456 The ``real children'' of the parent (i.e. the windows that
457 are significant for the application's user interface) can be
458 children of the parent yet be placed inside the windows
459 of the geometry-management hierarchy.
460 This means that the path names of the ``real children''
461 don't reflect the geometry-management hierarchy and users
462 can specify options for the real children
463 without being aware of the structure of the geometry-management
464 hierarchy.
465 .PP
466 A second reason for having a master different than the slave's
467 parent is to tie two siblings together.
468 For example, the placer can be used to force a window always to
469 be positioned centered just below one of its
470 siblings by specifying the configuration
471 .CS
472 \fB\-in \fIsibling\fB \-relx 0.5 \-rely 1.0 \-anchor n \-bordermode outside\fR
473 .CE
474 Whenever the sibling is repositioned in the future, the slave
475 will be repositioned as well.
476 .PP
477 Unlike many other geometry managers (such as the packer)
478 the placer does not make any attempt to manipulate the geometry of
479 the master windows or the parents of slave windows (i.e. it doesn't
480 set their requested sizes).
481 To control the sizes of these windows, make them windows like
482 frames and canvases that provide configuration options for this purpose.
483
484 .SH KEYWORDS
485 geometry manager, height, location, master, place, rubber sheet, slave, width