OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / man / mann / hierbox.n
1 '\"
2 '\" Copyright 2001-2 by Silicon Metrics Corporation.
3 '\"
4 '\" Permission to use, copy, modify, and distribute this software and its
5 '\" documentation for any purpose and without fee is hereby granted, provided
6 '\" that the above copyright notice appear in all copies and that both that the
7 '\" copyright notice and warranty disclaimer appear in supporting documentation,
8 '\" and that the names of Silicon Metrics or any of their entities not be used
9 '\" in advertising or publicity pertaining to distribution of the software
10 '\" without specific, written prior permission.
11 '\"
12 '\" Silicon Metrics disclaims all warranties with regard to this software,
13 '\" including all implied warranties of merchantability and fitness.  In no event
14 '\" shall Silicon Metrics be liable for any special, indirect or
15 '\" consequential damages or any damages whatsoever resulting from loss of use,
16 '\" data or profits, whether in an action of contract, negligence or other
17 '\" tortuous action, arising out of or in connection with the use or performance
18 '\" of this software.  
19 '\"
20 '\" The hierarchical table widget created by George Howlett.
21 '\"
22 '\" The definitions below are for supplemental macros used in Tcl/Tk
23 '\" manual entries.
24 '\"
25 '\" .AP type name in/out ?indent?
26 '\"     Start paragraph describing an argument to a library procedure.
27 '\"     type is type of argument (int, etc.), in/out is either "in", "out",
28 '\"     or "in/out" to describe whether procedure reads or modifies arg,
29 '\"     and indent is equivalent to second arg of .IP (shouldn't ever be
30 '\"     needed;  use .AS below instead)
31 '\"
32 '\" .AS ?type? ?name?
33 '\"     Give maximum sizes of arguments for setting tab stops.  Type and
34 '\"     name are examples of largest possible arguments that will be passed
35 '\"     to .AP later.  If args are omitted, default tab stops are used.
36 '\"
37 '\" .BS
38 '\"     Start box enclosure.  From here until next .BE, everything will be
39 '\"     enclosed in one large box.
40 '\"
41 '\" .BE
42 '\"     End of box enclosure.
43 '\"
44 '\" .CS
45 '\"     Begin code excerpt.
46 '\"
47 '\" .CE
48 '\"     End code excerpt.
49 '\"
50 '\" .VS ?version? ?br?
51 '\"     Begin vertical sidebar, for use in marking newly-changed parts
52 '\"     of man pages.  The first argument is ignored and used for recording
53 '\"     the version when the .VS was added, so that the sidebars can be
54 '\"     found and removed when they reach a certain age.  If another argument
55 '\"     is present, then a line break is forced before starting the sidebar.
56 '\"
57 '\" .VE
58 '\"     End of vertical sidebar.
59 '\"
60 '\" .DS
61 '\"     Begin an indented unfilled display.
62 '\"
63 '\" .DE
64 '\"     End of indented unfilled display.
65 '\"
66 '\" .SO
67 '\"     Start of list of standard options for a Tk widget.  The
68 '\"     options follow on successive lines, in four columns separated
69 '\"     by tabs.
70 '\"
71 '\" .SE
72 '\"     End of list of standard options for a Tk widget.
73 '\"
74 '\" .OP cmdName dbName dbClass
75 '\"     Start of description of a specific option.  cmdName gives the
76 '\"     option's name as specified in the class command, dbName gives
77 '\"     the option's name in the option database, and dbClass gives
78 '\"     the option's class in the option database.
79 '\"
80 '\" .UL arg1 arg2
81 '\"     Print arg1 underlined, then print arg2 normally.
82 '\"
83 '\" RCS: @(#) $Id: man.macros,v 1.1.1.1 2009/05/09 16:27:42 pcmacdon Exp $
84 '\"
85 '\"     # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
86 .if t .wh -1.3i ^B
87 .nr ^l \n(.l
88 .ad b
89 '\"     # Start an argument description
90 .de AP
91 .ie !"\\$4"" .TP \\$4
92 .el \{\
93 .   ie !"\\$2"" .TP \\n()Cu
94 .   el          .TP 15
95 .\}
96 .ta \\n()Au \\n()Bu
97 .ie !"\\$3"" \{\
98 \&\\$1  \\fI\\$2\\fP    (\\$3)
99 .\".b
100 .\}
101 .el \{\
102 .br
103 .ie !"\\$2"" \{\
104 \&\\$1  \\fI\\$2\\fP
105 .\}
106 .el \{\
107 \&\\fI\\$1\\fP
108 .\}
109 .\}
110 ..
111 '\"     # define tabbing values for .AP
112 .de AS
113 .nr )A 10n
114 .if !"\\$1"" .nr )A \\w'\\$1'u+3n
115 .nr )B \\n()Au+15n
116 .\"
117 .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
118 .nr )C \\n()Bu+\\w'(in/out)'u+2n
119 ..
120 .AS Tcl_Interp Tcl_CreateInterp in/out
121 '\"     # BS - start boxed text
122 '\"     # ^y = starting y location
123 '\"     # ^b = 1
124 .de BS
125 .br
126 .mk ^y
127 .nr ^b 1u
128 .if n .nf
129 .if n .ti 0
130 .if n \l'\\n(.lu\(ul'
131 .if n .fi
132 ..
133 '\"     # BE - end boxed text (draw box now)
134 .de BE
135 .nf
136 .ti 0
137 .mk ^t
138 .ie n \l'\\n(^lu\(ul'
139 .el \{\
140 .\"     Draw four-sided box normally, but don't draw top of
141 .\"     box if the box started on an earlier page.
142 .ie !\\n(^b-1 \{\
143 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
144 .\}
145 .el \}\
146 \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
147 .\}
148 .\}
149 .fi
150 .br
151 .nr ^b 0
152 ..
153 '\"     # VS - start vertical sidebar
154 '\"     # ^Y = starting y location
155 '\"     # ^v = 1 (for troff;  for nroff this doesn't matter)
156 .de VS
157 .if !"\\$2"" .br
158 .mk ^Y
159 .ie n 'mc \s12\(br\s0
160 .el .nr ^v 1u
161 ..
162 '\"     # VE - end of vertical sidebar
163 .de VE
164 .ie n 'mc
165 .el \{\
166 .ev 2
167 .nf
168 .ti 0
169 .mk ^t
170 \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
171 .sp -1
172 .fi
173 .ev
174 .\}
175 .nr ^v 0
176 ..
177 '\"     # Special macro to handle page bottom:  finish off current
178 '\"     # box/sidebar if in box/sidebar mode, then invoked standard
179 '\"     # page bottom macro.
180 .de ^B
181 .ev 2
182 'ti 0
183 'nf
184 .mk ^t
185 .if \\n(^b \{\
186 .\"     Draw three-sided box if this is the box's first page,
187 .\"     draw two sides but no top otherwise.
188 .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
189 .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
190 .\}
191 .if \\n(^v \{\
192 .nr ^x \\n(^tu+1v-\\n(^Yu
193 \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
194 .\}
195 .bp
196 'fi
197 .ev
198 .if \\n(^b \{\
199 .mk ^y
200 .nr ^b 2
201 .\}
202 .if \\n(^v \{\
203 .mk ^Y
204 .\}
205 ..
206 '\"     # DS - begin display
207 .de DS
208 .RS
209 .nf
210 .sp
211 ..
212 '\"     # DE - end display
213 .de DE
214 .fi
215 .RE
216 .sp
217 ..
218 '\"     # SO - start of list of standard options
219 .de SO
220 .SH "STANDARD OPTIONS"
221 .LP
222 .nf
223 .ta 4c 8c 12c
224 .ft B
225 ..
226 '\"     # SE - end of list of standard options
227 .de SE
228 .fi
229 .ft R
230 .LP
231 See the \\fBoptions\\fR manual entry for details on the standard options.
232 ..
233 '\"     # OP - start of full description for a single option
234 .de OP
235 .LP
236 .nf
237 .ta 4c
238 Command-Line Name:      \\fB\\$1\\fR
239 Database Name:  \\fB\\$2\\fR
240 Database Class: \\fB\\$3\\fR
241 .fi
242 .IP
243 ..
244 '\"     # CS - begin code excerpt
245 .de CS
246 .RS
247 .nf
248 .ta .25i .5i .75i 1i
249 .ft CW
250 .sp
251 ..
252 '\"     # CE - end code excerpt
253 .de CE
254 .fi
255 .RE
256 .ft R
257 .sp
258 ..
259 .de UL
260 \\$1\l'|0\(ul'\\$2
261 ..
262 .TH treeview n 2.5 BLT "BLT Built-In Commands"
263 .BS
264 '\" Note:  do not modify the .SH NAME line immediately below!
265 .SH NAME
266 treeview \- Create and manipulate hierarchical table widgets
267 .BE
268 .SH SYNOPSIS
269 \fBtreeview\fR \fIpathName \fR?\fIoptions\fR?
270 .SH DESCRIPTION
271 The \fBtreeview\fR widget displays a tree of data.  It replaces both
272 the \fBhiertable\fR and \fBhierbox\fR widgets.  The \fBtreeview\fR is
273 100% syntax compatible with the \fBhiertable\fR widget.  The
274 \fBhiertable\fR command is retained for sake of script-level
275 compatibility.  This widget obsoletes the \fBhierbox\fR widget.  It
276 does everything the old \fBhierbox\fR widget did, but also provides
277 data sharing (via \fItree data objects\fR) and the ability to tag
278 nodes.
279 .SH INTRODUCTION
280 The \fBtreeview\fR widget displays hierarchical data.  Data is
281 represented as nodes in a general-ordered tree.  Each node may have
282 sub-nodes and these nodes can in turn has their own children.
283 .PP
284 A node is displayed as a row entry in the widget.  Each entry has a
285 text label and icon.  When a node has children, its entry is drawn
286 with a small button to the left of the label.  Clicking the mouse over
287 this button opens or closes the node.  When a node is \fIopen\fR, its
288 children are exposed.  When it is \fIclosed\fR, the children and their
289 descedants are hidden.  The button is normally a \fB+\fR or
290 \fB\-\fR symbol (ala Windows Explorer), but can be replaced with a
291 pair of Tk images (open and closed images).
292 .PP
293 If the node has data associated with it, they can be displayed in
294 columns running vertically on either side the tree.  You can control
295 the color, font, etc of each entry.  Any entry label or data field can
296 be edited in-place.
297 .SH "TREE DATA OBJECT"
298 The tree is not stored inside the widget but in a tree data object
299 (see the \fBtree\fR command for a further explanation).  Tree data
300 objects can be shared among different clients, such as a
301 \fBtreeview\fR widget or the \fBtree\fR command.  You can walk the
302 tree and manage its data with the \fBtree\fR command tree, while
303 displaying it with the \fBtreeview\fR widget.  Whenever the tree is
304 updated, the \fBtreeview\fR widget is automatically redrawn.
305 .PP
306 By default, the \fBtreeview\fR widget creates its own tree object.
307 The tree initially contains just a root node.  But you can also
308 display trees created by the \fBtree\fR command using the \fB\-tree\fR
309 configuration option.  \fBTreeview\fR widgets can share the same tree
310 object, possibly displaying different views of the same data.
311 .PP
312 A tree object has both a Tcl and C API.  You can insert or delete
313 nodes using \fBtreeview\fR widget or \fBtree\fR command operations,
314 but also from C code.  For example, you can load the tree from your C
315 code while still managing and displaying the tree from Tcl. The widget
316 is automatically notified whenever the tree is modified via C or Tcl.
317 .SH SYNTAX
318 .DS
319 \fBtreeview \fIpathName \fR?\fIoption value\fR?...
320 .DE
321 The \fBtreeview\fR command creates a new window \fIpathName\fR and
322 makes it into a \fBtreeview\fR widget.  At the time this command is
323 invoked, there must not exist a window named \fIpathName\fR, but
324 \fIpathName\fR's parent must exist.  Additional options may be
325 specified on the command line or in the option database to configure
326 aspects of the widget such as its colors and font.  See the
327 \fBconfigure\fR operation below for the exact details about what
328 \fIoption\fR and \fIvalue\fR pairs are valid.
329 .PP
330 If successful, \fBtreeview\fR returns the path name of the widget.  It
331 also creates a new Tcl command by the same name.  You can use this
332 command to invoke various operations that query or modify the widget.
333 The general form is:
334 .DS
335 \fIpathName \fIoperation\fR \fR?\fIarg\fR?...
336 .DE
337 Both \fIoperation\fR and its arguments determine the exact behavior of
338 the command.  The operations available are described in the
339 .SB "TREEVIEW OPERATIONS"
340 section.
341 .SH "IDS AND TAGS"
342 Nodes can be inserted into a tree using the \fBtreeview\fR widget 
343 .CS
344 blt::treeview .t
345 set node [.t insert end root "one"]
346 .CE
347 or \fBtree\fR command. 
348 .CS
349 set tree [blt::tree create]
350 set node [$tree insert root "one"]
351 .CE
352 In both cases, a number identifying the node is returned (the value of
353 \fB$node\fR).  This serial number or \fIid\fR uniquely identifies
354 the node.  Please note that you can't infer a location or position of
355 a node from its id.  The only exception is that the root node is
356 always id \fB0\fR. Since nodes may have the same labels or be moved
357 within the tree, ids provide an convenient way to identify nodes.  If
358 a tree is shared, the ids will be the same regardless if you are using
359 by the \fBtreeview\fR widget or the \fBtree\fR command.  Ids are
360 recycled when the node deleted.
361 .PP
362 A node may also have any number of \fItags\fR associated with it.  A
363 tag is just a string of characters, and it may take any form except
364 that of an integer.  For example, "\fBx123\fR" is valid, but
365 "\fB123\fR" isn't.  The same tag may be associated with many
366 different nodes.  This is typically done to associate a group of
367 nodes.  Many operations in the \fBtreeview\fR widget take either node
368 ids or tag names as arguments.  Using a tag says to apply the operation
369 to all nodes with that tag.
370 .PP
371 The tag \fBall\fR is implicitly associated with every node in
372 the tree.  It may be used to invoke operations on all the nodes in the
373 tree. 
374 .PP
375 Tags may be shared, just like trees, between clients.  For example,
376 you can use the tags created by the \fBtree\fR command with
377 \fBtreeview\fR widgets.
378 .SH SPECIAL NODE IDS
379 There are also several special non-numeric ids.  Special ids differ
380 from tags in that they are always translated to their numeric
381 equivalent.  They also take precedence over tags.  For example, you
382 can't use a tag name that is a special id.  These ids are specific to
383 the \fBtreeview\fR widget.
384 .TP 15
385 \fBactive\fR
386 The node where the mouse pointer is currently located.
387 When a node is active, it is drawn using its active icon 
388 (see the \fB\-activeicon\fR option).
389 The \fBactive\fR id is changed automatically by moving the mouse
390 pointer over another node or by using the \fBentry activate\fR
391 operation. Note that there can be only one active node at a time.
392 .TP 15
393 \fBanchor\fR
394 The node representing the fixed end of the current selection.  
395 The anchor is set by the \fBselection anchor\fR operation.
396 .TP 15
397 \fBcurrent\fR
398 The node where the mouse pointer is currently located.
399 But unlike \fBactive\fR, this id changes while the
400 selection is dragged.  It is used to determine the
401 current node during button drags.
402 .TP 15
403 \fBdown\fR
404 The next open node from the current focus. The \fBdown\fR of
405 the last open node is the same.
406 .TP 15
407 \fBend\fR
408 The last open node (in depth-first order) on the tree.  
409 .TP 15
410 \fBfocus\fR
411 The node that currently has focus.  When a node has focus,
412 it receives key events.  To indicate focus, the node
413 is drawn with a dotted line around its label.  You can change the 
414 focus using the \fBfocus\fR operation.
415 .TP 15
416 \fBlast\fR
417 The last open node from the current focus. But unlike \fBup\fR,
418 when the focus is at root, \fBlast\fR wraps around to the last
419 open node in the tree.
420 .TP 15
421 \fBmark\fR
422 The node representing the non-fixed end of the current selection.  
423 The mark is set by the \fBselection mark\fR operation.
424 .TP 15
425 \fBnext\fR
426 The next open node from the current focus.  But unlike \fBdown\fR,
427 when the focus is on last open node, \fBnext\fR wraps around to the 
428 root node.
429 .TP 15
430 \fBnextsibling\fR
431 The next sibling from the node with the current focus.  If the node
432 is already the last sibling then it is the \fBnextsibling\fB.
433 .TP 15
434 \fBparent\fR
435 The parent of the node with the current focus. The \fBparent\fR
436 of the root is also the root.
437 .TP 15
438 \fBprevsibling\fR
439 The previous sibling from the node with the current focus.  If the node
440 is already the first sibling then it is the \fBprevsibling\fB.
441 .TP 15
442 \fBroot\fR
443 The root node. You can also use id \fB0\fR to indicate
444 the root.
445 .TP 15
446 \fBup\fR
447 The last open node (in depth-first order) from the current focus. The
448 \fBup\fR of the root node (i.e. the root has focus) is also the root.
449 .TP 15
450 \fBview.top\fR
451 First node that's current visible in the widget.
452 .TP 15
453 \fBview.bottom\fR
454 Last node that's current visible in the widget.
455 .TP 15
456 \fIpath\fR 
457 Absolute path of a node.  Path names refer to the node name, not
458 their entry labels. Paths don't have to start with a separator (see
459 the \fB\-separator\fR configuration option), but component names must
460 be separated by the designated separator.
461 .TP 15
462 \fB@\fIx\fB,\fIy\fR
463 Indicates the node that covers the point in the treeview window
464 specified by \fIx\fR and \fIy\fR (in pixel coordinates).  If no
465 part of the entryd covers that point, then the closest node to that
466 point is used.
467 .PP
468 A node may be specified as an id or tag. If the specifier is an
469 integer then it is assumed to refer to the single node with that id.
470 If the specifier is not an integer, it's checked to see if it's a
471 special id (such as focus).  Otherwise, it's assumed to be tag.  Some
472 operations only operate on a single node at a time; if a tag refers to
473 more than one node, then an error is generated.
474 .SH DATA FIELDS
475 A node in the tree can have \fIdata fields\fR.  A data field is a
476 name-value pair, used to represent arbitrary data in the node.  Nodes
477 can contain different fields (they aren't required to contain the same
478 fields).  You can optionally display these fields in the
479 \fBtreeview\fR widget in columns running on either side of the
480 displayed tree.  A node's value for the field is drawn in the column
481 along side its node in the hierarchy.  Any node that doesn't have a
482 specific field is left blank.  Columns can be interactively resized,
483 hidden, or, moved.
484 .SH ENTRY BINDINGS
485 You can bind Tcl commands to be invoked when events occur on nodes
486 (much like Tk canvas items).  You can bind a node using its id or
487 its \fIbindtags\fR.  Bindtags are simply names that associate a
488 binding with one or more nodes.  There is a built-in tag \fBall\fR
489 that all node entries automatically have.
490 .SH "TREEVIEW OPERATIONS"
491 The \fBtreeview\fR operations are the invoked by specifying
492 the widget's pathname, the operation, and any arguments that pertain 
493 to that operation.  The general form is:
494 .sp
495 .CS
496 \fIpathName operation \fR?\fIarg arg ...\fR?
497 .CE
498 .sp
499 \fIOperation\fR and the \fIarg\fRs determine the exact behavior of the
500 command.  The following operation are available for \fBtreeview\fR widgets:
501 .TP
502 \fIpathName \fBbbox\fR ?\fB-screen\fR? \fItagOrId...\fR
503 Returns a list of 4 numbers, representing a bounding box of around
504 the specified entries. The entries is given by one or more \fItagOrId\fR 
505 arguments.  
506 If the \fB\-screen\fR flag is given, then the x-y coordinates
507 of the bounding box are returned as screen coordinates, not 
508 virtual coordinates. Virtual coordinates start from \fB0\fR from the
509 root node.
510 The returned list contains the following values.
511 .RS
512 .TP 1.25i
513 \fIx\fR 
514 X-coordinate of the upper-left corner of the bounding box.
515 .TP
516 \fIy\fR
517 Y-coordinate of the upper-left corner of the bounding box.
518 .TP
519 \fIwidth\fR
520 Width of the bounding box.
521 .TP
522 \fIheight\fR
523 Height of the bounding box.
524 .RE
525 .TP
526 \fIpathName \fBbind\fR \fItagName\fR ?\fIsequence command\fR?
527 Associates \fIcommand\fR with \fItagName\fR such that whenever the
528 event sequence given by \fIsequence\fR occurs for a node with this
529 tag, \fIcommand\fR will be invoked.  The syntax is similar to the 
530 \fBbind\fR command except that it operates on \fBtreeview\fR entries, 
531 rather than widgets. See the \fBbind\fR manual entry for
532 complete details on \fIsequence\fR and the substitutions performed on 
533 \fIcommand\fR before invoking it.  
534 .sp
535 If all arguments are specified then a new binding is created, replacing 
536 any existing binding for the same \fIsequence\fR and \fItagName\fR.
537 If the first character of \fIcommand\fR is \fB+\fR then \fIcommand\fR 
538 augments an existing binding rather than replacing it. 
539 If no \fIcommand\fR argument is provided then the command currently
540 associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
541 if there's no such binding) is returned.  If both \fIcommand\fR and 
542 \fIsequence\fR are missing then a list of all the event sequences for 
543 which bindings have been defined for \fItagName\fR. 
544 .TP
545 \fIpathName \fBbutton \fIoperation\fR ?\fIargs\fR?
546 This command is used to control the button selectors within a 
547 \fBtreeview\fR widget.  
548 It has several forms, depending on \fIoperation\fR:
549 .RS
550 .TP
551 \fIpathName \fBbutton activate\fR \fItagOrId\fR
552 Designates the node given by \fItagOrId\fR as active.  
553 When a node is active it's entry is drawn using its active icon 
554 (see the \fB\-activeicon\fR option). 
555 Note that there can be only one active entry at a time.
556 The special id \fBactive\fR indicates the currently active node.
557 .TP
558 \fIpathName \fBbutton bind\fR \fItagName\fR ?\fIsequence command\fR?
559 Associates \fIcommand\fR with \fItagName\fR such that whenever the
560 event sequence given by \fIsequence\fR occurs for an button of a
561 node entry with this tag, \fIcommand\fR will be invoked.  The syntax is
562 similar to the \fBbind\fR command except that it operates on
563 \fBtreeview\fR buttons, rather than widgets. See the \fBbind\fR
564 manual entry for complete details on \fIsequence\fR and the
565 substitutions performed on \fIcommand\fR before invoking it.
566 .sp
567 If all arguments are specified then a new binding is created, replacing 
568 any existing binding for the same \fIsequence\fR and \fItagName\fR.
569 If the first character of \fIcommand\fR is \fB+\fR then \fIcommand\fR 
570 augments an existing binding rather than replacing it. 
571 If no \fIcommand\fR argument is provided then the command currently
572 associated with \fItagName\fR and \fIsequence\fR (it's an error occurs 
573 if there's no such binding) is returned.  If both \fIcommand\fR and 
574 \fIsequence\fR are missing then a list of all the event sequences for 
575 which bindings have been defined for \fItagName\fR. 
576 .TP
577 \fIpathName \fBbutton cget\fR \fIoption\fR
578 Returns the current value of the configuration option given
579 by \fIoption\fR.
580 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
581 operation described below.
582 .TP
583 \fIpathName \fBbutton configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
584 Query or modify the configuration options of the widget.
585 If no \fIoption\fR is specified, returns a list describing all of
586 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
587 information on the format of this list).  If \fIoption\fR is specified
588 with no \fIvalue\fR, then the command returns a list describing the
589 one named option (this list will be identical to the corresponding
590 sublist of the value returned if no \fIoption\fR is specified).  If
591 one or more \fIoption\-value\fR pairs are specified, then the command
592 modifies the given widget option(s) to have the given value(s);  in
593 this case the command returns an empty string.
594 \fIOption\fR and \fIvalue\fR are described in the section 
595 .SB "BUTTON OPTIONS" 
596 below.
597 .RE
598 .TP
599 \fIpathName \fBcget\fR \fIoption\fR
600 Returns the current value of the configuration option given
601 by \fIoption\fR.
602 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
603 operation described below.
604 .TP
605 \fIpathName \fBclose \fR?\fB\-recurse\fR? \fItagOrId...\fR
606 Closes the node specified by \fItagOrId\fR.  In addition, if a Tcl
607 script was specified by the \fB\-closecommand\fR option, it is
608 invoked.  If the node is already closed, this command has no effect.
609 If the \fB\-recurse\fR flag is present, each child node is
610 recursively closed.
611 .TP
612 \fIpathName \fBcolumn \fIoperation\fR ?\fIargs\fR?
613 The following operations are available for treeview columns.
614 .RS
615 .TP
616 \fIpathName \fBcolumn activate\fR \fIcolumn\fR
617 Sets the active column to \fIcolumn\fR.  \fIColumn\fR is the
618 name of a column in the widget.
619 When a column is active, it's drawn using its \fB\-activetitlebackground\fR
620 and \fB\-activetitleforeground\fR options.  If \fIcolumn\fR is the \fB""\fR,
621 then no column will be active.  If no column argument is provided, then
622 the name of the currently active column is returned.
623 .TP
624 \fIpathName \fBcolumn cget\fR \fIname\fR \fIoption\fR
625 Returns the current value of the column configuration option given
626 by \fIoption\fR for \fIname\fR.  \fIName\fR is the name of column
627 that corresponds to a data field.
628 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
629 operation described below.
630 .TP
631 \fIpathName \fBcolumn configure\fR \fIname\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
632 Query or modify the configuration options of the column designated
633 by \fIname\fR. \fIName\fR is the name of the column corresponding
634 to a data field.
635 If no \fIoption\fR is specified, returns a list describing all of
636 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
637 information on the format of this list).  If \fIoption\fR is specified
638 with no \fIvalue\fR, then the command returns a list describing the
639 one named option (this list will be identical to the corresponding
640 sublist of the value returned if no \fIoption\fR is specified).  If
641 one or more \fIoption\-value\fR pairs are specified, then the command
642 modifies the given widget option(s) to have the given value(s);  in
643 this case the command returns an empty string.
644 \fIOption\fR and \fIvalue\fR are described in the section
645 .SB "COLUMN OPTIONS" 
646 below.
647 .TP
648 \fIpathName \fBcolumn delete\fR \fIfield\fR ?\fIfield\fR...?
649 Deletes one of more columns designated by \fIfield\fR.  Note
650 that this does not delete the data fields themselves.
651 .TP
652 \fIpathName \fBcolumn insert\fR \fIposition\fR \fIfield\fR ?\fIoptions\fR...?
653 Inserts one of more columns designated by \fIfield\fR.  A column displays
654 each node's data field by the same name.  If the node doesn't
655 have the given field, the cell is left blank.
656 \fIPosition\fR
657 indicates where in the list of columns to add the new column.  It may be
658 either a number or \fBend\fR. 
659 .TP
660 \fIpathName \fBcolumn invoke\fR \fIfield\fR
661 Invokes the Tcl command associated with the column \fIfield\fR, 
662 if there is one (using the column's \fB\-command\fR option).  
663 The command is ignored if the column's \fB\-state\fR option 
664 set to \fBdisabled\fR.
665 .TP
666 \fIpathName \fBcolumn move \fIname\fR \fIdest\fR 
667 Moves the column \fIname\fR to the destination position.  
668 \fIDest\fR is the name of another column or a screen position
669 in the form \fB@\fIx\fB,\fIy\fR.
670 .TP
671 \fIpathName \fBcolumn names\fR
672 Returns a list of the names of all columns in the widget.
673 The list is ordered as the columns are drawn from left-to-right.
674 .TP
675 \fIpathName \fBcolumn nearest\fR \fIx\fR ?\fIy\fR?
676 Returns the name of the column closest to the given X-Y screen
677 coordinate.  If you provide a \fIy\fR argument (it's optional),
678 a name is returned only when if the point is over a column's title.
679 .RE
680 .TP
681 \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
682 Query or modify the configuration options of the widget.
683 If no \fIoption\fR is specified, returns a list describing all of
684 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
685 information on the format of this list).  If \fIoption\fR is specified
686 with no \fIvalue\fR, then the command returns a list describing the
687 one named option (this list will be identical to the corresponding
688 sublist of the value returned if no \fIoption\fR is specified).  If
689 one or more \fIoption\-value\fR pairs are specified, then the command
690 modifies the given widget option(s) to have the given value(s);  in
691 this case the command returns an empty string.
692 \fIOption\fR and \fIvalue\fR are described in the section
693 .SB "TREEVIEW OPTIONS"
694 below.
695 .TP
696 \fIpathName \fBcurselection\fR
697 Returns a list containing the ids of all of the entries that are 
698 currently selected.
699 If there are no entries selected, then the empty string is returned.
700 .TP
701 \fIpathName \fBdelete \fItagOrId\fR...
702 Deletes one or more entries given by \fItagOrId\fR and its children.
703 .TP
704 \fIpathName \fBentry \fIoperation\fR ?\fIargs\fR?
705 The following operations are available for treeview entries.
706 .RS
707 .TP
708 \fIpathName \fBentry activate\fR \fItagOrId\fR
709 Sets the active entry to the one specified by \fItagOrId\fR.  
710 When an entry is active it is drawn using its active icon 
711 (see the \fB\-activeicon\fR option). 
712 Note that there can be only one active node at a time.
713 The special id of the currently active node is \fBactive\fR.
714 .TP
715 \fIpathName \fBentry cget\fR \fIoption\fR
716 Returns the current value of the configuration option given
717 by \fIoption\fR.
718 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
719 operation described below.
720 .TP
721 \fIpathName \fBentry children\fR \fItagOrId\fR  ?\fIfirst\fR? ?\fIlast\fR?
722 Returns a list of ids for the given range of children of \fItagOrId\fR.  
723 \fITagOrId\fR is the id or tag of the node to be examined.
724 If only a \fIfirst\fR argument is present, then the id 
725 of the that child at that numeric position is returned.  If both \fIfirst\fR 
726 and \fIlast\fR arguments are given, then the ids of all the children
727 in that range are returned.  Otherwise the ids of all children
728 are returned.  
729 .TP
730 \fIpathName \fBentry configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
731 Query or modify the configuration options of the widget.
732 If no \fIoption\fR is specified, returns a list describing all of
733 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
734 information on the format of this list).  If \fIoption\fR is specified
735 with no \fIvalue\fR, then the command returns a list describing the
736 one named option (this list will be identical to the corresponding
737 sublist of the value returned if no \fIoption\fR is specified).  If
738 one or more \fIoption\-value\fR pairs are specified, then the command
739 modifies the given widget option(s) to have the given value(s);  in
740 this case the command returns an empty string.
741 \fIOption\fR and \fIvalue\fR are described below:
742 .TP
743 \fIpathName \fBentry delete\fR \fItagOrId\fR ?\fIfirst\fR ?\fIlast\fR?
744 Deletes the one or more children nodes of the parent \fItagOrId\fR.
745 If \fIfirst\fR and \fIlast\fR arguments are present, they are
746 positions designating a range of children nodes to be deleted.
747 .TP
748 \fIpathName \fBentry isbefore \fItagOrId1\fR \fItagOrId2\fR
749 Returns 1 if \fItagOrId1\fR is before \fItagOrId2\fR and 0 otherwise.
750 .TP
751 \fIpathName \fBentry ishidden \fItagOrId\fR
752 Returns 1 if the node is currently hidden and 0 otherwise.  A node is
753 also hidden if any of its ancestor nodes are closed or hidden.
754 .TP
755 \fIpathName \fBentry isopen \fItagOrId\fR
756 Returns 1 if the node is currently open and 0 otherwise.
757 .TP
758 \fIpathName \fBentry size\fR \fB\-recurse\fR \fItagOrId\fR
759 Returns the number of children for parent node \fItagOrId\fR.  
760 If the \fB\-recurse\fR flag is set, the number of all 
761 its descendants is returned.  The node itself is not counted.
762 .RE
763 .TP
764 \fIpathName \fBfind \fR?\fIflags\fR? \fIfirst\fR \fIlast\fR
765 Finds for all entries matching the criteria given by \fIflags\fR.  A
766 list of ids for all matching nodes is returned. \fIFirst\fR and
767 \fIlast\fR are ids designating the range of the search in
768 depth-first order. If \fIlast\fR is before \fIfirst\fR, then nodes
769 are searched in reverse order.  The valid flags are:
770 .RS
771 .TP 1.25i
772 \fB\-name\fI pattern\fR
773 Specifies pattern to match against node names.
774 .TP 1.25i
775 \fB\-full\fI pattern\fR
776 Specifies pattern to match against node pathnames.
777 .TP 1.25i
778 \fB\-\fIoption\fI pattern\fR
779 Specifies pattern to match against the node entry's configuration option.
780 .TP 1.25i
781 \fB\-exact\fR
782 Patterns must match exactly.  The is the default.
783 .TP 1.25i
784 \fB\-glob\fR
785 Use global pattern matching.  Matching is done in a fashion
786 similar to that used by the C-shell.  For  the  two
787 strings  to match, their contents must be identical
788 except that the  following  special  sequences  may
789 appear in pattern:
790 .RS 
791 .TP 5
792 \fB*\fR
793 Matches  any  sequence  of  characters in
794 string, including a null string.
795 .TP 5
796 \fB?\fR
797 Matches any single character in string.
798 .TP 5
799 \fB[\fIchars\fB]\fR
800 Matches any character in the set given by \fIchars\fR. If a sequence of the
801 form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
802 \fIx\fR and \fIy\fR,
803 inclusive, will match.
804 .TP 5
805 \fB\\\fIx\fR
806 Matches  the  single  character  \fIx\fR.  This
807 provides a way of  avoiding  the  special
808 interpretation of the characters \fB*?[]\\\fR in
809 the pattern.
810 .RE
811 .TP 1.25i
812 \fB\-regexp\fR
813 Use regular expression pattern matching (i.e. the same as implemented
814 by the \fBregexp\fR command).  
815 .TP 1.25i
816 \fB\-nonmatching\fR
817 Pick entries that don't match.  
818 .TP 1.25i
819 \fB\-exec\fI string\fR
820 Specifies a Tcl script to be invoked for each matching node.
821 Percent substitutions are performed on \fIstring\fR before 
822 it is executed.  The following substitutions are valid:
823 .RS 
824 .TP 5
825 \fB%W\fR
826 The pathname of the widget.
827 .TP 5
828 \fB%p\fR
829 The name of the node.
830 .TP 5
831 \fB%P\fR
832 The full pathname of the node.
833 .TP 5
834 \fB%#\fR
835 The id of the node.
836 .TP 5
837 \fB%%\fR
838 Translates to a single percent.
839 .RE
840 .TP 1.25i
841 \fB\-count\fI number\fR
842 Stop searching after \fInumber\fR matches.
843 .TP 1.25i
844 \fB\-\-\fR
845 Indicates the end of flags.
846 .RE
847 .TP
848 \fIpathName \fBfocus \fR \fItagOrId\fR
849 Sets the focus to the node given by \fItagOrId\fR.  When a node
850 has focus, it can receive keyboard events.   
851 The special id \fBfocus\fR designates the node that currently has focus.
852 .TP
853 \fIpathName \fBget \fR?\fB\-full\fR? \fItagOrId\fR \fItagOrId\fR...
854 Translates one or more ids to their node entry names.  It returns a list of 
855 names for all the ids specified.  If the \fB\-full\fR
856 flag is set, then the full pathnames are returned.
857 .TP 
858 \fIpathName \fBhide \fR?\fBflags\fR? \fItagOrId\fR...
859 Hides all nodes matching the criteria given by \fIflags\fR.  The
860 search is performed recursively for each node given by \fItagOrId\fR.
861 The valid flags are described below:
862 .RS
863 .TP 1.25i
864 \fB\-name\fI pattern\fR
865 Specifies pattern to match against node names.
866 .TP 1.25i
867 \fB\-full\fI pattern\fR
868 Specifies pattern to match against node pathnames.
869 .TP 1.25i
870 \fB\-\fIoption\fI pattern\fR
871 Specifies pattern to match against the node entry's configuration option.
872 .TP 1.25i
873 \fB\-exact\fR
874 Match patterns exactly.  The is the default.
875 .TP 1.25i
876 \fB\-glob\fR
877 Use global pattern matching.  Matching is done in a fashion
878 similar to that used by the C-shell.  For  the  two
879 strings  to match, their contents must be identical
880 except that the  following  special  sequences  may
881 appear in pattern:
882 .RS 
883 .TP 5
884 \fB*\fR
885 Matches  any  sequence  of  characters in
886 string, including a null string.
887 .TP 5
888 \fB?\fR
889 Matches any single character in string.
890 .TP 5
891 \fB[\fIchars\fB]\fR
892 Matches any character in the set given by \fIchars\fR. If a sequence of the
893 form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
894 \fIx\fR and \fIy\fR,
895 inclusive, will match.
896 .TP 5
897 \fB\\\fIx\fR
898 Matches  the  single  character  \fIx\fR.  This
899 provides a way of  avoiding  the  special
900 interpretation of the characters \fB*?[]\\\fR in
901 the pattern.
902 .RE
903 .TP 1.25i
904 \fB\-regexp\fR
905 Use regular expression pattern matching (i.e. the same as implemented
906 by the \fBregexp\fR command).  
907 .TP 1.25i
908 \fB\-nonmatching\fR
909 Hide nodes that don't match.  
910 .TP 1.25i
911 \fB\-\-\fR
912 Indicates the end of flags.
913 .RE
914 .TP
915 \fIpathName \fBindex \fR?\fB\-at\fR \fItagOrId\fR? \fIstring\fR 
916 Returns the id of the node specified by \fIstring\fR.  \fIString\fR
917 may be a tag or node id.
918 Some special ids are normally relative to the node that 
919 has focus.  The \fB\-at\fR flag lets you select another node.
920 .TP
921 \fIpathName \fBinsert \fR?\fB\-at \fItagOrId\fR? \fIposition\fR \fIpath\fR ?\fIoptions...\fR? ?\fIpath\fR? ?\fIoptions...\fR? 
922 Inserts one or more nodes at \fIposition\fR.  \fIPosition\fR is the
923 location (number or \fBend\fR) where the new nodes are added to
924 the parent node.  \fIPath\fR is the pathname of the new node.
925 Pathnames can be formated either as a Tcl list (each element is a path
926 component) or as a string separated by a special character sequence
927 (using the \fB\-separator\fR option).  Pathnames are normally
928 absolute, but the \fB\-at\fR switch lets you select a relative
929 starting point.  Its value is the id of the starting node.  
930 .sp
931 All ancestors of the new node must already exist, unless the
932 \fB\-autocreate\fR option is set.  It is also an error if a node
933 already exists, unless the \fB\-allowduplicates\fR option is set.
934 .sp
935 \fIOption\fR and \fIvalue\fR may have any of the values accepted by the 
936 \fBentry configure\fR operation described in the
937 .SB "ENTRY OPERATIONS"
938 section below.  This command returns a list of the ids of
939 the new entries.
940 .TP
941 \fIpathName \fBmove \fItagOrId\fR \fIhow\fR \fIdestId\fR
942 Moves the node given by \fItagOrId\fR to the destination node.  The
943 node can not be an ancestor of the destination.  \fIDestId\fR is
944 the id of the destination node and can not be the root of the
945 tree.  In conjunction with \fIhow\fR, it describes how the move is
946 performed.
947 .RS
948 .TP 8
949 \fBbefore\fR
950 Moves the node before the destination node.
951 .TP 8
952 \fBafter\fR
953 Moves the node after the destination node.
954 .TP 8
955 \fBinto\fR
956 Moves the node to the end of the destination's list of children.
957 .RE
958 .TP
959 \fIpathName \fBnearest \fIx y\fR ?\fIvarName\fR?
960 Returns the id of the node entry closest to the given X-Y screen
961 coordinate.  The optional argument \fIvarName\fR is the name of
962 variable which is set to either \fBbutton\fR or \fBselect\fR to
963 indicate over what part of the node the coordinate lies.  
964 If the coordinate is not directly over any node, then
965 \fIvarName\fR will contain the empty string.
966 .TP
967 \fIpathName \fBopen \fR?\fB\-recurse\fR? \fItagOrId...\fR
968 Opens the one or more nodes specified by \fItagOrId\fR.  
969 If a node is not already open, the Tcl script specified by the 
970 \fB\-opencommand\fR option is invoked. If the \fB\-recurse\fR flag 
971 is present, then each descendant is recursively opened.  
972 .TP
973 \fIpathName \fBrange\fR ?\fB-open\fR? \fIfirst last\fR
974 Returns the ids in depth-first order of the nodes
975 between the \fIfirst\fR and \fIlast\fR ids.  If the \fB\-open\fR
976 flag is present, it indicates to consider only open nodes.
977 If \fIlast\fR is before \fIfirst\fR, then the ids are
978 returned in reverse order.
979 .TP
980 \fIpathName \fBscan\fR \fIoption args\fR
981 This command implements scanning.  It has
982 two forms, depending on \fIoption\fR:
983 .RS
984 .TP
985 \fIpathName \fBscan mark \fIx y\fR
986 Records \fIx\fR and \fIy\fR and the current view in the treeview
987 window;  used in conjunction with later \fBscan dragto\fR commands.
988 Typically this command is associated with a mouse button press in
989 the widget.  It returns an empty string.
990 .TP
991 \fIpathName \fBscan dragto \fIx y\fR.
992 Computes the difference between its \fIx\fR and \fIy\fR
993 arguments and the \fIx\fR and \fIy\fR arguments to the last
994 \fBscan mark\fR command for the widget.
995 It then adjusts the view by 10 times the
996 difference in coordinates.  This command is typically associated
997 with mouse motion events in the widget, to produce the effect of
998 dragging the list at high speed through the window.  The return
999 value is an empty string.
1000 .RE
1001 .TP
1002 \fIpathName \fBsee\fR ?\fB\-anchor \fIanchor\fR? \fItagOrId\fR
1003 Adjusts the view of entries so that the node given by \fItagOrId\fR is
1004 visible in the widget window.  It is an error if \fBtagOrId\fR is a
1005 tag that refers to more than one node.  By default the node's entry
1006 is displayed in the middle of the window.  This can changed using the
1007 \fB\-anchor\fR flag.  Its value is a Tk anchor position.
1008 .TP
1009 \fIpathName \fBselection \fIoption arg\fR
1010 This command is used to adjust the selection within a \fBtreeview\fR
1011 widget.  It has several forms, depending on \fIoption\fR:
1012 .RS
1013 .TP
1014 \fIpathName \fBselection anchor \fItagOrId\fR
1015 Sets the selection anchor to the node given by \fItagOrId\fR.
1016 If \fItagOrId\fR refers to a non-existent node, then the closest
1017 node is used.
1018 The selection anchor is the end of the selection that is fixed
1019 while dragging out a selection with the mouse.
1020 The special id \fBanchor\fR may be used to refer to the anchor
1021 node.
1022 .TP
1023 \fIpathName \fBselection cancel\fR
1024 Clears the temporary selection of entries back to the
1025 current anchor.  Temporary selections are created by 
1026 the \fBselection mark\fR operation.
1027 .TP
1028 \fIpathName \fBselection clear \fIfirst \fR?\fIlast\fR?
1029 Removes the entries between \fIfirst\fR and \fIlast\fR
1030 (inclusive) from the selection.  Both \fIfirst\fR and 
1031 \fIlast\fR are ids representing a range of entries.
1032 If \fIlast\fR isn't given, then only \fIfirst\fR is deselected.
1033 Entries outside the selection are not affected.
1034 .TP
1035 \fIpathName \fBselection clearall\fR
1036 Clears the entire selection.  
1037 .TP
1038 \fIpathName \fBselection mark \fItagOrId\fR
1039 Sets the selection mark to the node given by \fItagOrId\fR.  This
1040 causes the range of entries between the anchor and the mark to be
1041 temporarily added to the selection.  The selection mark is the end of
1042 the selection that is fixed while dragging out a selection with the
1043 mouse.  The special id \fBmark\fR may be used to refer to the current 
1044 mark node.
1045 If \fItagOrId\fR refers to a non-existent node, then the mark
1046 is ignored.
1047 Resetting the mark will unselect
1048 the previous range.  Setting the anchor finalizes the range.
1049 .TP
1050 \fIpathName \fBselection includes \fItagOrId\fR
1051 Returns 1 if the node given by \fItagOrId\fR is currently
1052 selected, 0 if it isn't.
1053 .TP
1054 \fIpathName \fBselection present\fR
1055 Returns 1 if any nodes are currently selected and 0 otherwise.
1056 .TP
1057 \fIpathName \fBselection set \fIfirst \fR?\fIlast\fR?
1058 Selects all of the nodes in the range between
1059 \fIfirst\fR and \fIlast\fR, inclusive, without affecting
1060 the selection state of nodes outside that range.
1061 .TP
1062 \fIpathName \fBselection toggle \fIfirst \fR?\fIlast\fR?
1063 Selects/deselects nodes in the range between
1064 \fIfirst\fR and \fIlast\fR, inclusive, from the selection.
1065 If a node is currently selected, it becomes deselected, and
1066 visa versa.
1067 .RE
1068 .TP 
1069 \fIpathName \fBshow \fR?\fBflags\fR? \fItagOrId\fR...
1070 Exposes all nodes matching the criteria given by \fIflags\fR.  This
1071 is the inverse of the \fBhide\fR operation.  The search is performed
1072 recursively for each node given by \fItagOrId\fR.  The valid flags are
1073 described below:
1074 .RS
1075 .TP 1.25i
1076 \fB\-name\fI pattern\fR
1077 Specifies pattern to match against node names.
1078 .TP 1.25i
1079 \fB\-full\fI pattern\fR
1080 Specifies pattern to match against node pathnames.
1081 .TP 1.25i
1082 \fB\-\fIoption\fI pattern\fR
1083 Specifies pattern to match against the entry's configuration option.
1084 .TP 1.25i
1085 \fB\-exact\fR
1086 Match patterns exactly.  The is the default.
1087 .TP 1.25i
1088 \fB\-glob\fR
1089 \fB\-glob\fR
1090 Use global pattern matching.  Matching is done in a fashion
1091 similar to that used by the C-shell.  For  the  two
1092 strings  to match, their contents must be identical
1093 except that the  following  special  sequences  may
1094 appear in pattern:
1095 .RS 
1096 .TP 5
1097 \fB*\fR
1098 Matches  any  sequence  of  characters in
1099 string, including a null string.
1100 .TP 5
1101 \fB?\fR
1102 Matches any single character in string.
1103 .TP 5
1104 \fB[\fIchars\fB]\fR
1105 Matches any character in the set given by \fIchars\fR. If a sequence of the
1106 form \fIx\fR-\fIy\fR appears in \fIchars\fR, then any character between 
1107 \fIx\fR and \fIy\fR,
1108 inclusive, will match.
1109 .TP 5
1110 \fB\\\fIx\fR
1111 Matches  the  single  character  \fIx\fR.  This
1112 provides a way of  avoiding  the  special
1113 interpretation of the characters \fB*?[]\\\fR in
1114 the pattern.
1115 .RE
1116 .TP 1.25i
1117 \fB\-regexp\fR
1118 Use regular expression pattern matching (i.e. the same as implemented
1119 by the \fBregexp\fR command).  
1120 .TP 1.25i
1121 \fB\-nonmatching\fR
1122 Expose nodes that don't match.  
1123 .TP 1.25i
1124 \fB\-\-\fR
1125 Indicates the end of flags.
1126 .RE
1127 .TP
1128 \fIpathName \fBsort\fR ?\fIoperation\fR? \fIargs...\fR
1129 .RS
1130 .TP
1131 \fIpathName \fBsort auto\fR ?\fIboolean\fR
1132 Turns on/off automatic sorting of node entries.  If \fIboolean\fR is
1133 true, entries will be automatically sorted as they are opened,
1134 closed, inserted, or deleted.  If no \fIboolean\fR argument is
1135 provided, the current state is returned.
1136 .TP
1137 \fIpathName \fBsort cget\fR \fIoption\fR
1138 Returns the current value of the configuration option given
1139 by \fIoption\fR.
1140 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
1141 operation described below.
1142 .TP
1143 \fIpathName \fBsort configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
1144 Query or modify the sorting configuration options of the widget.
1145 If no \fIoption\fR is specified, returns a list describing all of
1146 the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
1147 information on the format of this list).  If \fIoption\fR is specified
1148 with no \fIvalue\fR, then the command returns a list describing the
1149 one named option (this list will be identical to the corresponding
1150 sublist of the value returned if no \fIoption\fR is specified).  If
1151 one or more \fIoption\-value\fR pairs are specified, then the command
1152 modifies the given sorting option(s) to have the given value(s);  in
1153 this case the command returns an empty string.
1154 \fIOption\fR and \fIvalue\fR are described below:
1155 .RS
1156 .TP
1157 \fB\-column\fI string\fR
1158 Specifies the column to sort. Entries in the widget are rearranged
1159 according to this column.  If \fIcolumn\fR is \fB""\fR then
1160 no sort is performed.
1161 .TP
1162 \fB\-command\fI string\fR
1163 Specifies a Tcl procedure to be called when sorting nodes. 
1164 The procedure is called with three arguments: the pathname of the widget
1165 and the fields of two entries.  The procedure returns 1 if the first
1166 node is greater than the second, -1 is the second is greater, and 0
1167 if equal.  
1168 .TP
1169 \fB\-decreasing\fI boolean\fR
1170 Indicates to sort in ascending/descending order.  If \fIboolean\fR 
1171 is true, then the entries as in descending order. The default is 
1172 \fBno\fR.
1173 .TP
1174 \fB\-mode\fI string\fR
1175 Specifies how to compare entries when sorting. \fIString\fR
1176 may be one of the following:
1177 .RS 
1178 .TP 1.5i
1179 \fBascii\fR
1180 Use string comparison based upon the ASCII collation order.
1181 .TP 1.5i
1182 \fBdictionary\fR 
1183 Use dictionary-style comparison.  This is the same as \fBascii\fR
1184 except (a) case is ignored except as a tie-breaker and (b) if two
1185 strings contain embedded numbers, the numbers compare as integers, not
1186 characters.  For example, "bigBoy" sorts between
1187 "bigbang" and "bigboy", and "x10y" sorts between "x9y" and "x11y".
1188 .TP 1.5i
1189 \fBinteger\fR
1190 Compares fields as integers.
1191 .TP 1.5i
1192 \fBreal\fR
1193 Compares fields as floating point numbers.
1194 .TP 1.5i
1195 \fBcommand\fR
1196 Use the Tcl proc specified by the \fB\-command\fR option to compare entries 
1197 when sorting.   If no command is specified, the sort reverts to 
1198 \fBascii\fR sorting.
1199 .RE
1200 .RE
1201 .TP
1202 \fIpathName \fBsort once\fR ?\fIflags\fR? \fItagOrId...\fR
1203 Sorts the children for each entries specified by \fItagOrId\fR.  
1204 By default, entries are sorted by name, but you can specify a 
1205 Tcl proc to do your own comparisons.
1206 .RS
1207 .TP 1.5i
1208 \fB\-recurse\fR
1209 Recursively sort the entire branch, not just the children.
1210 .RE
1211 .RE
1212 .TP
1213 \fIpathName \fBtag \fIoperation args\fR
1214 Tags are a general means of selecting and marking nodes in the tree.
1215 A tag is just a string of characters, and it may take any form except
1216 that of an integer.  The same tag may be associated with many
1217 different nodes.  
1218 .sp
1219 Both \fIoperation\fR and its arguments determine the exact behavior of
1220 the command.  The operations available for tags are listed below.
1221 .RS
1222 .TP
1223 \fIpathName\fR \fBtag add\fR \fIstring\fR \fIid\fR...
1224 Adds the tag \fIstring\fR to one of more entries.
1225 .TP
1226 \fIpathName\fR \fBtag delete\fR \fIstring\fR \fIid\fR...
1227 Deletes the tag \fIstring\fR from one or more entries.  
1228 .TP
1229 \fIpathName\fR \fBtag forget\fR \fIstring\fR
1230 Removes the tag \fIstring\fR from all entries.  It's not an error if no
1231 entries are tagged as \fIstring\fR.
1232 .TP
1233 \fIpathName\fR \fBtag names\fR ?\fIid\fR?
1234 Returns a list of tags used.  If an \fIid\fR argument
1235 is present, only those tags used by the node designated by \fIid\fR 
1236 are returned.
1237 .TP
1238 \fIpathName\fR \fBtag nodes\fR \fIstring\fR
1239 Returns a list of ids that have the tag \fIstring\fR.  If no node
1240 is tagged as \fIstring\fR, then an empty string is returned.
1241 .RE
1242 .TP
1243 \fIpathName \fBtext \fIoperation\fR ?\fIargs\fR?
1244 This operation is used to provide text editing for cells (data 
1245 fields in a column) or entry labels.
1246 It has several forms, depending on \fIoperation\fR:
1247 .RS
1248 .TP
1249 \fIpathName \fBtext apply\fR
1250 Applies the edited buffer, replacing the entry label
1251 or data field. The edit window is hidden.
1252 .TP
1253 \fIpathName \fBtext cancel\fR
1254 Cancels the editing operation, reverting the entry label 
1255 or data value back to the previous value. The edit window is hidden.
1256 .TP
1257 \fIpathName \fBtext cget\fI value\fR
1258 Returns the current value of the configuration option given
1259 by \fIoption\fR.
1260 \fIOption\fR may have any of the values accepted by the \fBconfigure\fR
1261 operation described below.
1262 .TP
1263 \fIpathName \fBtext configure\fR ?\fIoption value\fR?
1264 Query or modify the configuration options of the edit window.
1265 If no \fIoption\fR is specified, returns a list describing all of
1266 the available options (see \fBTk_ConfigureInfo\fR for
1267 information on the format of this list).  If \fIoption\fR is specified
1268 with no \fIvalue\fR, then the command returns a list describing the
1269 one named option (this list will be identical to the corresponding
1270 sublist of the value returned if no \fIoption\fR is specified).  If
1271 one or more \fIoption\-value\fR pairs are specified, then the command
1272 modifies the given widget option(s) to have the given value(s);  in
1273 this case the command returns an empty string.
1274 \fIOption\fR and \fIvalue\fR are described in the section 
1275 .SB "TEXT EDITING OPTIONS" 
1276 below.
1277 .RE
1278 .TP
1279 \fIpathName \fBtext delete\fI first last\fR
1280 Deletes the characters in the edit buffer between the two given
1281 character positions.  
1282 .TP
1283 \fIpathName \fBtext get\fR ?\fI\-root\fR? \fIx y\fR
1284 .TP
1285 \fIpathName \fBtext icursor\fI index\fR
1286 .TP
1287 \fIpathName \fBtext index\fI index\fR
1288 Returns the text index of given \fIindex\fR.
1289 .TP
1290 \fIpathName \fBtext insert\fI index string\fR
1291 Insert the text string \fIstring\fR into the edit buffer at the index 
1292 \fIindex\fR.  For example, the index 0 will prepend the buffer.
1293 .TP
1294 \fIpathName \fBtext selection\fI args\fR
1295 This operation controls the selection of the editing window.  Note
1296 that this differs from the selection of entries.
1297 It has the following forms:
1298 .RS
1299 .TP
1300 \fIpathName \fBtext selection adjust\fI index\fR
1301 Adjusts either the first or last index of the selection.
1302 .TP
1303 \fIpathName \fBtext selection clear\fR
1304 Clears the selection.
1305 .TP
1306 \fIpathName \fBtext selection from\fI index\fR
1307 Sets the anchor of the selection.
1308 .TP
1309 \fIpathName \fBtext selection present\fR
1310 Indicates if a selection is present.
1311 .TP
1312 \fIpathName \fBtext selection range\fI start end\fR
1313 Sets both the anchor and mark of the selection.
1314 .TP
1315 \fIpathName \fBtext selection to\fI index\fR
1316 Sets the unanchored end (mark) of the selection.
1317 .RE
1318 .TP
1319 \fIpathName \fBtoggle \fItagOrId\fR
1320 Opens or closes the node given by \fItagOrId\fR.  If the corresponding 
1321 \fB\-opencommand\fR or \fB\-closecommand\fR option is set, then that
1322 command is also invoked. 
1323 .TP
1324 \fIpathName \fBxview \fIargs\fR
1325 This command is used to query and change the horizontal position of the
1326 information in the widget's window.  It can take any of the following
1327 forms:
1328 .RS
1329 .TP
1330 \fIpathName \fBxview\fR
1331 Returns a list containing two elements.
1332 Each element is a real fraction between 0 and 1;  together they describe
1333 the horizontal span that is visible in the window.
1334 For example, if the first element is .2 and the second element is .6,
1335 20% of the \fBtreeview\fR widget's text is off-screen to the left, 
1336 the middle 40% is visible
1337 in the window, and 40% of the text is off-screen to the right.
1338 These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR
1339 option.
1340 .TP
1341 \fIpathName \fBxview\fR \fItagOrId\fR
1342 Adjusts the view in the window so that the character position given by
1343 \fItagOrId\fR is displayed at the left edge of the window.
1344 Character positions are defined by the width of the character \fB0\fR.
1345 .TP
1346 \fIpathName \fBxview moveto\fI fraction\fR
1347 Adjusts the view in the window so that \fIfraction\fR of the
1348 total width of the \fBtreeview\fR widget's text is off-screen to the left.
1349 \fIfraction\fR must be a fraction between 0 and 1.
1350 .TP
1351 \fIpathName \fBxview scroll \fInumber what\fR
1352 This command shifts the view in the window left or right according to
1353 \fInumber\fR and \fIwhat\fR.
1354 \fINumber\fR must be an integer.
1355 \fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation
1356 of one of these.
1357 If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by
1358 \fInumber\fR character units (the width of the \fB0\fR character)
1359 on the display;  if it is \fBpages\fR then the view adjusts by
1360 \fInumber\fR screenfuls.
1361 If \fInumber\fR is negative then characters farther to the left
1362 become visible;  if it is positive then characters farther to the right
1363 become visible.
1364 .RE
1365 .TP
1366 \fIpathName \fByview \fI?args\fR?
1367 This command is used to query and change the vertical position of the
1368 text in the widget's window.
1369 It can take any of the following forms:
1370 .RS
1371 .TP
1372 \fIpathName \fByview\fR
1373 Returns a list containing two elements, both of which are real fractions
1374 between 0 and 1.
1375 The first element gives the position of the node at the
1376 top of the window, relative to the widget as a whole (0.5 means
1377 it is halfway through the treeview window, for example).
1378 The second element gives the position of the node just after
1379 the last one in the window, relative to the widget as a whole.
1380 These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR
1381 option.
1382 .TP
1383 \fIpathName \fByview\fR \fItagOrId\fR
1384 Adjusts the view in the window so that the node given by
1385 \fItagOrId\fR is displayed at the top of the window.
1386 .TP
1387 \fIpathName \fByview moveto\fI fraction\fR
1388 Adjusts the view in the window so that the node given by \fIfraction\fR
1389 appears at the top of the window.
1390 \fIFraction\fR is a fraction between 0 and 1;  0 indicates the first
1391 node, 0.33 indicates the node one-third the
1392 way through the \fBtreeview\fR widget, and so on.
1393 .TP
1394 \fIpathName \fByview scroll \fInumber what\fR
1395 This command adjusts the view in the window up or down according to
1396 \fInumber\fR and \fIwhat\fR.
1397 \fINumber\fR must be an integer.
1398 \fIWhat\fR must be either \fBunits\fR or \fBpages\fR.
1399 If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by
1400 \fInumber\fR lines;  if it is \fBpages\fR then
1401 the view adjusts by \fInumber\fR screenfuls.
1402 If \fInumber\fR is negative then earlier nodes
1403 become visible;  if it is positive then later nodes
1404 become visible.
1405 .RE
1406 .SH "TREEVIEW OPTIONS"
1407 In addition to the \fBconfigure\fR operation, widget configuration
1408 options may also be set by the Tk \fBoption\fR command.  The class
1409 resource name is \fBTreeView\fR.
1410 .CS
1411 option add *TreeView.Foreground white
1412 option add *TreeView.Background blue
1413 .CE
1414 The following widget options are available:
1415 .TP
1416 \fB\-activebackground \fIcolor\fR
1417 Sets the background color for active entries.  A node
1418 is active when the mouse passes over it's entry or using the 
1419 \fBactivate\fR operation.  
1420 .TP
1421 \fB\-activeforeground \fIcolor\fR
1422 Sets the foreground color of the active node.  A node
1423 is active when the mouse passes over it's entry or using the 
1424 \fBactivate\fR operation.  
1425 .TP
1426 \fB\-activeicons \fIimages\fR
1427 Specifies images to be displayed for an entry's icon
1428 when it is active. \fIImages\fR is a list of two Tk images: 
1429 the first image is displayed when the node is open, the
1430 second when it is closed.
1431 .TP
1432 \fB\-autocreate \fIboolean\fR
1433 If \fIboolean\fR is true, automatically create missing ancestor 
1434 nodes when inserting new nodes. Otherwise flag an error.
1435 The default is \fBno\fR.
1436 .TP
1437 \fB\-allowduplicates \fIboolean\fR
1438 If \fIboolean\fR is true, allow nodes with duplicate pathnames
1439 when inserting new nodes.  Otherwise flag an error.
1440 The default is \fBno\fR.
1441 .TP
1442 \fB\-background \fIcolor\fR
1443 Sets the background color of the widget.  The default is \fBwhite\fR.
1444 .TP
1445 \fB\-borderwidth \fIpixels\fR
1446 Sets the width of the 3\-D border around the outside edge of the widget.  The
1447 \fB\-relief\fR option determines if the border is to be drawn.  The
1448 default is \fB2\fR.
1449 .TP
1450 \fB\-closecommand \fIstring\fR
1451 Specifies a Tcl script to be invoked when a node is closed.  You can
1452 overrider this for individual entries using the entry's \fB\-closecommand\fR 
1453 option. The default is \fB""\fR.
1454 Percent substitutions are performed on \fIstring\fR before 
1455 it is executed.  The following substitutions are valid:
1456 .RS 
1457 .TP 5
1458 \fB%W\fR
1459 The pathname of the widget.
1460 .TP 5
1461 \fB%p\fR
1462 The name of the node.
1463 .TP 5
1464 \fB%P\fR
1465 The full pathname of the node.
1466 .TP 5
1467 \fB%#\fR
1468 The id of the node.
1469 .TP 5
1470 \fB%%\fR
1471 Translates to a single percent.
1472 .RE
1473 .TP
1474 \fB\-cursor \fIcursor\fR
1475 Specifies the widget's cursor.  The default cursor is \fB""\fR.
1476 .TP
1477 \fB\-dashes \fInumber\fR
1478 Sets the dash style of the horizontal and vertical lines drawn connecting 
1479 entries. \fINumber\fR is the length in pixels of the dashes and gaps in
1480 the line. If \fInumber\fR is \fB0\fR, solid lines will 
1481 be drawn. The default is \fB1\fR (dotted).
1482 .TP
1483 \fB\-exportselection \fIboolean\fR 
1484 Indicates if the selection is exported.  If the widget is exporting its
1485 selection then it will observe the standard X11 protocols for handling
1486 the selection.  Selections are available as type \fBSTRING\fR;
1487 the value of the selection will be the label of the selected nodes,
1488 separated by newlines.  The default is \fBno\fR.
1489 .TP
1490 \fB\-flat \fIboolean\fR
1491 Indicates whether to display the tree as a flattened list. 
1492 If \fIboolean\fR is true, then the hierarchy will be a list of full
1493 paths for the nodes.  This option also has affect on sorting. 
1494 See the 
1495 .SB "SORT OPERATIONS"
1496 section for more information.
1497 The default is \fBno\fR.
1498 .TP
1499 \fB\-focusdashes \fIdashList\fR 
1500 Sets the dash style of the outline rectangle drawn around the entry
1501 label of the node that current has focus. \fINumber\fR is the length
1502 in pixels of the dashes and gaps in the line.  If
1503 \fInumber\fR is \fB0\fR, a solid line will be drawn. The default is
1504 \fB1\fR.
1505 .TP
1506 \fB\-focusforeground \fIcolor\fR 
1507 Sets the color of the focus rectangle. 
1508 The default is \fBblack\fR.
1509 .TP
1510 \fB\-font \fIfontName\fR 
1511 Specifies the font for entry labels.  You can override this for individual
1512 entries with the entry's \fB\-font\fR configuration option.  The default is
1513 \fB*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
1514 .TP
1515 \fB\-foreground \fIcolor\fR 
1516 Sets the text color of entry labels.  You can override this for individual
1517 entries with the entry's \fB\-foreground\fR configuration option.  
1518 The default is
1519 \fBblack\fR.
1520 .TP
1521 \fB\-height \fIpixels\fR
1522 Specifies the requested height of widget.  The default is
1523 \fB400\fR.
1524 .TP
1525 \fB\-hideroot \fIboolean\fR
1526 If \fIboolean\fR is true, it indicates that no entry for the root node 
1527 should be displayed.  The default is \fBno\fR.
1528 .TP 
1529 \fB\-highlightbackground  \fIcolor\fR
1530 Specifies the normal color of the traversal highlight region when
1531 the widget does not have the input focus.  
1532 .TP 
1533 \fB\-highlightcolor \fIcolor\fR
1534 Specifies the color of the traversal highlight rectangle when
1535 the widget has the input focus. 
1536 The default is \fBblack\fR.
1537 .TP 
1538 \fB\-highlightthickness \fIpixels\fR
1539 Specifies the width of the highlight rectangle indicating when the
1540 widget has input focus. The value may have any of the forms acceptable
1541 to \fBTk_GetPixels\fR.  If the value is zero, no focus highlight will
1542 be displayed.  The default is \fB2\fR.
1543 .TP
1544 \fB\-icons \fIimages\fR
1545 Specifies images for the entry's icon.
1546 \fIImages\fR is a list of two Tk images: 
1547 the first image is displayed when the node is open, the
1548 second when it is closed.
1549 .TP
1550 \fB\-linecolor \fIcolor\fR
1551 Sets the color of the connecting lines drawn between entries.  
1552 The default is \fBblack\fR.
1553 .TP
1554 \fB\-linespacing \fIpixels\fR
1555 Sets the number of pixels spacing between entries.  
1556 The default is \fB0\fR.
1557 .TP
1558 \fB\-linewidth \fIpixels\fR
1559 Set the width of the lines drawn connecting entries.  If \fIpixels\fR
1560 is \fB0\fR, no vertical or horizontal lines are drawn. 
1561 The default is \fB1\fR.
1562 .TP
1563 \fB\-opencommand \fIstring\fR
1564 Specifies a Tcl script to be invoked when a node is open.  
1565 You can override this for individual entries with the entry's
1566 \fB\-opencommand\fR configuration option.  The default is \fB""\fR.
1567 Percent substitutions are performed on \fIstring\fR before 
1568 it is executed.  The following substitutions are valid:
1569 .RS 
1570 .TP 5
1571 \fB%W\fR
1572 The pathname of the widget.
1573 .TP 5
1574 \fB%p\fR
1575 The name of the node.
1576 .TP 5
1577 \fB%P\fR
1578 The full pathname of the node.
1579 .TP 5
1580 \fB%#\fR
1581 The id of the node.
1582 .TP 5
1583 \fB%%\fR
1584 Translates to a single percent.
1585 .RE
1586 .TP
1587 \fB\-relief \fIrelief\fR
1588 Specifies the 3-D effect for the widget.  \fIRelief\fR
1589 specifies how the \fBtreeview\fR widget should appear relative to widget 
1590 it is packed into; for example, \fBraised\fR means the \fBtreeview\fR widget 
1591 should appear to protrude.  The default is \fBsunken\fR.
1592 .TP
1593 \fB\-scrollmode \fImode\fR 
1594 Specifies the style of scrolling to be used.  The following
1595 styles are valid.  This is the default is \fBhierbox\fR.
1596 .RS
1597 .TP 1.25i
1598 \fBlistbox\fR
1599 Like the \fBlistbox\fR widget, the last entry can always be
1600 scrolled to the top of the widget window.  This allows the scrollbar
1601 thumb to shrink as the last entry is scrolled upward.
1602 .TP 1.25i
1603 \fBhierbox\fR
1604 Like the \fBhierbox\fR widget, the last entry can only be
1605 viewed at the bottom of the widget window.  The scrollbar
1606 stays a constant size.  
1607 .TP 1.25i
1608 \fBcanvas\fR
1609 Like the \fBcanvas\fR widget, the entries are bound within
1610 the scrolling area. 
1611 .RE
1612 .TP 
1613 \fB\-selectbackground \fIcolor\fR
1614 Sets the background color selected node entries.
1615 The default is \fB#ffffea\fR.
1616 .TP 
1617 \fB\-selectborderwidth \fIpixels\fR
1618 Sets the width of the raised 3-D border drawn around the labels 
1619 of selected entries. The default is \fB0\fR.
1620 \fB\-selectcommand \fIstring\fR
1621 Specifies a Tcl script to invoked when the set of selected
1622 nodes changes.
1623 The default is \fB""\fR.
1624 .TP
1625 \fB\-selectforeground \fIcolor\fB
1626 Sets the color of the labels of selected node entries. 
1627 The default is \fBblack\fR.
1628 .TP 
1629 \fB\-selectmode \fImode\fR
1630 Specifies the selection mode. If \fImode\fR is 
1631 \fBsingle\fR, only one node can be selected
1632 at a time.  If \fBmultiple\fR more than one
1633 node can be selected.
1634 The default is \fBsingle\fR.
1635 .TP
1636 \fB\-separator \fIstring\fR
1637 Specifies the character sequence to use when spliting the path components.  
1638 The separator may be several characters wide (such as "::")
1639 Consecutive separators in a pathname are treated as one.
1640 If \fIstring\fR is the empty string, the pathnames are Tcl lists. 
1641 Each element is a path component.   The default is \fB""\fR.
1642 .TP
1643 \fB\-showtitles \fIboolean\fR
1644 If \fIboolean\fR is false, column titles are not be displayed.  
1645 The default is \fByes\fR.
1646 .TP 
1647 \fB\-sortselection \fIboolean\fR
1648 If \fIboolean\fR is true, nodes in the selection are ordered as they
1649 are currently displayed (depth-first or sorted), not in the order
1650 they were selected. The default is \fBno\fR.
1651 .TP
1652 \fB\-takefocus\fR \fIfocus\fR 
1653 Provides information used when moving the focus from window to window
1654 via keyboard traversal (e.g., Tab and Shift-Tab).  If \fIfocus\fR is
1655 \fB0\fR, this means that this window should be skipped entirely during
1656 keyboard traversal.  \fB1\fR means that the this window should always
1657 receive the input focus.  An empty value means that the traversal
1658 scripts make the decision whether to focus on the window.
1659 The default is \fB"1"\fR.
1660 .TP
1661 \fB\-trim \fIstring\fR
1662 Specifies a string leading characters to trim from entry pathnames 
1663 before parsing.  This only makes sense if the \fB\-separator\fR is also
1664 set.  The default is \fB""\fR.
1665 .TP
1666 \fB\-width \fIpixels\fR
1667 Sets the requested width of the widget.  If \fIpixels\fR is 0, then
1668 the with is computed from the contents of the \fBtreeview\fR widget.
1669 The default is \fB200\fR.
1670 .TP 
1671 \fB\-xscrollcommand \fIstring\fR
1672 Specifies the prefix for a command used to communicate with horizontal
1673 scrollbars.  Whenever the horizontal view in the widget's window 
1674 changes, the widget will generate a Tcl command by concatenating the 
1675 scroll command and two numbers.  If this option is not specified, then 
1676 no command will be executed.
1677 .TP
1678 \fB\-xscrollincrement\fR \fIpixels\fR
1679 Sets the horizontal scrolling distance. The default is 20 pixels.
1680 .TP
1681 \fB\-yscrollcommand \fIstring\fR
1682 Specifies the prefix for a command used to communicate with vertical
1683 scrollbars.   Whenever the vertical view in the widget's window 
1684 changes, the widget will generate a Tcl command by concatenating the 
1685 scroll command and two numbers.  If this option is not specified, then 
1686 no command will be executed.
1687 .TP
1688 \fB\-yscrollincrement\fR \fIpixels\fR
1689 Sets the vertical scrolling distance. The default is 20 pixels.
1690 .SH "ENTRY OPTIONS"
1691 Many widget configuration options have counterparts in entries.  For
1692 example, there is a \fB\-closecommand\fR configuration option for both
1693 widget itself and for individual entries.  Options set at the widget
1694 level are global for all entries.  If the entry configuration option
1695 is set, then it overrides the widget option.  This is done to avoid
1696 wasting memory by replicated options.  Most entries will have
1697 redundant options.
1698 .PP
1699 There is no resource class or name for entries.
1700 .TP
1701 \fB\-activeicons \fIimages\fR
1702 Specifies images to be displayed as the entry's icon
1703 when it is active. This overrides the global \fB\-activeicons\fR
1704 configuration option for the specific entry.
1705 \fIImages\fR is a list of two Tk images: 
1706 the first image is displayed when the node is open, the
1707 second when it is closed.
1708 .TP
1709 \fB\-bindtags \fItagList\fR
1710 Specifies the binding tags for nodes.  \fITagList\fR is a list
1711 of binding tag names.  The tags and their order will determine how
1712 events are handled for nodes.  Each tag in the list matching the current 
1713 event sequence will have its Tcl command executed.  The default value 
1714 is \fBall\fR.
1715 .TP
1716 \fB\-button \fIstring\fR
1717 Indicates whether a button should be displayed on the left side
1718 of the node entry.  \fIString\fR can be \fByes\fR, \fBno\fR, 
1719 or \fBauto\fR.  If \fBauto\fR, then a button is automatically
1720 displayed if the node has children.  This is the default.
1721 .TP
1722 \fB\-closecommand \fIstring\fR
1723 Specifies a Tcl script to be invoked when the node is closed.  This
1724 overrides the global \fB\-closecommand\fR option for this entry.
1725 The default is \fB""\fR.
1726 Percent substitutions are performed on \fIstring\fR before 
1727 it is executed.  The following substitutions are valid:
1728 .RS 
1729 .TP 5
1730 \fB%W\fR
1731 The pathname of the widget.
1732 .TP 5
1733 \fB%p\fR
1734 The name of the node.
1735 .TP 5
1736 \fB%P\fR
1737 The full pathname of the node.
1738 .TP 5
1739 \fB%#\fR
1740 The id of the node.
1741 .TP 5
1742 \fB%%\fR
1743 Translates to a single percent.
1744 .RE
1745 .TP
1746 \fB\-data \fIstring\fR
1747 Sets data fields for the node.  \fIString\fR is a list of 
1748 name-value pairs to be set. The default is \fB""\fR.
1749 .TP
1750 \fB\-font \fIfontName\fR 
1751 Sets the font for entry labels.  This overrides the widget's
1752 \fB\-font\fR option for this node.  The default is
1753 \fB*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
1754 .TP
1755 \fB\-foreground \fIcolor\fR 
1756 Sets the text color of the entry label.  This overrides the widget's
1757 \fB\-foreground\fR configuration option.  The default is \fB""\fR.
1758 .TP
1759 \fB\-icons \fIimages\fR
1760 Specifies images to be displayed for the entry's icon.
1761 This overrides the global \fB\-icons\fR configuration option.
1762 \fIImages\fR is a list of two Tk images: 
1763 the first image is displayed when the node is open, the
1764 second when it is closed.
1765 .TP
1766 \fB\-label \fIstring\fR
1767 Sets the text for the entry's label.  If not set, this 
1768 defaults to the name of the node. The default is \fB""\fR.
1769 .TP
1770 \fB\-opencommand \fIstring\fR
1771 Specifies a Tcl script to be invoked when the entry is opened.  
1772 This overrides the widget's \fB\-opencommand\fR option for this node.  
1773 The default is \fB""\fR. 
1774 Percent substitutions are performed on \fIstring\fR before 
1775 it is executed.  The following substitutions are valid:
1776 .RS 
1777 .TP 5
1778 \fB%W\fR
1779 The pathname of the widget.
1780 .TP 5
1781 \fB%p\fR
1782 The name of the node.
1783 .TP 5
1784 \fB%P\fR
1785 The full pathname of the node.
1786 .TP 5
1787 \fB%#\fR
1788 The id of the node.
1789 .TP 5
1790 \fB%%\fR
1791 Translates to a single percent.
1792 .RE
1793 .SH "BUTTON OPTIONS"
1794 Button configuration options may also be set by the \fBoption\fR command.
1795 The resource subclass is \fBButton\fR.   The resource name is always
1796 \fBbutton\fR.
1797 .CS
1798 option add *TreeView.Button.Foreground white
1799 option add *TreeView.button.Background blue
1800 .CE
1801 The following are the configuration options available for buttons.
1802 .TP
1803 \fB\-activebackground \fIcolor\fR
1804 Sets the background color of active buttons.  A button
1805 is made active when the mouse passes over it or by the 
1806 \fBbutton activate\fR operation.  
1807 .TP
1808 \fB\-activeforeground \fIcolor\fR
1809 Sets the foreground color of active buttons.  A button
1810 is made active when the mouse passes over it or by the 
1811 \fBbutton activate\fR operation.  
1812 .TP
1813 \fB\-background \fIcolor\fR
1814 Sets the background of the button.  The default is \fBwhite\fR.
1815 .TP
1816 \fB\-borderwidth \fIpixels\fR
1817 Sets the width of the 3\-D border around the button.  
1818 The \fB\-relief\fR option determines if a border is to be drawn.  The
1819 default is \fB1\fR.
1820 .TP
1821 \fB\-closerelief \fIrelief\fR
1822 Specifies the 3-D effect for the closed button.  \fIRelief\fR
1823 indicates how the button should appear relative to the widget; 
1824 for example, \fBraised\fR means the button should
1825 appear to protrude.  The default is \fBsolid\fR.
1826 .TP
1827 \fB\-cursor \fIcursor\fR
1828 Sets the widget's cursor.  The default cursor is \fB""\fR.
1829 .TP
1830 \fB\-foreground \fIcolor\fR 
1831 Sets the foreground color of buttons. 
1832 The default is \fBblack\fR.
1833 .TP
1834 \fB\-images \fIimages\fR
1835 Specifies images to be displayed for the button.
1836 \fIImages\fR is a list of two Tk images: 
1837 the first image is displayed when the button is open, the
1838 second when it is closed.  If the \fIimages\fR is the empty string,
1839 then a plus/minus gadget is drawn.  The default is \fB""\fR.
1840 .TP
1841 \fB\-openrelief \fIrelief\fR
1842 Specifies the 3-D effect of the open button.  \fIRelief\fR
1843 indicates how the button should appear relative to the widget; 
1844 for example, \fBraised\fR means the button should
1845 appear to protrude.  The default is \fBflat\fR.
1846 .TP
1847 \fB\-size \fIpixels\fR
1848 Sets the requested size of the button.  
1849 The default is \fB0\fR.
1850 .RE
1851 .SH "COLUMN OPTIONS"
1852 Column configuration options may also be set by the \fBoption\fR command.
1853 The resource subclass is \fBColumn\fR.   The resource name is the 
1854 name of the column.
1855 .CS
1856 option add *TreeView.Column.Foreground white
1857 option add *TreeView.treeView.Background blue
1858 .CE
1859 The following configuration options are available for columns.
1860 .TP
1861 \fB\-background \fIcolor\fR
1862 Sets the background color of the column.  This overrides
1863 the widget's \fB\-background\fR option. The default is \fBwhite\fR.
1864 .TP
1865 \fB\-borderwidth \fIpixels\fR
1866 Sets the width of the 3\-D border of the column.  
1867 The \fB\-relief\fR option determines if a border is to be drawn.  The
1868 default is \fB0\fR.
1869 .TP
1870 \fB\-edit \fIboolean\fR
1871 Indicates if the column's data fields can be edited. If \fIboolean\fR is 
1872 false, the data fields in the column may not be edited.
1873 The default is \fByes\fR.
1874 .TP
1875 \fB\-foreground \fIcolor\fR 
1876 Specifies the foreground color of the column. 
1877 You can override this for individual entries with the entry's 
1878 \fB\-foreground\fR option.
1879 The default is \fBblack\fR.
1880 .TP
1881 \fB\-font \fIfontName\fR 
1882 Sets the font for a column.  You can override this for individual entries
1883 with the entry's \fB\-font\fR option.  The default is
1884 \fB*-Helvetica-Bold-R-Normal-*-12-120-*\fR.
1885 .TP
1886 \fB\-hide \fIboolean\fR
1887 If \fIboolean\fR is true, the column is not displayed.
1888 The default is \fByes\fR.
1889 .TP
1890 \fB\-justify \fIjustify\fR
1891 Specifies how the column data fields title should be justified within
1892 the column.  This matters only when the column is wider than the 
1893 data field to be display.
1894 \fIJustify\fR must be \fBleft\fR, \fBright\fR, or \fBcenter\fR.  
1895 The default is \fBleft\fR.
1896 .TP
1897 \fB\-pad \fIpad\fR
1898 Specifies how much padding for the left and right sides of the column.
1899 \fIPad\fR is a list of one or two screen distances.  If \fIpad\fR
1900 has two elements, the left side of the column is padded by the first
1901 distance and the right side by the second.  If \fIpad\fR has just one
1902 distance, both the left and right sides are padded evenly.  The
1903 default is \fB2\fR.
1904 .TP
1905 \fB\-relief \fIrelief\fR
1906 Specifies the 3-D effect of the column.  \fIRelief\fR
1907 specifies how the column should appear relative to the widget; 
1908 for example, \fBraised\fR means the column should
1909 appear to protrude.  The default is \fBflat\fR.
1910 .TP
1911 \fB\-state \fIstate\fR
1912 Sets the state of the column. If \fIstate\fR is \fBdisable\fR then
1913 the column title can not be activated nor invoked.
1914 The default is \fBnormal\fR.
1915 .TP
1916 \fB\-text \fIstring\fR
1917 Sets the title for the column.
1918 The default is \fB""\fR.
1919 .TP
1920 \fB\-titleforeground \fIcolor\fR 
1921 Sets the foreground color of the column title. 
1922 The default is \fBblack\fR.
1923 .TP
1924 \fB\-titleshadow \fIcolor\fR 
1925 Sets the color of the drop shadow of the column title.  
1926 The default is \fB""\fR.
1927 .TP
1928 \fB\-width \fIpixels\fR
1929 Sets the requested width of the column.  This overrides
1930 the computed with of the column.  If \fIpixels\fR is 0,
1931 the width is computed as from the contents of the column. The
1932 default is \fB0\fR.
1933 .RE
1934 .SH "TEXT EDITING OPTIONS"
1935 Text edit window configuration options may also be set by the 
1936 \fBoption\fR command. The resource class is \fBTreeViewEditor\fR.
1937 The resource name is always \fBedit\fR.
1938 .CS
1939 option add *TreeViewEditor.Foreground white
1940 option add *edit.Background blue
1941 .CE
1942 The following are the configuration options available for the
1943 text editing window.
1944 .TP
1945 \fB\-background \fIcolor\fR
1946 Sets the background of the text edit window.  The default is \fBwhite\fR.
1947 .TP
1948 \fB\-borderwidth \fIpixels\fR
1949 Sets the width of the 3\-D border around the edit window.  
1950 The \fB\-relief\fR option determines if a border is to be drawn.  The
1951 default is \fB1\fR.
1952 .TP
1953 \fB\-exportselection \fIboolean\fR
1954 Indicates if the text selection is exported.  If the edit window is 
1955 exporting its selection then it will observe the standard X11 protocols 
1956 for handling the selection.  Selections are available as type \fBSTRING\fR.
1957 The default is \fBno\fR.
1958 .TP
1959 \fB\-relief \fIrelief\fR
1960 Specifies the 3-D effect of the edit window.  \fIRelief\fR
1961 indicates how the background should appear relative to the edit
1962 window; for example, \fBraised\fR means the background should
1963 appear to protrude.  The default is \fBsolid\fR.
1964 .TP
1965 \fB\-selectbackground \fIcolor\fR
1966 Sets the background of the selected text in the edit window.  
1967 The default is \fBwhite\fR.
1968 .TP
1969 \fB\-selectborderwidth \fIpixels\fR
1970 Sets the width of the 3\-D border around the selected text in the 
1971 edit window.  The \fB\-selectrelief\fR option determines if a border 
1972 is to be drawn.  The default is \fB1\fR.
1973 .TP
1974 \fB\-selectforeground \fIcolor\fR
1975 Sets the foreground of the selected text in the edit window.  
1976 The default is \fBwhite\fR.
1977 .TP
1978 \fB\-selectrelief \fIrelief\fR
1979 Specifies the 3-D effect of the selected text in the edit window.  
1980 \fIRelief\fR indicates how the text should appear relative to the edit
1981 window; for example, \fBraised\fR means the text should
1982 appear to protrude.  The default is \fBflat\fR.
1983 .RE
1984 .SH "DEFAULT BINDINGS"
1985 Tk automatically creates class bindings for treeviews that give them
1986 Motif-like behavior.  Much of the behavior of a \fBtreeview\fR widget is determined
1987 by its \fB\-selectmode\fR option, which selects one of two ways
1988 of dealing with the selection.
1989 .PP
1990 If the selection mode is \fBsingle\fR, only one node can be 
1991 selected at a time.
1992 Clicking button 1 on an node selects
1993 it and deselects any other selected item.
1994 .PP
1995 If the selection mode is \fBmultiple\fR,
1996 any number of entries may be selected at once, including discontiguous
1997 ranges.  Clicking Control-Button-1 on a node entry
1998 toggles its selection state without affecting any other entries.
1999 Pressing Shift-Button-1 on a node entry selects
2000 it, extends the selection.
2001 .IP [1]
2002 In \fBextended\fR mode, the selected range can be adjusted by pressing
2003 button 1 with the Shift key down:  this modifies the selection to
2004 consist of the entries between the anchor and the entry under
2005 the mouse, inclusive.
2006 The un-anchored end of this new selection can also be dragged with
2007 the button down.
2008 .IP [2]
2009 In \fBextended\fR mode, pressing button 1 with the Control key down
2010 starts a toggle operation: the anchor is set to the entry under
2011 the mouse, and its selection state is reversed.  The selection state
2012 of other entries isn't changed.
2013 If the mouse is dragged with button 1 down, then the selection state
2014 of all entries between the anchor and the entry under the mouse
2015 is set to match that of the anchor entry;  the selection state of
2016 all other entries remains what it was before the toggle operation
2017 began.
2018 .IP [3]
2019 If the mouse leaves the treeview window with button 1 down, the window
2020 scrolls away from the mouse, making information visible that used
2021 to be off-screen on the side of the mouse.
2022 The scrolling continues until the mouse re-enters the window, the
2023 button is released, or the end of the hierarchy is reached.
2024 .IP [4]
2025 Mouse button 2 may be used for scanning.
2026 If it is pressed and dragged over the \fBtreeview\fR widget, the contents of
2027 the hierarchy drag at high speed in the direction the mouse moves.
2028 .IP [5]
2029 If the Up or Down key is pressed, the location cursor (active
2030 entry) moves up or down one entry.
2031 If the selection mode is \fBbrowse\fR or \fBextended\fR then the
2032 new active entry is also selected and all other entries are
2033 deselected.
2034 In \fBextended\fR mode the new active entry becomes the
2035 selection anchor.
2036 .IP [6]
2037 In \fBextended\fR mode, Shift-Up and Shift-Down move the location
2038 cursor (active entry) up or down one entry and also extend
2039 the selection to that entry in a fashion similar to dragging
2040 with mouse button 1.
2041 .IP [7]
2042 The Left and Right keys scroll the \fBtreeview\fR widget view left and right
2043 by the width of the character \fB0\fR.
2044 Control-Left and Control-Right scroll the \fBtreeview\fR widget view left and
2045 right by the width of the window.
2046 Control-Prior and Control-Next also scroll left and right by
2047 the width of the window.
2048 .IP [8]
2049 The Prior and Next keys scroll the \fBtreeview\fR widget view up and down
2050 by one page (the height of the window).
2051 .IP [9]
2052 The Home and End keys scroll the \fBtreeview\fR widget horizontally to
2053 the left and right edges, respectively.
2054 .IP [10]
2055 Control-Home sets the location cursor to the the first entry, 
2056 selects that entry, and deselects everything else
2057 in the widget.
2058 .IP [11]
2059 Control-End sets the location cursor to the the last entry, 
2060 selects that entry, and deselects everything else
2061 in the widget.
2062 .IP [12]
2063 In \fBextended\fR mode, Control-Shift-Home extends the selection
2064 to the first entry and Control-Shift-End extends
2065 the selection to the last entry.
2066 .IP [13]
2067 In \fBmultiple\fR mode, Control-Shift-Home moves the location cursor
2068 to the first entry and Control-Shift-End moves
2069 the location cursor to the last entry.
2070 .IP [14]
2071 The space and Select keys make a selection at the location cursor
2072 (active entry) just as if mouse button 1 had been pressed over
2073 this entry.
2074 .IP [15]
2075 In \fBextended\fR mode, Control-Shift-space and Shift-Select
2076 extend the selection to the active entry just as if button 1
2077 had been pressed with the Shift key down.
2078 .IP [16]
2079 In \fBextended\fR mode, the Escape key cancels the most recent
2080 selection and restores all the entries in the selected range
2081 to their previous selection state.
2082 .IP [17]
2083 Control-slash selects everything in the widget, except in
2084 \fBsingle\fR and \fBbrowse\fR modes, in which case it selects
2085 the active entry and deselects everything else.
2086 .IP [18]
2087 Control-backslash deselects everything in the widget, except in
2088 \fBbrowse\fR mode where it has no effect.
2089 .IP [19]
2090 The F16 key (labelled Copy on many Sun workstations) or Meta-w
2091 copies the selection in the widget to the clipboard, if there is
2092 a selection.
2093 .PP
2094 The behavior of \fBtreeview\fR widgets can be changed by defining new bindings 
2095 for individual widgets or by redefining the class bindings.
2096 .SS WIDGET BINDINGS
2097 In addition to the above behavior, the following additional behavior
2098 is defined by the default widget class (TreeView) bindings.
2099 .IP \fB<ButtonPress-2>\fR 
2100 Starts scanning. 
2101 .IP \fB<B2-Motion>\fR 
2102 Adjusts the scan.
2103 .IP \fB<ButtonRelease-2>\fR
2104 Stops scanning.
2105 .IP \fB<B1-Leave>\fR 
2106 Starts auto-scrolling.
2107 .IP \fB<B1-Enter>\fR
2108 Starts auto-scrolling 
2109 .IP \fB<KeyPress-Up>\fR 
2110 Moves the focus to the previous entry.
2111 .IP \fB<KeyPress-Down>\fR 
2112 Moves the focus to the next entry.
2113 .IP \fB<Shift-KeyPress-Up>\fR
2114 Moves the focus to the previous sibling.
2115 .IP \fB<Shift-KeyPress-Down>\fR
2116 Moves the focus to the next sibling.
2117 .IP \fB<KeyPress-Prior>\fR 
2118 Moves the focus to first entry.  Closed or hidden entries
2119 are ignored.
2120 .IP \fB<KeyPress-Next>\fR 
2121 Move the focus to the last entry. Closed or hidden entries
2122 are ignored.
2123 .IP \fB<KeyPress-Left>\fR 
2124 Closes the entry.  It is not an error if the entry has no children.
2125 .IP \fB<KeyPress-Right>\fR 
2126 Opens the entry, displaying its children.  It is not an
2127 error if the entry has no children.
2128 .IP \fB<KeyPress-space>\fR 
2129 In "single" select mode this selects the entry.  In "multiple" mode,
2130 it toggles the entry (if it was previous selected, it is not
2131 deselected).
2132 .IP \fB<KeyRelease-space>\fR 
2133 Turns off select mode.
2134 .IP \fB<KeyPress-Return>\fR 
2135 Sets the focus to the current entry.
2136 .IP \fB<KeyRelease-Return>\fR 
2137 Turns off select mode.
2138 .IP \fB<KeyPress>\fR 
2139 Moves to the next entry whose label starts with the letter typed.
2140 .IP \fB<KeyPress-Home>\fR 
2141 Moves the focus to first entry.  Closed or hidden entries
2142 are ignored.
2143 .IP \fB<KeyPress-End>\fR 
2144 Move the focus to the last entry. Closed or hidden entries
2145 are ignored.
2146 .IP \fB<KeyPress-F1>\fR 
2147 Opens all entries.
2148 .IP \fB<KeyPress-F2>\fR
2149 Closes all entries (except root).
2150 .SS BUTTON BINDINGS
2151 Buttons have bindings.  There are associated with the "all" bindtag
2152 (see the entry's -bindtag option).  You can use the \fBbind\fR
2153 operation to change them.
2154 .IP \fB<Enter>\fR 
2155 Highlights the button of the current entry.
2156 .IP \fB<Leave>\fR 
2157 Returns the button back to its normal state.
2158 .IP \fB<ButtonRelease-1>\fR
2159 Adjust the view so that the current entry is visible.
2160 .SS ENTRY BINDINGS
2161 Entries have default bindings.  There are associated with the "all"
2162 bindtag (see the entry's -bindtag option).  You can use the \fBbind\fR
2163 operation to modify them.
2164 .IP \fB<Enter>\fR 
2165 Highlights the current entry.
2166 .IP \fB<Leave>\fR 
2167 Returns the entry back to its normal state.
2168 .IP \fB<ButtonPress-1>\fR 
2169 Sets the selection anchor the current entry.
2170 .IP \fB<Double-ButtonPress-1>\fR
2171 Toggles the selection of the current entry.
2172 .IP \fB<B1-Motion>\fR
2173 For "multiple" mode only.  Saves the current location of the
2174 pointer for auto-scrolling.  Resets the selection mark.  
2175 .IP \fB<ButtonRelease-1>\fR
2176 For "multiple" mode only.  Sets the selection anchor to the 
2177 current entry.
2178 .IP \fB<Shift-ButtonPress-1>\fR
2179 For "multiple" mode only. Extends the selection.
2180 .IP \fB<Shift-Double-ButtonPress-1>\fR 
2181 Place holder. Does nothing.
2182 .IP \fB<Shift-B1-Motion>\fR 
2183 Place holder. Does nothing.
2184 .IP \fB<Shift-ButtonRelease-1>\fR 
2185 Stop auto-scrolling.
2186 .IP \fB<Control-ButtonPress-1>\fR 
2187 For "multiple" mode only.  Toggles and extends the selection.
2188 .IP \fB<Control-Double-ButtonPress-1>\fR
2189 Place holder. Does nothing.
2190 .IP \fB<Control-B1-Motion>\fR 
2191 Place holder. Does nothing.
2192 .IP \fB<Control-ButtonRelease-1>\fR 
2193 Stops auto-scrolling.
2194 .IP \fB<Control-Shift-ButtonPress-1>\fR 
2195 ???
2196 .IP \fB<Control-Shift-Double-ButtonPress-1>\fR
2197 Place holder. Does nothing.
2198 .IP \fB<Control-Shift-B1-Motion>\fR 
2199 Place holder. Does nothing.
2200 .SS COLUMN BINDINGS
2201 Columns have bindings too.  They are associated with the column's
2202 "all" bindtag (see the column -bindtag option).  You can use the
2203 \fBcolumn bind\fR operation to change them.
2204 .IP \fB<Enter>\fR 
2205 Highlights the current column title.
2206 .IP \fB<Leave>\fR 
2207 Returns the column back to its normal state.
2208 .IP \fB<ButtonRelease-1>\fR
2209 Invokes the command (see the column's -command option) if one
2210 if specified.  
2211 .SS COLUMN RULE BINDINGS
2212 .IP \fB<Enter>\fR 
2213 Highlights the current and activates the ruler.
2214 .IP \fB<Leave>\fR 
2215 Returns the column back to its normal state. Deactivates the
2216 ruler.
2217 .IP \fB<ButtonPress-1>\fR 
2218 Sets the resize anchor for the column.
2219 .IP \fB<B1-Motion>\fR 
2220 Sets the resize mark for the column.
2221 .IP \fB<ButtonRelease-1>\fR 
2222 Adjust the size of the column, based upon the resize anchor and mark
2223 positions.
2224 .SH EXAMPLE
2225 The \fBtreeview\fR command creates a new widget.  
2226 .CS
2227 treeview .h \-bg white
2228 .CE
2229 A new Tcl command \fB.h\fR is also created.  This command can be used
2230 to query and modify the \fBtreeview\fR widget.  For example, to change the 
2231 background
2232 color of the table to "green", you use the new command and the widget's
2233 \fBconfigure\fR operation.
2234 .CS
2235 # Change the background color.
2236 \&.h configure \-background "green"
2237 .CE
2238 By default, the \fBtreeview\fR widget will automatically create a new tree object
2239 to contain the data.  The name of the new tree is the pathname of the
2240 widget.  Above, the new tree object name is ".h".  But you can use the
2241 \fB\-tree\fR option to specify the name of another tree.
2242 .CS
2243 # View the tree "myTree".
2244 \&.h configure \-tree "myTree"
2245 .CE
2246 When a new tree is created, it contains only a root node.  The node
2247 is automatically opened.  The id of the root node is always
2248 \fB0\fR (you can use also use the special id \fBroot\fR). The
2249 \fBinsert\fR operation lets you insert one or more new entries into
2250 the tree.  The last argument is the node's \fIpathname\fR.  
2251 .CS
2252 # Create a new entry named "myEntry"
2253 set id [\&.h insert end "myEntry"]
2254 .CE
2255 This appends a new node named "myEntry".  It will positioned as the
2256 last child of the root of the tree (using the position "end").  You
2257 can supply another position to order the node within its siblings.
2258 .CS
2259 # Prepend "fred".
2260 set id [\&.h insert 0 "fred"]
2261 .CE
2262 Entry names do not need to be unique.  By default, the node's label
2263 is its name.  To supply a different text label, add the \fB\-label\fR
2264 option.
2265 .CS
2266 # Create a new node named "fred"
2267 set id [\&.h insert end "fred" -label "Fred Flintstone"]
2268 .CE
2269 The \fBinsert\fR operation returns the id of the new node.  You can
2270 also use the \fBindex\fR operation to get this information.
2271 .CS
2272 # Get the id of "fred"
2273 \&.h index "fred"
2274 .CE
2275 To insert a node somewhere other than root, use the \fB\-at\fR switch.
2276 It takes the id of the node where the new child will be added.
2277 .CS
2278 # Create a new node "barney" in "fred".
2279 \&.h insert -at $id end "barney" 
2280 .CE
2281 A pathname describes the path to an entry in the hierarchy.  It's a
2282 list of entry names that compose the path in the tree.  Therefore, you
2283 can also add "barney" to "fred" as follows.
2284 .CS
2285 # Create a new sub-entry of "fred"
2286 \&.h insert end "fred barney" 
2287 .CE
2288 Every name in the list is ancestor of the next.  All ancestors must
2289 already exist.  That means that an entry "fred" is an ancestor of
2290 "barney" and must already exist.  But you can use the
2291 \fB\-autocreate\fR configuration option to force the creation of
2292 ancestor nodes.
2293 .CS
2294 # Force the creation of ancestors.
2295 \&.h configure -autocreate yes 
2296 \&.h insert end "fred barney wilma betty" 
2297 .CE
2298 Sometimes the pathname is already separated by a character sequence
2299 rather than formed as a list.  A file name is a good example of this.
2300 You can use the \fB\-separator\fR option to specify a separator string
2301 to split the path into its components.  Each pathname inserted is
2302 automatically split using the separator string as a separator.
2303 Multiple separators are treated as one.
2304 .CS
2305 \&.h configure -separator /
2306 \&.h insert end "/usr/local/tcl/bin" 
2307 .CE
2308 If the path is prefixed by extraneous characters, you can
2309 automatically trim it off using the \fB\-trim\fR option.  It removed
2310 the string from the path before it is parsed.
2311 .CS
2312 \&.h configure -trim C:/windows -separator /
2313 \&.h insert end "C:/window/system" 
2314 .CE
2315 You can insert more than one entry at a time with the \fBinsert\fR
2316 operation.  This can be much faster than looping over a list of names.
2317 .CS
2318 # The slow way
2319 foreach f [glob $dir/*] {
2320     \&.h insert end $f
2321 }
2322 # The fast way
2323 eval .h insert end [glob $dir/*]
2324 .CE
2325 In this case, the \fBinsert\fR operation will return a list of ids
2326 of the new entries.
2327 .PP
2328 You can delete entries with the \fBdelete\fR operation.  It takes one or
2329 more tags of ids as its argument. It deletes the entry and all its
2330 children.
2331 .CS
2332 \&.h delete $id
2333 .CE
2334 Entries have several configuration options.  They control the appearance
2335 of the entry's icon and label.  We have already seen the \fB\-label\fR
2336 option that sets the entry's text label.   The \fBentry configure\fR
2337 operation lets you set or modify an entry's configuration options.
2338 .CS
2339 \&.h entry configure $id -color red -font fixed
2340 .CE
2341 You can hide an entry and its children using the \fB\-hide\fR option.
2342 .CS
2343 \&.h entry configure $id -hide yes
2344 .CE
2345 More that one entry can be configured at once.  All entries specified
2346 are configured with the same options.
2347 .CS
2348 \&.h entry configure $i1 $i2 $i3 $i4 -color brown 
2349 .CE
2350 An icon is displayed for each entry.  It's a Tk image drawn to the
2351 left of the label.  You can set the icon with the entry's
2352 \fB\-icons\fR option.  It takes a list of two image names: one to
2353 represent the open entry, another when it is closed.
2354 .CS
2355 set im1 [image create photo -file openfolder.gif]
2356 set im2 [image create photo -file closefolder.gif]
2357 \&.h entry configure $id -icons "$im1 $im2"
2358 .CE
2359 If \fB\-icons\fR is set to the empty string, no icons are display.
2360 .PP
2361 If an entry has children, a button is displayed to the left of the
2362 icon. Clicking the mouse on this button opens or closes the
2363 sub-hierarchy.  The button is normally a \fB+\fR or \fB\-\fR
2364 symbol, but can be configured in a variety of ways using the \fBbutton
2365 configure\fR operation.  For example, the \fB+\fR and \fB\-\fR
2366 symbols can be replaced with Tk images.
2367 .CS
2368 set im1 [image create photo -file closefolder.gif]
2369 set im2 [image create photo -file downarrow.gif]
2370 \&.h button configure $id -images "$im1 $im2" \\
2371     -openrelief raised -closerelief raised
2372 .CE
2373 Entries can contain an arbitrary number of \fIdata fields\fR.  Data
2374 fields are name-value pairs.  Both the value and name are strings.
2375 The entry's \fB\-data\fR option lets you set data fields.
2376 .CS
2377 \&.h entry configure $id -data {mode 0666 group users}
2378 .CE
2379 The \fB\-data\fR takes a list of name-value pairs.  
2380 .PP
2381 You can display these data fields as \fIcolumns\fR in the
2382 \fBtreeview\fR widget.  You can create and configure columns with
2383 the \fBcolumn\fR operation.  For example, to add a new column to the
2384 widget, use the \fBcolumn insert\fR operation.  The last argument is
2385 the name of the data field that you want to display.
2386 .CS
2387 \&.h column insert end "mode"
2388 .CE
2389 The column title is displayed at the top of the column.  By default,
2390 it's is the field name.  You can override this using the column's
2391 \fB\-text\fR option.
2392 .CS
2393 \&.h column insert end "mode" -text "File Permissions"
2394 .CE
2395 Columns have several configuration options.  The \fBcolumn
2396 configure\fR operation lets you query or modify column options.
2397 .CS
2398 \&.h column configure "mode" -justify left
2399 .CE
2400 The \fB\-justify\fR option says how the data is justified within in
2401 the column.  The \fB\-hide\fR option indicates whether the column is
2402 displayed.
2403 .CS
2404 \&.h column configure "mode" -hide yes
2405 .CE
2406 Entries can be selected by clicking on the mouse.  Selected entries
2407 are drawn using the colors specified by the \fB\-selectforeground\fR 
2408 and \fB\-selectbackground\fR configuration options.
2409 The selection itself is managed by the \fBselection\fR operation.
2410 .CS
2411 # Clear all selections
2412 \&.h selection clear 0 end
2413 # Select the root node
2414 \&.h selection set 0 
2415 .CE
2416 The \fBcurselection\fR operation returns a list of ids of
2417 all the selected entries.
2418 .CS
2419 set ids [\&.h curselection]
2420 .CE
2421 You can use the \fBget\fR operation to convert the ids to 
2422 their pathnames.
2423 .CS
2424 set names [eval .h get -full $ids]
2425 .CE
2426 If a treeview is exporting its selection (using the
2427 \fB\-exportselection\fR option), then it will observe the standard X11
2428 protocols for handling the selection.  Treeview selections are
2429 available as type \fBSTRING\fR; the value of the selection will be the
2430 pathnames of the selected entries, separated by newlines.
2431 .PP
2432 The \fBtreeview\fR supports two modes of selection: \fBsingle\fR
2433 and \fBmultiple\fR.  In single select mode, only one entry can be
2434 selected at a time, while multiple select mode allows several entries
2435 to be selected.  The mode is set by the widget's \fB\-selectmode\fR
2436 option.
2437 .CS
2438 \&.h configure -selectmode "multiple"
2439 .CE
2440 You can be notified when the list of selected entries changes.  The widget's
2441 \fB\-selectcommand\fR specifies a Tcl procedure that is called whenever
2442 the selection changes.
2443 .CS
2444 proc SelectNotify { widget } {
2445    set ids [\&$widget curselection]
2446 }
2447 \&.h configure -selectcommand "SelectNotify .h"
2448 .CE
2449 The widget supports the standard Tk scrolling and scanning operations.
2450 The \fBtreeview\fR can be both horizontally and vertically. You can
2451 attach scrollbars to the \fBtreeview\fR the same way as the listbox
2452 or canvas widgets.
2453 .CS
2454 scrollbar .xbar -orient horizontal -command ".h xview"
2455 scrollbar .ybar -orient vertical -command ".h yview"
2456 \&.h configure -xscrollcommand ".xbar set" \\
2457     -yscrollcommand ".ybar set"
2458 .CE
2459 There are three different modes of scrolling: \fBlistbox\fR,
2460 \fBcanvas\fR, and \fBhierbox\fR.  In \fBlistbox\fR mode, the last
2461 entry can always be scrolled to the top of the widget.  In \fBhierbox\fR
2462 mode, the last entry is always drawn at the bottom of the widget.
2463 The scroll mode is set by the widget's \fB\-selectmode\fR
2464 option.
2465 .CS
2466 \&.h configure -scrollmode "listbox"
2467 .CE
2468 Entries can be programmatically opened or closed using the \fBopen\fR
2469 and \fBclose\fR operations respectively.  
2470 .CS
2471 \&.h open $id
2472 \&.h close $id
2473 .CE
2474 When an entry is opened, a Tcl procedure can be automatically invoked.
2475 The \fB\-opencommand\fR option specifies this procedure.  This
2476 procedure can lazily insert entries as needed.
2477 .CS
2478 proc AddEntries { dir } {
2479    eval .h insert end [glob -nocomplain $dir/*] 
2480 }
2481 \&.h configure -opencommand "AddEntries %P"
2482 .CE
2483 Now when an entry is opened, the procedure \fBAddEntries\fR is
2484 called and adds children to the entry.  Before the command is invoked,
2485 special "%" substitutions (like \fBbind\fR) are performed. Above,
2486 \fB%P\fR is translated to the pathname of the entry.
2487 .PP
2488 The same feature exists when an entry is closed.  The
2489 \fB\-closecommand\fR option specifies the procedure.
2490 .CS
2491 proc DeleteEntries { id } {
2492    .h entry delete $id 0 end
2493 }
2494 \&.h configure -closecommand "DeleteEntries %#"
2495 .CE
2496 When an entry is closed, the procedure \fBDeleteEntries\fR is called
2497 and deletes the entry's children using the \fBentry delete\fR operation
2498 (\fB%#\fR is the id of entry).
2499 .SH KEYWORDS
2500 treeview, widget