Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 196 lines (195 sloc) 7.875 kB
1324262 Initial revision
rjohnson authored
1 '\"
2 '\" Copyright (c) 1990-1994 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 .so man.macros
9 .TH pack-old n 4.0 Tk "Tk Built-In Commands"
10 .BS
11 '\" Note: do not modify the .SH NAME line immediately below!
12 .SH NAME
dda73bc changed the internal name to pack-old to avoid a name clash with the …
rmax authored
13 pack-old \- Obsolete syntax for packer geometry manager
1324262 Initial revision
rjohnson authored
14 .SH SYNOPSIS
15 \fBpack after \fIsibling \fIwindow options\fR ?\fIwindow options \fR...?
16 .sp
17 \fBpack append \fIparent \fIwindow options\fR ?\fIwindow options \fR...?
18 .sp
19 \fBpack before \fIsibling \fIwindow options\fR ?\fIwindow options \fR...?
20 .sp
21 \fBpack unpack \fIwindow\fR
22 .BE
23 .SH DESCRIPTION
24 .PP
25 \fINote: this manual entry describes the syntax for the \fBpack\fI
26 command as it existed before Tk version 3.3.
27 Although this syntax continues to be supported for backward
28 compatibility, it is obsolete and should not be used anymore.
29 At some point in the future it may cease to be supported.\fR
30 .PP
31 The packer is a geometry manager that arranges the
32 children of a parent by packing them in order around the edges of
33 the parent. The first child is placed against one side of
34 the window, occupying the entire span of the window along that
35 side. This reduces the space remaining for other children as
36 if the side had been moved in by the size of the first child.
37 Then the next child is placed against one side of the remaining
38 cavity, and so on until all children have been placed or there
39 is no space left in the cavity.
40 .PP
41 The \fBbefore\fR, \fBafter\fR, and \fBappend\fR forms of the \fBpack\fR
42 command are used to insert one or more children into the packing order
43 for their parent. The \fBbefore\fR form inserts the children before
44 window \fIsibling\fR in the order; all of the other windows must be
45 siblings of \fIsibling\fR. The \fBafter\fR form inserts the windows
46 after \fIsibling\fR, and the \fBappend\fR form appends one or more
47 windows to the end of the packing order for \fIparent\fR. If a
48 \fIwindow\fR named in any of these commands is already packed in
49 its parent, it is removed from its current position in the packing
50 order and repositioned as indicated by the command. All of these
51 commands return an empty string as result.
52 .PP
53 The \fBunpack\fR form of the \fBpack\fR command removes \fIwindow\fR
54 from the packing order of its parent and unmaps it. After the
55 execution of this command the packer will no longer manage
56 \fIwindow\fR's geometry.
57 .PP
58 The placement of each child is actually a four-step process;
59 the \fIoptions\fR argument following each \fIwindow\fR consists of
60 a list of one or more fields that govern the placement of that
61 window. In the discussion below, the term \fIcavity\fR refers
62 to the space left in a parent when a particular child is placed
78279a9 Lots more GOOBE stuff. Now works with 'make html'!
dkf authored
63 (i.e. all the space that was not claimed by earlier children in
1324262 Initial revision
rjohnson authored
64 the packing order). The term \fIparcel\fR refers to the space
65 allocated to a particular child; this is not necessarily the
66 same as the child window's final geometry.
67 .PP
68 The first step in placing a child is to determine which side of
69 the cavity it will lie against. Any one of the following options
70 may be used to specify a side:
71 .TP
72 \fBtop\fR
73 Position the child's parcel against the top of the cavity,
74 occupying the full width of the cavity.
75 .TP
76 \fBbottom\fR
77 Position the child's parcel against the bottom of the cavity,
78 occupying the full width of the cavity.
79 .TP
80 \fBleft\fR
81 Position the child's parcel against the left side of the cavity,
82 occupying the full height of the cavity.
83 .TP
84 \fBright\fR
85 Position the child's parcel against the right side of the cavity,
86 occupying the full height of the cavity.
87 .LP
88 At most one of these options should be specified for any given window.
89 If no side is specified, then the default is \fBtop\fR.
90 .PP
91 The second step is to decide on a parcel for the child. For \fBtop\fR
92 and \fBbottom\fR windows, the desired parcel width is normally the cavity
93 width and the desired parcel height is the window's requested height,
94 as passed to \fBTk_GeometryRequest\fR. For \fBleft\fR and \fBright\fR
95 windows, the desired parcel height is normally the cavity height and the
96 desired width is the window's requested width. However, extra
97 space may be requested for the window using any of the following
98 options:
99 .TP 12
100 \fBpadx \fInum\fR
101 Add \fInum\fR pixels to the window's requested width before computing
102 the parcel size as described above.
103 .TP 12
104 \fBpady \fInum\fR
105 Add \fInum\fR pixels to the window's requested height before computing
106 the parcel size as described above.
107 .TP 12
108 \fBexpand\fR
109 This option requests that the window's parcel absorb any extra space left over
110 in the parent's cavity after packing all the children.
111 The amount of space left over depends on the sizes requested by the
112 other children, and may be zero. If several windows have all specified
113 \fBexpand\fR then the extra width will be divided equally among all the
114 \fBleft\fR and \fBright\fR windows that specified \fBexpand\fR and
115 the extra height will be divided equally among all the \fBtop\fR and
116 \fBbottom\fR windows that specified \fBexpand\fR.
117 .LP
118 If the desired width or height for a parcel is larger than the corresponding
119 dimension of the cavity, then the cavity's dimension is used instead.
120 .PP
121 The third step in placing the window is to decide on the window's
122 width and height. The default is for the window to receive either
123 its requested width and height or the those of the parcel, whichever
124 is smaller. If the parcel is larger than the window's requested
125 size, then the following options may be used to expand the
126 window to partially or completely fill the parcel:
127 .TP
128 \fBfill\fR
129 Set the window's size to equal the parcel size.
130 .TP
131 \fBfillx\fR
132 Increase the window's width to equal the parcel's width, but retain
133 the window's requested height.
134 .TP
135 \fBfilly\fR
136 Increase the window's height to equal the parcel's height, but retain
137 the window's requested width.
138 .PP
139 The last step is to decide the window's location within its parcel.
140 If the window's size equals the parcel's size, then the window simply
141 fills the entire parcel. If the parcel is larger than the window,
142 then one of
143 the following options may be used to specify where the window should
144 be positioned within its parcel:
145 .TP 15
146 \fBframe center\fR
147 Center the window in its parcel. This is the default if no framing
148 option is specified.
149 .TP 15
150 \fBframe n\fR
151 Position the window with its top edge centered on the top edge of
152 the parcel.
153 .TP 15
154 \fBframe ne\fR
155 Position the window with its upper-right corner at the upper-right corner
156 of the parcel.
157 .TP 15
158 \fBframe e\fR
159 Position the window with its right edge centered on the right edge of
160 the parcel.
161 .TP 15
162 \fBframe se\fR
163 Position the window with its lower-right corner at the lower-right corner
164 of the parcel.
165 .TP 15
166 \fBframe s\fR
167 Position the window with its bottom edge centered on the bottom edge of
168 the parcel.
169 .TP 15
170 \fBframe sw\fR
171 Position the window with its lower-left corner at the lower-left corner
172 of the parcel.
173 .TP 15
174 \fBframe w\fR
175 Position the window with its left edge centered on the left edge of
176 the parcel.
177 .TP 15
178 \fBframe nw\fR
179 Position the window with its upper-left corner at the upper-left corner
180 of the parcel.
181 .PP
182 The packer manages the mapped/unmapped state of all the packed
183 children windows. It automatically maps the windows when it packs
184 them, and it unmaps any windows for which there was no space left
185 in the cavity.
186 .PP
187 The packer makes geometry requests on behalf of the parent windows
188 it manages. For each parent window it requests a size large enough
189 to accommodate all the options specified by all the packed children,
190 such that zero space would be leftover for \fBexpand\fR options.
191 .SH KEYWORDS
192 geometry manager, location, packer, parcel, size
a255662 Fix [Bug 2118116]
dkf authored
193 '\" Local Variables:
194 '\" mode: nroff
195 '\" End:
Something went wrong with that request. Please try again.