OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tk8.6.12 / doc / panedwindow.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 .TH panedwindow n 8.4 Tk "Tk Built-In Commands"
9 .so man.macros
10 .BS
11 '\" Note:  do not modify the .SH NAME line immediately below!
12 .SH NAME
13 panedwindow \- Create and manipulate 'panedwindow' split container widgets
14 .SH SYNOPSIS
15 \fBpanedwindow\fR \fIpathName \fR?\fIoptions\fR?
16 .SO
17 \-background    \-borderwidth   \-cursor
18 \-orient        \-relief
19 .SE
20 .SH "WIDGET-SPECIFIC OPTIONS"
21 .OP \-handlepad handlePad HandlePad
22 When sash handles are drawn, specifies the distance from the top or
23 left end of the sash (depending on the orientation of the widget) at
24 which to draw the handle.  May be any value accepted by \fBTk_GetPixels\fR.
25 .OP \-handlesize handleSize HandleSize
26 Specifies the side length of a sash handle.  Handles are always
27 drawn as squares.  May be any value accepted by \fBTk_GetPixels\fR.
28 .OP \-height height Height
29 Specifies a desired height for the overall panedwindow widget. May be any
30 value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be
31 made high enough to allow all contained widgets to have their natural height.
32 .OP \-opaqueresize opaqueResize OpaqueResize
33 Specifies whether panes should be resized as a sash is moved (true),
34 or if resizing should be deferred until the sash is placed (false).
35 In the latter case, a
36 .QW ghost
37 version of the sash is displayed during the resizing to show where the
38 panes will be resized to when releasing the mouse button. This
39 .QW ghost
40 version of the sash is the proxy. It's rendering can be configured
41 using the \fB-proxybackground\fR, \fB-proxyborderwidth\fR and
42 \fB-proxyrelief\fR options.
43 .OP \-proxybackground proxyBackground ProxyBackground
44 Background color to use when drawing the proxy. If an empty string, the
45 value of the \fB-background\fR option will be used.
46 .OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth
47 Specifies the borderwidth of the proxy. May be any value accepted by
48 \fBTk_GetPixels\fR.
49 .OP \-proxyrelief proxyRelief ProxyRelief
50 Relief to use when drawing the proxy. May be any of the standard Tk
51 relief values. If an empty string, the value of the \fB-sashrelief\fR
52 option will be used.
53 .OP \-sashcursor sashCursor SashCursor
54 Mouse cursor to use when over a sash.  If null,
55 \fBsb_h_double_arrow\fR will be used for horizontal panedwindows, and
56 \fBsb_v_double_arrow\fR will be used for vertical panedwindows.
57 .OP \-sashpad sashPad SashPad
58 Specifies the amount of padding to leave of each side of a sash.  May
59 be any value accepted by \fBTk_GetPixels\fR.
60 .OP \-sashrelief sashRelief SashRelief
61 Relief to use when drawing a sash.  May be any of the standard Tk
62 relief values.
63 .OP \-sashwidth sashWidth SashWidth
64 Specifies the width of each sash.  May be any value accepted by
65 \fBTk_GetPixels\fR.
66 .OP \-showhandle showHandle ShowHandle
67 Specifies whether sash handles should be shown.  May be any valid Tcl
68 boolean value.
69 .OP \-width width Width
70 Specifies a desired width for the overall panedwindow widget. May be any
71 value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be
72 made wide enough to allow all contained widgets to have their natural width.
73 .BE
74 .SH DESCRIPTION
75 .PP
76 The \fBpanedwindow\fR command creates a new window (given by the
77 \fIpathName\fR argument) and makes it into a panedwindow widget.
78 Additional options, described above, may be specified on the command
79 line or in the option database to configure aspects of the panedwindow
80 such as its default background color and relief.  The
81 \fBpanedwindow\fR command returns the path name of the new window.
82 .PP
83 A panedwindow widget contains any number of panes, arranged
84 horizontally or vertically, according to the value of the
85 \fB\-orient\fR option.  Each pane contains one widget, and each pair of
86 panes is separated by a moveable (via mouse movements) sash.  Moving a
87 sash causes the widgets on either side of the sash to be resized.
88 .SH "WIDGET COMMAND"
89 .PP
90 The \fBpanedwindow\fR command creates a new Tcl command whose name is
91 the same as the path name of the panedwindow's window.  This command
92 may be used to invoke various operations on the widget.  It has the
93 following general form:
94 .CS
95 \fIpathName option \fR?\fIarg arg ...\fR?
96 .CE
97 \fIPathName\fR is the name of the command, which is the same as
98 the panedwindow widget's path name.  \fIOption\fR and the \fIarg\fRs
99 determine the exact behavior of the command.  The following
100 commands are possible for panedwindow widgets:
101 .TP
102 \fIpathName \fBadd \fIwindow \fR?\fIwindow ...\fR? ?\fIoption value ...\fR?
103 .
104 Add one or more windows to the panedwindow, each in a separate pane.
105 The arguments consist of the names of one or more windows
106 followed by pairs of arguments that specify how to manage the windows.
107 \fIOption\fR may have any of the values accepted by the
108 \fBconfigure\fR subcommand.
109 .TP
110 \fIpathName \fBcget \fIoption\fR
111 .
112 Returns the current value of the configuration option given by
113 \fIoption\fR.  \fIOption\fR may have any of the values accepted by the
114 \fBpanedwindow\fR command.
115 .TP
116 \fIpathName \fBconfigure \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
117 .
118 Query or modify the configuration options of the widget.  If no
119 \fIoption\fR is specified, returns a list describing all of the
120 available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
121 information on the format of this list).  If \fIoption\fR is specified
122 with no \fIvalue\fR, then the command returns a list describing the
123 one named option (this list will be identical to the corresponding
124 sublist of the value returned if no \fIoption\fR is specified).  If
125 one or more \fIoption\-value\fR pairs are specified, then the command
126 modifies the given widget option(s) to have the given value(s);  in
127 this case the command returns an empty string. \fIOption\fR may have
128 any of the values accepted by the \fBpanedwindow\fR command.
129 .TP
130 \fIpathName \fBforget \fIwindow \fR?\fIwindow ...\fR?
131 .
132 Remove the pane containing \fIwindow\fR from the panedwindow.  All
133 geometry management options for \fIwindow\fR will be forgotten.
134 .TP
135 \fIpathName \fBidentify \fIx y\fR
136 .
137 Identify the panedwindow component underneath the point given by
138 \fIx\fR and \fIy\fR, in window coordinates.  If the point is over a
139 sash or a sash handle, the result is a two element list containing the
140 index of the sash or handle, and a word indicating whether it is over
141 a sash or a handle, such as {0 sash} or {2 handle}.  If the point is
142 over any other part of the panedwindow, the result is an empty list.
143 .TP
144 \fIpathName \fBpanecget \fIwindow option\fR
145 .
146 Query a management option for \fIwindow\fR.  \fIOption\fR may be any
147 value allowed by the \fBpaneconfigure\fR subcommand.
148 .TP
149 \fIpathName \fBpaneconfigure \fIwindow \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
150 .
151 Query or modify the management options for \fIwindow\fR.  If no
152 \fIoption\fR is specified, returns a list describing all of the
153 available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
154 information on the format of this list).  If \fIoption\fR is specified
155 with no \fIvalue\fR, then the command returns a list describing the
156 one named option (this list will be identical to the corresponding
157 sublist of the value returned if no \fIoption\fR is specified).  If
158 one or more \fIoption\-value\fR pairs are specified, then the command
159 modifies the given widget option(s) to have the given value(s);  in
160 this case the command returns an empty string.  The following options
161 are supported:
162 .RS
163 .TP
164 \fB\-after \fIwindow\fR
165 .
166 Insert the window after the window specified.  \fIwindow\fR should be the
167 name of a window already managed by \fIpathName\fR.
168 .TP
169 \fB\-before \fIwindow\fR
170 .
171 Insert the window before the window specified.  \fIwindow\fR should be
172 the name of a window already managed by \fIpathName\fR.
173 .TP
174 \fB\-height \fIsize\fR
175 .
176 Specify a height for the window.  The height will be the outer
177 dimension of the window including its border, if any.  If \fIsize\fR
178 is an empty string, or if \fB\-height\fR is not specified, then the
179 height requested internally by the window will be used initially; the
180 height may later be adjusted by the movement of sashes in the
181 panedwindow.  \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
182 .TP
183 \fB\-hide \fIboolean\fR
184 .
185 Controls the visibility of a pane.  When the \fIboolean\fR is true
186 (according to \fBTcl_GetBoolean\fR) the pane will not be visible, but
187 it will still be maintained in the list of panes.
188 .TP
189 \fB\-minsize \fIn\fR
190 .
191 Specifies that the size of the window cannot be made less than
192 \fIn\fR.  This constraint only affects the size of the widget in the
193 paned dimension \(em the x dimension for horizontal panedwindows, the y
194 dimension for vertical panedwindows.  May be any value accepted by
195 \fBTk_GetPixels\fR.
196 .TP
197 \fB\-padx \fIn\fR
198 .
199 Specifies a non-negative value indicating how much extra space to
200 leave on each side of the window in the X-direction.  The value may
201 have any of the forms accepted by \fBTk_GetPixels\fR.
202 .TP
203 \fB\-pady \fIn\fR
204 .
205 Specifies a non-negative value indicating how much extra space to
206 leave on each side of the window in the Y-direction.  The value may
207 have any of the forms accepted by \fBTk_GetPixels\fR.
208 .TP
209 \fB\-sticky \fIstyle\fR
210 .
211 If a window's pane is larger than the requested dimensions of the
212 window, this option may be used to position (or stretch) the window
213 within its pane.  \fIStyle\fR  is a string that contains zero or more
214 of the characters \fBn\fR, \fBs\fR, \fBe\fR or \fBw\fR.  The string
215 can optionally contains spaces or commas, but they are ignored.  Each
216 letter refers to a side (north, south, east, or west) that the window
217 will
218 .QW stick
219 to.  If both \fBn\fR and \fBs\fR (or \fBe\fR and \fBw\fR)
220 are specified, the window will be stretched to fill the entire height
221 (or width) of its cavity.
222 .TP
223 \fB\-stretch \fIwhen\fR
224 .
225 Controls how extra space is allocated to each of the panes.
226 \fIWhen\fR is one of \fBalways\fR, \fBfirst\fR, \fBlast\fR,
227 \fBmiddle\fR, and \fBnever\fR.
228 The panedwindow will calculate the required size of all its panes. Any
229 remaining (or deficit) space will be distributed to those panes marked
230 for stretching. The space will be distributed based on each panes
231 current ratio of the whole.  The \fIwhen\fR values have the following
232 definition:
233 .RS
234 .TP
235 \fBalways\fR
236 .
237 This pane will always stretch.
238 .TP
239 \fBfirst\fR
240 .
241 Only if this pane is the first pane (left-most or top-most) will it
242 stretch.
243 .TP
244 \fBlast\fR
245 .
246 Only if this pane is the last pane (right-most or bottom-most) will it
247 stretch.  This is the default value.
248 .TP
249 \fBmiddle\fR
250 .
251 Only if this pane is not the first or last pane will it stretch.
252 .TP
253 \fBnever\fR
254 .
255 This pane will never stretch.
256 .RE
257 .TP
258 \fB\-width \fIsize\fR
259 .
260 Specify a width for the window.  The width will be the outer
261 dimension of the window including its border, if any.  If \fIsize\fR
262 is an empty string, or if \fB\-width\fR is not specified, then the
263 width requested internally by the window will be used initially; the
264 width may later be adjusted by the movement of sashes in the
265 panedwindow.  \fISize\fR may be any value accepted by \fBTk_GetPixels\fR.
266 .RE
267 .TP
268 \fIpathName \fBpanes\fR
269 .
270 Returns an ordered list of the widgets managed by \fIpathName\fR.
271 .TP
272 \fIpathName \fBproxy \fR?\fIargs\fR?
273 .
274 This command is used to query and change the position of the sash
275 proxy, used for rubberband-style pane resizing. It can take any of
276 the following forms:
277 .RS
278 .TP
279 \fIpathName \fBproxy coord\fR
280 .
281 Return a list containing the x and y coordinates of the most recent
282 proxy location.
283 .TP
284 \fIpathName \fBproxy forget\fR
285 .
286 Remove the proxy from the display.
287 .TP
288 \fIpathName \fBproxy place \fIx y\fR
289 .
290 Place the proxy at the given \fIx\fR and \fIy\fR coordinates.
291 .RE
292 .TP
293 \fIpathName \fBsash \fR?\fIargs\fR?
294 This command is used to query and change the position of sashes in the
295 panedwindow.  It can take any of the following forms:
296 .RS
297 .TP
298 \fIpathName \fBsash coord \fIindex\fR
299 .
300 Return the current x and y coordinate pair for the sash given by
301 \fIindex\fR.  \fIIndex\fR must be an integer between 0 and 1 less than
302 the number of panes in the panedwindow.  The coordinates given are
303 those of the top left corner of the region containing the sash.
304 .TP
305 \fIpathName \fBsash dragto \fIindex x y\fR
306 .
307 This command computes the difference between the given coordinates and the
308 coordinates given to the last \fBsash mark\fR command for the given
309 sash.  It then moves that sash the computed difference.  The return
310 value is the empty string.
311 .TP
312 \fIpathName \fBsash mark \fIindex x y\fR
313 .
314 Records \fIx\fR and \fIy\fR for the sash given by \fIindex\fR; used in
315 conjunction with later \fBsash dragto\fR commands to move the sash.
316 .TP
317 \fIpathName \fBsash place \fIindex x y\fR
318 .
319 Place the sash given by \fIindex\fR at the given coordinates.
320 .RE
321 .SH "RESIZING PANES"
322 .PP
323 A pane is resized by grabbing the sash (or sash handle if present) and
324 dragging with the mouse.  This is accomplished via mouse motion
325 bindings on the widget.  When a sash is moved, the sizes of the panes
326 on each side of the sash, and thus the widgets in those panes, are
327 adjusted.
328 .PP
329 When a pane is resized from outside (e.g. it is packed to expand and
330 fill, and the containing toplevel is resized), space is added to the final
331 (rightmost or bottommost) pane in the window.
332 .PP
333 Unlike child windows managed by e.g. pack or grid, the panes managed by a
334 panedwindow do not change width or height to accommodate changes in the
335 requested widths or heights of the panes, once these have become mapped.
336 Therefore it may be advisable, particularly when creating layouts
337 interactively, to not add a pane to the panedwindow widget until after the
338 geometry requests of that pane has been finalized (i.e., all components of
339 the pane inserted, all options affecting geometry set to their proper
340 values, etc.).
341 .SH "SEE ALSO"
342 ttk::panedwindow(n)
343 .SH KEYWORDS
344 panedwindow, widget, geometry management
345 '\" Local Variables:
346 '\" mode: nroff
347 '\" End: