Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::place.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "PLACE 1"
132.TH PLACE 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Tk::place \- Geometry manager for fixed or rubber\-sheet placement
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\ \fI$widget\fR\->\fBplace\fR?(\fI\-option\fR=>\fIvalue\fR?, \fI\-option\fR=>\fIvalue\fR, ...)?
138.PP
139\&\ \fI$widget\fR\->\fBplaceForget\fR
140.PP
141\&\ \fI$widget\fR\->\fBplaceInfo\fR
142.PP
143\&\ \fI$master\fR\->\fBplaceSlaves\fR
144.SH "DESCRIPTION"
145.IX Header "DESCRIPTION"
146The placer is a geometry manager for Tk.
147It provides simple fixed placement of windows, where you specify
148the exact size and location of one window, called the \fIslave\fR,
149within another window, called the \fI$master\fR.
150The placer also provides rubber-sheet placement, where you specify the
151size and location of the slave in terms of the dimensions of
152the master, so that the slave changes size and location
153in response to changes in the size of the master.
154Lastly, the placer allows you to mix these styles of placement so
155that, for example, the slave has a fixed width and height but is
156centered inside the master.
157.IP "\fI$slave\fR\->\fBplace\fR?(\fI\-option\fR=>\fIvalue\fR?, \fI\-option\fR=>\fIvalue\fR, ...?)?" 4
158.IX Item "$slave->place?(-option=>value?, -option=>value, ...?)?"
159The \fBplace\fR method arranges for the placer
160to manage the geometry of \fI$slave\fR.
161The remaining arguments consist of one or more \fI\-option\fR=>\fIvalue\fR
162pairs that specify the way in which \fI$slave\fR's
163geometry is managed.
164If the placer is already managing \fI$slave\fR, then the
165\&\fI\-option\fR=>\fIvalue\fR pairs modify the configuration for \fI$slave\fR.
166The \fBplace\fR method returns an empty string as result.
167The following \fI\-option\fR=>\fIvalue\fR pairs are supported:
168.RS 4
169.IP "\fB\-in\fR => \fI$master\fR" 8
170.IX Item "-in => $master"
171\&\fI$master\fR is the reference to the window relative
172to which \fI$slave\fR is to be placed.
173\&\fI$master\fR must either be \fI$slave\fR's parent or a descendant
174of \fI$slave\fR's parent.
175In addition, \fI$master\fR and \fI$slave\fR must both be descendants
176of the same top-level window.
177These restrictions are necessary to guarantee
178that \fI$slave\fR is visible whenever \fI$master\fR is visible.
179If this option isn't specified then the master defaults to
180\&\fI$slave\fR's parent.
181.IP "\fB\-x\fR => \fIlocation\fR" 8
182.IX Item "-x => location"
183\&\fILocation\fR specifies the x\-coordinate within the master window
184of the anchor point for \fI$slave\fR widget.
185The location is specified in screen units (i.e. any of the forms
186accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
187of the master window.
188.IP "\fB\-relx\fR => \fIlocation\fR" 8
189.IX Item "-relx => location"
190\&\fILocation\fR specifies the x\-coordinate within the master window
191of the anchor point for \fI$slave\fR widget.
192In this case the location is specified in a relative fashion
193as a floating-point number: 0.0 corresponds to the left edge
194of the master and 1.0 corresponds to the right edge of the master.
195\&\fILocation\fR need not be in the range 0.0\-1.0.
196If both \fB\-x\fR and \fB\-relx\fR are specified for a slave
197then their values are summed. For example, "\fB\-relx\fR=>0.5, \fB\-x\fR=\-2"
198positions the left edge of the slave 2 pixels to the left of the
199center of its master.
200.IP "\fB\-y\fR => \fIlocation\fR" 8
201.IX Item "-y => location"
202\&\fILocation\fR specifies the y\-coordinate within the master window
203of the anchor point for \fI$slave\fR widget.
204The location is specified in screen units (i.e. any of the forms
205accepted by \fBTk_GetPixels\fR) and need not lie within the bounds
206of the master window.
207.IP "\fB\-rely\fR => \fIlocation\fR" 8
208.IX Item "-rely => location"
209\&\fILocation\fR specifies the y\-coordinate within the master window
210of the anchor point for \fI$slave\fR widget.
211In this case the value is specified in a relative fashion
212as a floating-point number: 0.0 corresponds to the top edge
213of the master and 1.0 corresponds to the bottom edge of the master.
214\&\fILocation\fR need not be in the range 0.0\-1.0.
215If both \fB\-y\fR and \fB\-rely\fR are specified for a slave
216then their values are summed. For example, \fB\-rely\fR=>0.5, \fB\-x\fR=>3
217positions the top edge of the slave 3 pixels below the
218center of its master.
219.IP "\fB\-anchor\fR => \fIwhere\fR" 8
220.IX Item "-anchor => where"
221\&\fIWhere\fR specifies which point of \fI$slave\fR is to be positioned
222at the (x,y) location selected by the \fB\-x\fR, \fB\-y\fR,
223\&\fB\-relx\fR, and \fB\-rely\fR options.
224The anchor point is in terms of the outer area of \fI$slave\fR
225including its border, if any.
226Thus if \fIwhere\fR is \fBse\fR then the lower-right corner of
227\&\fI$slave\fR's border will appear at the given (x,y) location
228in the master.
229The anchor position defaults to \fBnw\fR.
230.IP "\fB\-width\fR => \fIsize\fR" 8
231.IX Item "-width => size"
232\&\fISize\fR specifies the width for \fI$slave\fR in screen units
233(i.e. any of the forms accepted by \fBTk_GetPixels\fR).
234The width will be the outer width of \fI$slave\fR including its
235border, if any.
236If \fIsize\fR is an empty string, or if no \fB\-width\fR
237or \fB\-relwidth\fR option is specified, then the width requested
238internally by the window will be used.
239.IP "\fB\-relwidth\fR => \fIsize\fR" 8
240.IX Item "-relwidth => size"
241\&\fISize\fR specifies the width for \fI$slave\fR.
242In this case the width is specified as a floating-point number
243relative to the width of the master: 0.5 means \fI$slave\fR will
244be half as wide as the master, 1.0 means \fI$slave\fR will have
245the same width as the master, and so on.
246If both \fB\-width\fR and \fB\-relwidth\fR are specified for a slave,
247their values are summed. For example, \fB\-relwidth\fR=>1.0, \fB\-width\fR=>5
248makes the slave 5 pixels wider than the master.
249.IP "\fB\-height\fR => \fIsize\fR" 8
250.IX Item "-height => size"
251\&\fISize\fR specifies the height for \fI$slave\fR in screen units
252(i.e. any of the forms accepted by \fBTk_GetPixels\fR).
253The height will be the outer dimension of \fI$slave\fR including its
254border, if any.
255If \fIsize\fR is an empty string, or if no \fB\-height\fR or
256\&\fB\-relheight\fR option is specified, then the height requested
257internally by the window will be used.
258.IP "\fB\-relheight\fR => \fIsize\fR" 8
259.IX Item "-relheight => size"
260\&\fISize\fR specifies the height for \fI$slave\fR.
261In this case the height is specified as a floating-point number
262relative to the height of the master: 0.5 means \fI$slave\fR will
263be half as high as the master, 1.0 means \fI$slave\fR will have
264the same height as the master, and so on.
265If both \fB\-height\fR and \fB\-relheight\fR are specified for a slave,
266their values are summed. For example, \fB\-relheight\fR=>1.0, \fB\-height\fR=>\-2
267makes the slave 2 pixels shorter than the master.
268.IP "\fB\-bordermode\fR => \fImode\fR" 8
269.IX Item "-bordermode => mode"
270\&\fIMode\fR determines the degree to which borders within the
271master are used in determining the placement of the slave.
272The default and most common value is \fBinside\fR.
273In this case the placer considers the area of the master to
274be the innermost area of the master, inside any border:
275an option of \fB\-x\fR=>\fB0\fR corresponds to an x\-coordinate just
276inside the border and an option of \fB\-relwidth\fR=>1.0
277means \fI$slave\fR will fill the area inside the master's
278border.
279If \fImode\fR is \fBoutside\fR then the placer considers
280the area of the master to include its border;
281this mode is typically used when placing \fI$slave\fR
282outside its master, as with the options
283\&\fB\-x\fR=>\fB0\fR, \fB\-y\fR=>\fB0\fR, \fB\-anchor\fR=>\fBne\fR.
284Lastly, \fImode\fR may be specified as \fBignore\fR, in which
285case borders are ignored: the area of the master is considered
286to be its official X area, which includes any internal border but
287no external border. A bordermode of \fBignore\fR is probably
288not very useful.
289.Sp
290If the same value is specified separately with
291two different options, such as \fB\-x\fR and \fB\-relx\fR, then
292the most recent option is used and the older one is ignored.
293.RE
294.RS 4
295.RE
296.IP "\fI$slave\fR\->\fBplaceSlaves\fR" 4
297.IX Item "$slave->placeSlaves"
298The \fBplaceSlaves\fR method returns a list of all the slave
299windows for which \fI$master\fR is the master.
300If there are no slaves for \fI$master\fR then an empty list is
301returned.
302.IP "\fI$slave\fR\->\fBplaceForget\fR" 4
303.IX Item "$slave->placeForget"
304The \fBplaceForget\fR method causes the placer to stop managing
305the geometry of \fI$slave\fR. As a side effect of this method call
306\&\fI$slave\fR will be unmapped so that it doesn't appear on the
307screen.
308If \fI$slave\fR isn't currently managed by the placer then the
309method call has no effect.
310\&\fBplaceForget\fR returns an empty string as result.
311.IP "\fI$slave\fR\->\fBplaceInfo\fR" 4
312.IX Item "$slave->placeInfo"
313The \fBplaceInfo\fR method returns a list giving the current
314configuration of \fI$slave\fR.
315The list consists of \fI\-option\fR=>\fIvalue\fR pairs in exactly the
316same form as might be specified to the \fBplace\fR
317method.
318If the configuration of a window has been retrieved with
319\&\fBplaceInfo\fR, that configuration can be restored later by
320first using \fBplaceForget\fR to erase any existing information
321for the window and then invoking \fBplace\fR with
322the saved information.
323.SH "FINE POINTS"
324.IX Header "FINE POINTS"
325It is not necessary for the master window to be the parent
326of the slave window.
327This feature is useful in at least two situations.
328First, for complex window layouts it means you can create a
329hierarchy of subwindows whose only purpose
330is to assist in the layout of the parent.
331The ``\fIreal children\fR'' of the parent (i.e. the windows that
332are significant for the application's user interface) can be
333children of the parent yet be placed inside the windows
334of the geometry-management hierarchy.
335This means that the path names of the ``\fIreal children\fR''
336don't reflect the geometry-management hierarchy and users
337can specify options for the real children
338without being aware of the structure of the geometry-management
339hierarchy.
340.PP
341A second reason for having a master different than the slave's
342parent is to tie two siblings together.
343For example, the placer can be used to force a window always to
344be positioned centered just below one of its
345siblings by specifying the configuration
346.PP
347\&\ \fB\-in\fR=>\fI$sibling\fR, \fB\-relx\fR=>0.5, \fB\-rely\fR=>1.0,
348\&\fB\-anchor\fR=>'n', \fB\-bordermode\fR=>'outside'
349.PP
350Whenever the \fI$sibling\fR widget is repositioned in the future, the slave
351will be repositioned as well.
352.PP
353Unlike many other geometry managers (such as the packer)
354the placer does not make any attempt to manipulate the geometry of
355the master windows or the parents of slave windows (i.e. it doesn't
356set their requested sizes).
357To control the sizes of these windows, make them windows like
358frames and canvases that provide configuration options for this purpose.
359.SH "SEE ALSO"
360.IX Header "SEE ALSO"
361Tk::form
362Tk::grid
363Tk::pack
364.SH "KEYWORDS"
365.IX Header "KEYWORDS"
366geometry manager, height, location, master, place, rubber sheet, slave, width