OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [panedwindow.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1995 DSC Technologies Corporation
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" @(#) panedwindow.n 1.21 94/12/17 16:04:44
8
'/"
9
.so man.macros
10
.HS panedwindow iwid
11
.BS
12
'\" Note:  do not modify the .SH NAME line immediately below!
13
.SH NAME
14
panedwindow \- Create and manipulate a paned window widget
15
.SH SYNOPSIS
16
\fBpanedwindow\fI \fIpathName \fR?\fIoptions\fR?
17
.SH "INHERITANCE"
18
itk::Widget <- panedwindow
19
.SH "STANDARD OPTIONS"
20
.LP
21
.nf
22
.ta 4c 8c 12c
23
\fBbackground\fR        \fBcursor\fR
24
.fi
25
.LP
26
See the "options" manual entry for details on the standard options.
27
.SH "WIDGET-SPECIFIC OPTIONS"
28
.LP
29
.nf
30
Name:   \fBheight\fR
31
Class:  \fBHeight\fR
32
Command-Line Switch:    \fB-height\fR
33
.fi
34
.IP
35
Specifies the overall height of the paned window in any of the forms
36
acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels.
37
.LP
38
.nf
39
Name:   \fBorient\fR
40
Class:  \fBOrient\fR
41
Command-Line Switch:    \fB-orient\fR
42
.fi
43
.IP
44
Specifies the orientation of the separators: \fBvertical\fR or
45
\fBhorizontal\fR.  The default is horizontal.
46
.LP
47
.nf
48
Name:   \fBsashBorderWidth\fR
49
Class:  \fBBorderWidth\fR
50
Command-Line Switch:    \fB-sashborderwidth\fR
51
.fi
52
.IP
53
Specifies a value indicating the width of the 3-D border to draw
54
around the outside of the sash in any of the forms acceptable to
55
\fBTk_GetPixels\fR.  The default is 2 pixels.
56
.LP
57
.nf
58
Name:   \fBsashCursor\fR
59
Class:  \fBCursor\fR
60
Command-Line Switch:    \fB-sashcursor\fR
61
.fi
62
.IP
63
Specifies the type of cursor to be displayed in the sash.  The default
64
is crosshair.
65
.LP
66
.nf
67
Name:   \fBsashHeight\fR
68
Class:  \fBHeight\fR
69
Command-Line Switch:    \fB-sashheight\fR
70
.fi
71
.IP
72
Specifies the height of the sash in any of the forms acceptable to
73
\fBTk_GetPixels\fR.  The default is 10 pixels.
74
.LP
75
.nf
76
Name:   \fBsashIndent\fR
77
Class:  \fBSashIndent\fR
78
Command-Line Switch     \fBsashindent\fR
79
.fi
80
.IP
81
Specifies the placement of the sash along the panes in any of the forms
82
acceptable to \fBTk_GetPixels\fR.  A positive
83
value causes the sash to be offset from the near (left/top) side
84
of the pane, and a negative value causes the sash to be offset from
85
the far (right/bottom) side.  If the offset is greater than the
86
width, then the sash is placed flush against the side.  The
87
default is -10 pixels.
88
.LP
89
.nf
90
Name:   \fBsashWidth\fR
91
Class:  \fBWidth\fR
92
Command-Line Switch:    \fB-sashwidth\fR
93
.fi
94
.IP
95
Specifies the width of the sash in any of the forms acceptable to
96
\fBTk_GetPixels\fR.  The default is 10 pixels.
97
.LP
98
.nf
99
Name:   \fBthickness\fR
100
Class:  \fBThickness\fR
101
Command-Line Switch:    \fB-thickness\fR
102
.fi
103
.IP
104
Specifies the thickness of the separators in any of the forms acceptable to
105
\fBTk_GetPixels\fR.  The default is 3 pixels.
106
.LP
107
.LP
108
.nf
109
Name:   \fBwidth\fR
110
Class:  \fBWidth\fR
111
Command-Line Switch:    \fB-width\fR
112
.fi
113
.IP
114
Specifies the overall width of the paned window in any of the forms
115
acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels.
116
.LP
117
.BE
118
 
119
.SH DESCRIPTION
120
.PP
121
The \fBpanedwindow\fR command creates a multiple paned window widget
122
capable of orienting the panes
123
either vertically or horizontally.  Each pane is itself a frame acting
124
as a child site for other widgets.  The border separating each pane
125
contains a sash which allows user positioning of the panes relative to
126
one another.
127
 
128
.SH "METHODS"
129
.PP
130
The \fBpanedwindow\fR command creates a new Tcl command whose
131
name is \fIpathName\fR.  This
132
command may be used to invoke various
133
operations on the widget.  It has the following general form:
134
.DS C
135
\fIpathName option \fR?\fIarg arg ...\fR?
136
.DE
137
\fIOption\fR and the \fIarg\fRs
138
determine the exact behavior of the command.
139
.PP
140
Many of the widget commands for the \fBpanedwindow\fR take as one argument an
141
indicator of which pane of the paned window to operate on.  These indicators
142
are called \fIindexes\fR and allow reference and manipulation of panes
143
regardless of their current map state.  Paned window indexes may be
144
specified in any of the following forms:
145
.TP 12
146
\fInumber\fR
147
Specifies the pane numerically, where 0 corresponds to the nearest
148
(top/left-most) pane of the paned window.
149
.TP 12
150
\fBend\fR
151
Indicates the farthest (bottom/right-most) pane of the paned window.
152
.TP 12
153
\fIpattern\fR
154
If the index doesn't satisfy one of the above forms then this
155
form is used.  \fIPattern\fR is pattern-matched against the tag of
156
each pane in the panedwindow, in order from left/top to right/left,
157
until a matching entry is found.  The rules of \fBTcl_StringMatch\fR
158
are used.
159
 
160
.SH "WIDGET-SPECIFIC METHODS"
161
.TP
162
\fIpathName \fBadd\fR \fItag\fR ?\fIoption value option value\fR?
163
Adds a new pane to the paned window on the far side (right/bottom).  The
164
following options may be specified:
165
.RS
166
.TP
167
\fB-margin\fR \fIvalue\fR
168
Specifies the border distance between the pane and pane contents is any of
169
the forms acceptable to \fBTk_GetPixels\fR.  The default is 8 pixels.
170
.TP
171
\fB-minimum\fR \fIvalue\fR
172
Specifies the minimum size that a pane's contents may reach not
173
inclusive of twice the margin in any of the forms acceptable to
174
\fBTk_GetPixels\fR.  The default is 10 pixels.
175
 
176
The \fBadd\fR method returns the path name of the pane.
177
.RE
178
.TP
179
\fIpathName \fBcget\fR \fIoption\fR
180
Returns the current value of the configuration option given
181
by \fIoption\fR.
182
\fIOption\fR may have any of the values accepted by the \fBpanedwindow\fR
183
command.
184
.TP
185
\fIpathName \fBchildsite\fR ?\fIindex\fR?
186
Returns a list of the child site path names or a specific child site given
187
an index.  The list is constructed from the near side (left/top) to the far
188
side (right/bottom).
189
.TP
190
\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
191
Query or modify the configuration options of the widget.
192
If no \fIoption\fR is specified, returns a list describing all of
193
the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
194
information on the format of this list).  If \fIoption\fR is specified
195
with no \fIvalue\fR, then the command returns a list describing the
196
one named option (this list will be identical to the corresponding
197
sublist of the value returned if no \fIoption\fR is specified).  If
198
one or more \fIoption\-value\fR pairs are specified, then the command
199
modifies the given widget option(s) to have the given value(s);  in
200
this case the command returns an empty string.
201
\fIOption\fR may have any of the values accepted by the \fBpanedwindow\fR
202
command.
203
.TP
204
\fIpathName \fBdelete\fR \fIindex\fR
205
Deletes a specified pane given an \fIindex\fR.
206
.TP
207
\fIpathName \fBfraction\fR \fIpercentage\fR \fIpercentage\fR ?\fIpercentage percentage ...\fR?
208
Sets the visible percentage of the panes.  Specifies a set of
209
percentages which are applied to the visible panes from the near side
210
(left/top).  The number of percentages must be equal to the current number
211
of visible (mapped) panes and add up to 100.
212
.TP
213
\fIpathName \fBhide\fR \fIindex\fR
214
Changes the visiblity of the specified pane, allowing a previously displayed
215
pane to be visually removed rather than deleted.
216
.TP
217
\fIpathName \fBindex\fR \fIindex\fR
218
Returns the numerical index corresponding to index.
219
.TP
220
\fIpathName \fBinsert \fIindex\fR \fItag\fR ?\fIoption value option value ...\fR?
221
Same as the \fBadd\fR command except that it inserts the new
222
pane just before the one given by \fIindex\fR, instead of appending
223
to the end of the panedwindow.  The \fIoption\fR, and \fIvalue\fR
224
arguments have the same interpretation as for the \fBadd\fR widget
225
command.
226
.TP
227
\fIpathName \fBpaneconfigure\fR \fIindex\fR ?\fIoptions\fR?
228
This command is similar to the \fBconfigure\fR command, except that
229
it applies to the options for an individual pane, whereas \fBconfigure\fR
230
applies to the options for the paned window as a whole.
231
\fIOptions\fR may have any of the values accepted by the \fBadd\fR
232
widget command.  If \fIoptions\fR are specified, options are modified
233
as indicated in the command and the command returns an empty string.
234
If no \fIoptions\fR are specified, returns a list describing
235
the current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR for
236
information on the format of this list).
237
.TP
238
\fIpathName \fBreset\fR
239
Redisplays the pane window using default percentages.
240
.TP
241
\fIpathName \fBshow\fR \fIindex\fR
242
Changes the visiblity of the specified pane, allowing a previously hidden
243
pane to be displayed.
244
 
