# Copyright (c) 1996, Expert Interface Technologies # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # The file man.macros and some of the macros used by this file are # copyrighted: (c) 1990 The Regents of the University of California. # (c) 1994-1995 Sun Microsystems, Inc. # The license terms of the Tcl/Tk distribution are in the file # license.tcl. =head1 NAME Tk::HList - Create and manipulate Tix Hierarchial List widgets =for category Tk Widget Classes =head1 SYNOPSIS I<$hlist> = I<$parent>-EB(?I?); =head1 STANDARD OPTIONS B<-background> B<-borderwidth> B<-cursor> B<-exportselection> B<-foreground> B<-font> B<-height> B<-highlightcolor> B<-highlightthickness> B<-relief> B<-selectbackground> B<-selectforeground> B<-xscrollcommand> B<-yscrollcommand> B<-width> See L for details of the standard options. =head1 WIDGET-SPECIFIC OPTIONS =over 4 =item Name: B =item Class: B =item Switch: B<-browsecmd> Specifies a perl/Tk L to be executed when the user browses through the entries in the HList widget. =item Name: B =item Class: B =item Switch: B<-columns> Specifies the number of columns in this HList widget. This option can only be set during the creation of the HList widget and cannot be changed subsequently. =item Name: B =item Class: B =item Switch: B<-command> Specifies the perl/Tk L to be executed when the user invokes a list entry in the HList widget. Normally the user invokes a list entry by double-clicking it or pressing the Return key. =item Name: B =item Class: B =item Switch: B<-drawbranch> A Boolean value to specify whether branch line should be drawn to connect list entries to their parents. =item Name: B =item Class: B =item Switch: B<-foreground> =item Alias: B<-fg> B<[OBSOLETE]> Specifies the default foreground color for the list entries. =item Name: B =item Class: B =item Switch: B<-gap> B<[OBSOLETE]> The default distance between the bitmap/image and the text in list entries. =item Name: B
=item Class: B
=item Switch: B<-header> A Boolean value specifying whether headers should be displayed for this HList widget (see the B
method below). =item Name: B =item Class: B =item Switch: B<-height> Specifies the desired height for the window in number of characters. =item Name: B =item Class: B =item Switch: B<-indent> Specifies the amount of horizontal indentation between a list entry and its children. Must be a valid screen distance value. =item Name: B =item Class: B =item Switch: B<-indicator> Specifies whether the indicators should be displayed inside the HList widget. See the B method below. =item Name: B =item Class: B =item Switch: B<-indicatorcmd> Specifies a perl/Tk L to be executed when the user manipulates the indicator of an HList entry. The B<-indicatorcmd> is triggered when the user press or releases the mouse button over the indicator in an HList entry. By default the perl/Tk B specified by B<-indicatorcmd> is executed with two additional arguments, the entryPath of the entry whose indicator has been triggered and additional information about the event. The additional information is one of the following strings: BArmE>, BDisarmE>, and BActivateE>. =item Name: B =item Class: B =item Switch: B<-itemtype> Specifies the default type of display item for this HList widget. When you call the B, B and B methods, display items of this type will be created if the B<-itemtype> option is not specified . =item Name: B =item Class: B =item Switch: B<-padx> B<[OBSOLETE]> The default horizontal padding for list entries. =item Name: B =item Class: B =item Switch: B<-padx> B<[OBSOLETE]> The default vertical padding for list entries. =item Name: B =item Class: B =item Switch: B<-selectbackground> Specifies the background color for the selected list entries. =item Name: B =item Class: B =item Switch: B<-selectborderwidth> Specifies a non-negative value indicating the width of the 3-D border to draw around selected items. The value may have any of the forms acceptable to B. =item Name: B =item Class: B =item Switch: B<-selectforeground> Specifies the foreground color for the selected list entries. =item Name: B =item Class: B =item Switch: B<-selectmode> Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either B, B, B, or B; the default value is B. =item Name: B =item Class: B =item Switch: B<-sizecmd> Specifies a perl/Tk L to be called whenever the HList widget changes its size. This method can be useful to implement ``I'' features. =item Name: B =item Class: B =item Switch: B<-separator> Specifies the character to used as the separator character when intepreting the path-names of list entries. By default the character "." is used. =item Name: B =item Class: B =item Switch: B<-width> Specifies the desired width for the window in characters. =back =head1 DESCRIPTION The B method creates a new window (given by the $widget argument) and makes it into a HList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the HList widget such as its cursor and relief. The HList widget can be used to display any data that have a hierarchical structure, for example, file system directory trees. The list entries are indented and connected by branch lines according to their places in the hierachy. Each list entry is identified by an B. The entryPath is a sequence of B separated by the separator charactor (specified by the B<-separator> option). An B can be any string that does not contain the separator charactor, or it can be the a string that contains only one separator charactor. For example, when "." is used as the separator charactor, "one.two.three" is the entryPath for a list entry whose parent is "one.two", whose parent is "one", which is a toplevel entry (has no parents). Another examples: ".two.three" is the entryPath for a list entry whose parent is ".two", whose parent is ".", which is a toplevel entry. =head1 DISPLAY ITEMS Each list entry in an HList widget is associated with a B item. The display item determines what visual information should be displayed for this list entry. Please see L for a list of all display items. When a list entry is created by the B, B or B widget methods, the type of its display item is determined by the B<-itemtype> option passed to these methods. If the B<-itemtype> is omitted, then by default the type specified by this HList widget's B<-itemtype> option is used. =head1 WIDGET METHODS The B method creates a widget object. This object supports the B and B methods described in L which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic L class. The following additional methods are available HList widgets: =over 4 =item I<$hlist>-EB(I<$entryPath> ?,I