245
.SH "NOTES"
246
.IP
247
Dynamic changing of the margin and or minimum options to values which
248
make the current configuration invalid will block subsequent sash
249
movement until the fractions are modified via the fraction method.
250
For example a panedwindow is created with three panes and the minimum
251
and margin options are at their default settings.  Next the user moves
252
the sashes to compact the panes to one side.  Now, if the minimum is
253
increased on the most compressed pane via the paneconfigure method to
254
a large enough value, then sash movement is blocked
255
until the fractions are adjusted.  This situation is unusual and under
256
normal operation of the panedwindow, this problem will never occur.
257
.LP
258
 
259
.SH EXAMPLE
260
.DS
261
 panedwindow .pw -width 300 -height 300
262
 .pw add top
263
 .pw add middle -margin 10
264
 .pw add bottom -margin 10 -minimum 10
265
 
266
 pack .pw -fill both -expand yes
267
 
268
 foreach pane [.pw childSite] {
269
    button $pane.b -text $pane -relief raised -borderwidth 2
270
    pack $pane.b -fill both -expand yes
271
 }
272
 
273
 .pw fraction 50 30 20
274
 .pw paneconfigure 0 -minimum 20
275
 .pw paneconfigure bottom -margin 15
276
.DE
277
.SH ACKNOWLEDGEMENTS:
278
.LP
279
Jay Schmidgall
280
.IP
281
1994 - Base logic posted to comp.lang.tcl
282
.LP
283
Joe Hidebrand 
284
.IP
285
07/25/94 - Posted first multipane version to comp.lang.tcl
286
.LP
287
.IP
288
07/28/94 - Added support for vertical panes
289
.LP
290
Ken Copeland 
291
.IP
292
09/28/95 - Smoothed out the sash movement and added squeezable panes.
293
.LP
294
.SH AUTHOR
295
Mark L. Ulferts
296
.SH KEYWORDS
297
panedwindow, widget

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.