.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "HList 3pm" .TH HList 3pm "2014-10-14" "perl v5.20.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Tk::HList \- Create and manipulate Tix Hierarchial List widgets .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fI\f(CI$hlist\fI\fR = \fI\f(CI$parent\fI\fR\->\fBHList\fR(?\fIoptions\fR?); .SH "STANDARD OPTIONS" .IX Header "STANDARD OPTIONS" \&\fB\-background\fR \fB\-borderwidth\fR \fB\-cursor\fR \fB\-exportselection\fR \&\fB\-foreground\fR \fB\-font\fR \fB\-height\fR \fB\-highlightcolor\fR \&\fB\-highlightthickness\fR \fB\-relief\fR \fB\-selectbackground\fR \&\fB\-selectforeground\fR \fB\-xscrollcommand\fR \fB\-yscrollcommand\fR \&\fB\-width\fR .PP See Tk::options for details of the standard options. .SH "WIDGET-SPECIFIC OPTIONS" .IX Header "WIDGET-SPECIFIC OPTIONS" .IP "Name: \fBbrowsecmd\fR" 4 .IX Item "Name: browsecmd" .PD 0 .IP "Class: \fBBrowseCmd\fR" 4 .IX Item "Class: BrowseCmd" .IP "Switch: \fB\-browsecmd\fR" 4 .IX Item "Switch: -browsecmd" .PD Specifies a perl/Tk callback to be executed when the user browses through the entries in the HList widget. .IP "Name: \fBcolumns\fR" 4 .IX Item "Name: columns" .PD 0 .IP "Class: \fBColumns\fR" 4 .IX Item "Class: Columns" .IP "Switch: \fB\-columns\fR" 4 .IX Item "Switch: -columns" .PD 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. .IP "Name: \fBcommand\fR" 4 .IX Item "Name: command" .PD 0 .IP "Class: \fBCommand\fR" 4 .IX Item "Class: Command" .IP "Switch: \fB\-command\fR" 4 .IX Item "Switch: -command" .PD Specifies the perl/Tk callback 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. .IP "Name: \fBdrawBranch\fR" 4 .IX Item "Name: drawBranch" .PD 0 .IP "Class: \fBDrawBranch\fR" 4 .IX Item "Class: DrawBranch" .IP "Switch: \fB\-drawbranch\fR" 4 .IX Item "Switch: -drawbranch" .PD A Boolean value to specify whether branch line should be drawn to connect list entries to their parents. .IP "Name: \fBforeground\fR" 4 .IX Item "Name: foreground" .PD 0 .IP "Class: \fBForeground\fR" 4 .IX Item "Class: Foreground" .IP "Switch: \fB\-foreground\fR" 4 .IX Item "Switch: -foreground" .IP "Alias: \fB\-fg\fR" 4 .IX Item "Alias: -fg" .PD \&\fB[\s-1OBSOLETE\s0]\fR Specifies the default foreground color for the list entries. .IP "Name: \fBgap\fR" 4 .IX Item "Name: gap" .PD 0 .IP "Class: \fBGap\fR" 4 .IX Item "Class: Gap" .IP "Switch: \fB\-gap\fR" 4 .IX Item "Switch: -gap" .PD \&\fB[\s-1OBSOLETE\s0]\fR The default distance between the bitmap/image and the text in list entries. .IP "Name: \fBheader\fR" 4 .IX Item "Name: header" .PD 0 .IP "Class: \fBHeader\fR" 4 .IX Item "Class: Header" .IP "Switch: \fB\-header\fR" 4 .IX Item "Switch: -header" .PD A Boolean value specifying whether headers should be displayed for this HList widget (see the \fBheader\fR method below). .IP "Name: \fBheight\fR" 4 .IX Item "Name: height" .PD 0 .IP "Class: \fBHeight\fR" 4 .IX Item "Class: Height" .IP "Switch: \fB\-height\fR" 4 .IX Item "Switch: -height" .PD Specifies the desired height for the window in number of characters. .IP "Name: \fBindent\fR" 4 .IX Item "Name: indent" .PD 0 .IP "Class: \fBIndent\fR" 4 .IX Item "Class: Indent" .IP "Switch: \fB\-indent\fR" 4 .IX Item "Switch: -indent" .PD Specifies the amount of horizontal indentation between a list entry and its children. Must be a valid screen distance value. .IP "Name: \fBindicator\fR" 4 .IX Item "Name: indicator" .PD 0 .IP "Class: \fBIndicator\fR" 4 .IX Item "Class: Indicator" .IP "Switch: \fB\-indicator\fR" 4 .IX Item "Switch: -indicator" .PD Specifies whether the indicators should be displayed inside the HList widget. See the \fBindicator\fR method below. .IP "Name: \fBindicatorCmd\fR" 4 .IX Item "Name: indicatorCmd" .PD 0 .IP "Class: \fBIndicatorCmd\fR" 4 .IX Item "Class: IndicatorCmd" .IP "Switch: \fB\-indicatorcmd\fR" 4 .IX Item "Switch: -indicatorcmd" .PD Specifies a perl/Tk callback to be executed when the user manipulates the indicator of an HList entry. The \fB\-indicatorcmd\fR is triggered when the user press or releases the mouse button over the indicator in an HList entry. By default the perl/Tk \fBcallback\fR specified by \&\fB\-indicatorcmd\fR 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: \fB\fR, \fB\fR, and \fB\fR. .IP "Name: \fBitemType\fR" 4 .IX Item "Name: itemType" .PD 0 .IP "Class: \fBItemType\fR" 4 .IX Item "Class: ItemType" .IP "Switch: \fB\-itemtype\fR" 4 .IX Item "Switch: -itemtype" .PD Specifies the default type of display item for this HList widget. When you call the \fBitemCreate\fR, \fBadd\fR and \fBaddchild\fR methods, display items of this type will be created if the \fB\-itemtype\fR option is not specified . .IP "Name: \fBpadX\fR" 4 .IX Item "Name: padX" .PD 0 .IP "Class: \fBPad\fR" 4 .IX Item "Class: Pad" .IP "Switch: \fB\-padx\fR" 4 .IX Item "Switch: -padx" .PD \&\fB[\s-1OBSOLETE\s0]\fR The default horizontal padding for list entries. .IP "Name: \fBpadY\fR" 4 .IX Item "Name: padY" .PD 0 .IP "Class: \fBPad\fR" 4 .IX Item "Class: Pad" .IP "Switch: \fB\-padx\fR" 4 .IX Item "Switch: -padx" .PD \&\fB[\s-1OBSOLETE\s0]\fR The default vertical padding for list entries. .IP "Name: \fBselectBackground\fR" 4 .IX Item "Name: selectBackground" .PD 0 .IP "Class: \fBSelectBackground\fR" 4 .IX Item "Class: SelectBackground" .IP "Switch: \fB\-selectbackground\fR" 4 .IX Item "Switch: -selectbackground" .PD Specifies the background color for the selected list entries. .IP "Name: \fBselectBorderWidth\fR" 4 .IX Item "Name: selectBorderWidth" .PD 0 .IP "Class: \fBBorderWidth\fR" 4 .IX Item "Class: BorderWidth" .IP "Switch: \fB\-selectborderwidth\fR" 4 .IX Item "Switch: -selectborderwidth" .PD 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 \fBTk_GetPixels\fR. .IP "Name: \fBselectForeground\fR" 4 .IX Item "Name: selectForeground" .PD 0 .IP "Class: \fBSelectForeground\fR" 4 .IX Item "Class: SelectForeground" .IP "Switch: \fB\-selectforeground\fR" 4 .IX Item "Switch: -selectforeground" .PD Specifies the foreground color for the selected list entries. .IP "Name: \fBselectMode\fR" 4 .IX Item "Name: selectMode" .PD 0 .IP "Class: \fBSelectMode\fR" 4 .IX Item "Class: SelectMode" .IP "Switch: \fB\-selectmode\fR" 4 .IX Item "Switch: -selectmode" .PD 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or \&\fBextended\fR; the default value is \fBsingle\fR. .IP "Name: \fBsizeCmd\fR" 4 .IX Item "Name: sizeCmd" .PD 0 .IP "Class: \fBSizeCmd\fR" 4 .IX Item "Class: SizeCmd" .IP "Switch: \fB\-sizecmd\fR" 4 .IX Item "Switch: -sizecmd" .PD Specifies a perl/Tk callback to be called whenever the HList widget changes its size. This method can be useful to implement ``\fIuser scroll bars when needed\fR'' features. .IP "Name: \fBseparator\fR" 4 .IX Item "Name: separator" .PD 0 .IP "Class: \fBSeparator\fR" 4 .IX Item "Class: Separator" .IP "Switch: \fB\-separator\fR" 4 .IX Item "Switch: -separator" .PD Specifies the character to used as the separator character when intepreting the path-names of list entries. By default the character \&\*(L".\*(R" is used. .IP "Name: \fBwidth\fR" 4 .IX Item "Name: width" .PD 0 .IP "Class: \fBWidth\fR" 4 .IX Item "Class: Width" .IP "Switch: \fB\-width\fR" 4 .IX Item "Switch: -width" .PD Specifies the desired width for the window in characters. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBHList\fR method creates a new window (given by the \&\f(CW$widget\fR 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. .PP 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 hierarchy. .PP Each list entry is identified by an \fBentryPath\fR. The entryPath is a sequence of \fBentry names\fR separated by the separator charactor (specified by the \fB\-separator\fR option). An \fBentry name\fR can be any string that does not contain the separator charactor, or it can be the a string that contains only one separator charactor. .PP For example, when \*(L".\*(R" is used as the separator charactor, \&\*(L"one.two.three\*(R" is the entryPath for a list entry whose parent is \&\*(L"one.two\*(R", whose parent is \*(L"one\*(R", which is a toplevel entry (has no parents). .PP Another examples: \*(L".two.three\*(R" is the entryPath for a list entry whose parent is \*(L".two\*(R", whose parent is \*(L".\*(R", which is a toplevel entry. .SH "DISPLAY ITEMS" .IX Header "DISPLAY ITEMS" Each list entry in an HList widget is associated with a \fBdisplay\fR item. The display item determines what visual information should be displayed for this list entry. Please see Tk::DItem for a list of all display items. When a list entry is created by the \fBitemCreate\fR, \fBadd\fR or \&\fBaddchild\fR widget methods, the type of its display item is determined by the \&\fB\-itemtype\fR option passed to these methods. If the \&\fB\-itemtype\fR is omitted, then by default the type specified by this HList widget's \fB\-itemtype\fR option is used. .SH "WIDGET METHODS" .IX Header "WIDGET METHODS" The \fBHList\fR method creates a widget object. This object supports the \fBconfigure\fR and \fBcget\fR methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class. .PP The following additional methods are available HList widgets: .ie n .IP "\fI\fI$hlist\fI\fR\->\fBadd\fR(\fI\fI$entryPath\fI\fR ?,\fIoption\fR=>\fIvalue\fR, ...?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBadd\fR(\fI\f(CI$entryPath\fI\fR ?,\fIoption\fR=>\fIvalue\fR, ...?)" 4 .IX Item "$hlist->add($entryPath ?,option=>value, ...?)" Creates a new list entry with the pathname \fI\f(CI$entryPath\fI\fR. A list entry must be created after its parent is created (unless this entry is a top-level entry, which has no parent). See also \*(L"\s-1BUGS\*(R"\s0 below. This method returns the entryPath of the newly created list entry. The following configuration options can be given to configure the list entry: .RS 4 .IP "\fB\-at\fR => \fIposition\fR" 8 .IX Item "-at => position" Insert the new list at the position given by \fIposition\fR. \&\fIposition\fR must be a valid integer. The position \fB0\fR indicates the first position, \fB1\fR indicates the second position, and so on. .IP "\fB\-after\fR => \fIafterWhich\fR" 8 .IX Item "-after => afterWhich" Insert the new list entry after the entry identified by \&\fIafterWhich\fR. \fIafterWhich\fR must be a valid list entry and it mush have the same parent as the new list entry .IP "\fB\-before\fR => \fIbeforeWhich\fR" 8 .IX Item "-before => beforeWhich" Insert the new list entry before the entry identified by \&\fIbeforeWhich\fR. \fIbeforeWhich\fR must be a valid list entry and it mush have the same parent as the new list entry .IP "\fB\-data\fR => \fIstring\fR" 8 .IX Item "-data => string" Specifies a string to associate with this list entry. This string can be queried by the \fBinfo\fR method. The application programmer can use the \fB\-data\fR option to associate the list entry with the data it represents. .IP "\fB\-itemtype\fR => \fItype\fR" 8 .IX Item "-itemtype => type" Specifies the type of display item to be display for the new list entry. \fBtype\fR must be a valid display item type. Currently the available display item types are \fBimagetext\fR, \fBtext\fR, and \&\f(CW$widget\fR. If this option is not specified, then by default the type specified by this HList widget's \fB\-itemtype\fR option is used. .IP "\fB\-state\fR => \fIstate\fR" 8 .IX Item "-state => state" Specifies whether this entry can be selected or invoked by the user. Must be either \fBnormal\fR or \fBdisabled\fR. .RE .RS 4 .Sp The \fBadd\fR method accepts additional configuration options to configure the display item associated with this list entry. The set of additional configuration options depends on the type of the display item given by the \fB\-itemtype\fR option. Please see Tk::DItem for a list of the configuration options for each of the display item types. .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBaddchild\fR(\fI\fI$parentPath\fI, \fR?\fIoption, value, ..., \fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBaddchild\fR(\fI\f(CI$parentPath\fI, \fR?\fIoption, value, ..., \fR?)" 4 .IX Item "$hlist->addchild($parentPath, ?option, value, ..., ?)" Adds a new child entry to the children list of the list entry identified by \fI\f(CI$parentPath\fI\fR. Or, if \fI\f(CI$parentPath\fI\fR is set to be the empty string, then creates a new toplevel entry. The name of the new list entry will be a unique name automatically generated by the HList widget. Usually if \fI\f(CI$parentPath\fI\fR is \fBfoo\fR, then the entryPath of the new entry will be \fBfoo.0\fR, \fBfoo.1\fR, ... etc. This method returns the entryPath of the newly created list entry. \&\fIoption\fR can be any option for the \fBadd\fR method. See also \*(L"\s-1BUGS\*(R"\s0 below. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBanchorSet\fR(\fI\fI$entryPath\fI\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBanchorSet\fR(\fI\f(CI$entryPath\fI\fR)" 4 .IX Item "$hlist->anchorSet($entryPath)" Sets the anchor to the list entry identified by \fI\f(CI$entryPath\fI\fR. The anchor is the end of the selection that is fixed while the user is dragging out a selection with the mouse. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBanchorClear\fR" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBanchorClear\fR" 4 .IX Item "$hlist->anchorClear" Removes the anchor, if any, from this HList widget. This only removes the surrounding highlights of the anchor entry and does not affect its selection status. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\fI$col\fI\fR?, \fI\-char\fR?, ?\fIwidth\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\f(CI$col\fI\fR?, \fI\-char\fR?, ?\fIwidth\fR?)" 4 .IX Item "$hlist->columnWidth($col?, -char?, ?width?)" Querys or sets the width of a the column \fI\f(CI$col\fI\fR in the HList widget. The value of \fI\f(CI$col\fI\fR is zero-based: 0 stands for the first column, 1 stands for the second, and so on. If no further parameters are given, returns the current width of this column (in number of pixels). Additional parameters can be given to set the width of this column: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\fI$col\fI\fR, \fB''\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\f(CI$col\fI\fR, \fB''\fR)" 8 .IX Item "$hlist->columnWidth($col, '')" An empty string indicates that the width of the column should be just wide enough to display the widest element in this column. In this case, the width of this column may change as a result of the elements in this column changing their sizes. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\fI$col\fI, \fR\fIwidth\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\f(CI$col\fI, \fR\fIwidth\fR)" 8 .IX Item "$hlist->columnWidth($col, width)" \&\fIwidth\fR must be in a form accepted by \fBTk_GetPixels\fR. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\fI$col\fI, \fR\fB\-char, \fR\fInChars\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBcolumnWidth\fR(\fI\f(CI$col\fI, \fR\fB\-char, \fR\fInChars\fR)" 8 .IX Item "$hlist->columnWidth($col, -char, nChars)" The width is set to be the average width occupied by \fInChars\fR number of characters of the font specified by the \fB\-font\fR option of this HList widget. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBdelete\fR(\fIoption\fR, \fI\fI$entryPath\fI\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBdelete\fR(\fIoption\fR, \fI\f(CI$entryPath\fI\fR)" 4 .IX Item "$hlist->delete(option, $entryPath)" Delete one or more list entries. \fIoption\fR may be one of the following: .RS 4 .IP "\fBall\fR" 8 .IX Item "all" Delete all entries in the HList. In this case the \fI\f(CI$entryPath\fI\fR does not need to be specified. .IP "\fBentry\fR" 8 .IX Item "entry" Delete the entry specified by \fI\f(CI$entryPath\fI\fR and all its offsprings, if any. .IP "\fBoffsprings\fR" 8 .IX Item "offsprings" Delete all the offsprings, if any, of the entry specified by \&\fI\f(CI$entryPath\fI\fR. However, \fI\f(CI$entryPath\fI\fR itself is not deleted. .IP "\fBsiblings\fR" 8 .IX Item "siblings" Delete all the list entries that share the same parent with the entry specified by \fI\f(CI$entryPath\fI\fR. However, \fI\f(CI$entryPath\fI\fR itself is not deleted. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBdragsiteSet\fR(\fI\fI$entryPath\fI\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBdragsiteSet\fR(\fI\f(CI$entryPath\fI\fR)" 4 .IX Item "$hlist->dragsiteSet($entryPath)" Sets the dragsite to the list entry identified by \&\fI\f(CI$entryPath\fI\fR. The dragsite is used to indicate the source of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBdragsiteClear\fR" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBdragsiteClear\fR" 4 .IX Item "$hlist->dragsiteClear" Remove the dragsite, if any, from the this HList widget. This only removes the surrounding highlights of the dragsite entry and does not affect its selection status. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBdropsiteSet\fR(\fI\fI$entryPath\fI\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBdropsiteSet\fR(\fI\f(CI$entryPath\fI\fR)" 4 .IX Item "$hlist->dropsiteSet($entryPath)" Sets the dropsite to the list entry identified by \fI\f(CI$entryPath\fI\fR. The dropsite is used to indicate the target of a drag-and-drop action. Currently drag-and-drop functionality has not been implemented in Tix yet. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBdropsiteClear\fR" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBdropsiteClear\fR" 4 .IX Item "$hlist->dropsiteClear" Remove the dropsite, if any, from the this HList widget. This only removes the surrounding highlights of the dropsite entry and does not affect its selection status. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBentrycget\fR(\fI\fI$entryPath\fI\fR, \fIoption\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBentrycget\fR(\fI\f(CI$entryPath\fI\fR, \fIoption\fR)" 4 .IX Item "$hlist->entrycget($entryPath, option)" Returns the current value of the configuration option given by \&\fIoption\fR for the entry indentfied by \fI\f(CI$entryPath\fI\fR. \fIOption\fR may have any of the values accepted by the \fBadd\fR method. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBentryconfigure\fR(\fI\fI$entryPath\fI\fR ?,\fIoption\fR?, ?\fIvalue\fR=>\fIoption\fR, ...?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBentryconfigure\fR(\fI\f(CI$entryPath\fI\fR ?,\fIoption\fR?, ?\fIvalue\fR=>\fIoption\fR, ...?)" 4 .IX Item "$hlist->entryconfigure($entryPath ?,option?, ?value=>option, ...?)" Query or modify the configuration options of the list entry indentfied by \fI\f(CI$entryPath\fI\fR. If no \fIoption\fR is specified, returns a list describing all of the available options for \fI\f(CI$entryPath\fI\fR (see Tk::options for information on the format of this list.) If \&\fIoption\fR is specified with no \fIvalue\fR, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no \&\fIoption\fR is specified). If one or more \fIoption-value\fR pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. \&\fIOption\fR may have any of the values accepted by the \fBadd\fR or \&\fBaddchild\fR method. The exact set of options depends on the value of the \fB\-itemtype\fR option passed to the the \fBadd\fR or \&\fBaddchild\fR method when this list entry is created. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fIoption\fR, \fI\fI$col\fI\fR ?,\fIargs\fR, ...?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fIoption\fR, \fI\f(CI$col\fI\fR ?,\fIargs\fR, ...?)" 4 .IX Item "$hlist->header(option, $col ?,args, ...?)" Manipulates the header items of this HList widget. If the \&\fB\-header\fR option of this HList widget is set to true, then a header item is displayed at the top of each column. The \fI\f(CI$col\fI\fR argument for this method must be a valid integer. 0 indicates the first column, 1 the second column, ... and so on. This method supports the following options: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBcget\fR, \fI\fI$col\fI\fR, \fIoption\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBcget\fR, \fI\f(CI$col\fI\fR, \fIoption\fR)" 8 .IX Item "$hlist->header(cget, $col, option)" If the \fI\f(CI$col\fI\fR\-th column has a header display item, returns the value of the specified \fIoption\fR of the header item. If the header doesn't exist, returns an error. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBconfigure, \fR\fI\fI$col\fI, \fR?\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBconfigure, \fR\fI\f(CI$col\fI, \fR?\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .IX Item "$hlist->header(configure, $col, ?option?, ?value, option, value, ...?)" Query or modify the configuration options of the header display item of the \fI\f(CI$col\fI\fR\-th column. The header item must exist, or an error will result. If no \fIoption\fR is specified, returns a list describing all of the available options for the header display item (see Tk::options for information on the format of this list.) If \fIoption\fR is specified with no \fIvalue\fR, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no \&\fIoption\fR is specified). If one or more \fIoption-value\fR pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. \fIOption\fR may have any of the values accepted by the \&\fBheader create\fR method. The exact set of options depends on the value of the \fB\-itemtype\fR option passed to the the \fBheader\fR create method when this display item was created. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBcreate, \fR\fI\fI$col\fI, \fR?\fI\-itemtype type\fR? ?\fIoption value ...\fR?" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBcreate, \fR\fI\f(CI$col\fI, \fR?\fI\-itemtype type\fR? ?\fIoption value ...\fR?" 8 .IX Item "$hlist->header(create, $col, ?-itemtype type? ?option value ...?" Creates a new display item as the header for the \fI\f(CI$col\fI\fR\-th column. See also \*(L"\s-1BUGS\*(R"\s0 below. If an header display item already exists for this column, it will be replaced by the new item. An optional parameter \&\fI\-itemtype\fR can be used to specify what type of display item should be created. If the \fI\-itemtype\fR is not given, then by default the type specified by this HList widget's \fB\-itemtype\fR option is used. Additional parameters, in \fIoption-value\fR pairs, can be passed to configure the appearance of the display item. Each \&\fIoption-value\fR pair must be a valid option for this type of display item or one of the following: .RS 8 .IP "\fB\-borderwidth\fR => \fIcolor\fR" 12 .IX Item "-borderwidth => color" Specifies the border width of this header item. .IP "\fB\-headerbackground\fR => \fIcolor\fR" 12 .IX Item "-headerbackground => color" Specifies the background color of this header item. .IP "\fB\-relief\fR => \fItype\fR" 12 .IX Item "-relief => type" Specifies the relief type of the border of this header item. .RE .RS 8 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBdelete, \fR\fI\fI$col\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBdelete, \fR\fI\f(CI$col\fI\fR)" 8 .IX Item "$hlist->header(delete, $col)" Deletes the header display item for the \fI\f(CI$col\fI\fR\-th column. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBexists, \fR\fI\fI$col\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBexists, \fR\fI\f(CI$col\fI\fR)" 8 .IX Item "$hlist->header(exists, $col)" Return true if an header display item exists for the \fI\f(CI$col\fI\fR\-th column; return false otherwise. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBheader\fR(\fBsize\fR, \fI\fI$col\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBheader\fR(\fBsize\fR, \fI\f(CI$col\fI\fR)" 8 .IX Item "$hlist->header(size, $col)" If an header display item exists for the \fI\f(CI$col\fI\fR\-th column , returns its size in pixels in a two element list \fI(width, height)\fR; returns an error if the header display item does not exist. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBhide\fR(\fIoption\fR ?,\fI\fI$entryPath\fI\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBhide\fR(\fIoption\fR ?,\fI\f(CI$entryPath\fI\fR?)" 4 .IX Item "$hlist->hide(option ?,$entryPath?)" Makes some of entries invisible without deleting them. \&\fIOption\fR can be one of the following: .RS 4 .IP "\fBentry\fR" 8 .IX Item "entry" Hides the list entry identified by \fI\f(CI$entryPath\fI\fR. .RE .RS 4 .Sp Currently only the \fBentry\fR option is supported. Other options will be added in the next release. .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fIoption\fR, \fI\fI$entryPath\fI\fR, ?\fIargs, ...\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fIoption\fR, \fI\f(CI$entryPath\fI\fR, ?\fIargs, ...\fR?)" 4 .IX Item "$hlist->indicator(option, $entryPath, ?args, ...?)" Manipulates the indicator on the list entries. An indicator is usually a small display item (such as an image) that is displayed to the left to an entry to indicate the status of the entry. For example, it may be used to indicate whether a directory is opened or closed. \fIOption\fR can be one of the following: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBcget\fR, \fI\fI$entryPath\fI\fR, \fIoption\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBcget\fR, \fI\f(CI$entryPath\fI\fR, \fIoption\fR)" 8 .IX Item "$hlist->indicator(cget, $entryPath, option)" If the list entry given by \fI\f(CI$entryPath\fI\fR has an indicator, returns the value of the specified \fIoption\fR of the indicator. If the indicator doesn't exist, returns an error. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBconfigure\fR, \fI\fI$entryPath\fI\fR, ?\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBconfigure\fR, \fI\f(CI$entryPath\fI\fR, ?\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .IX Item "$hlist->indicator(configure, $entryPath, ?option?, ?value, option, value, ...?)" Query or modify the configuration options of the indicator display item of the entry specified by \fI\f(CI$entryPath\fI\fR. The indicator item must exist, or an error will result. If no \fIoption\fR is specified, returns a list describing all of the available options for the indicator display item (see Tk::options for information on the format of this list). If \fIoption\fR is specified with no \&\fIvalue\fR, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no \fIoption\fR is specified). If one or more \&\fIoption-value\fR pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. \fIOption\fR may have any of the values accepted by the \fBindicator create\fR method. The exact set of options depends on the value of the \fB\-itemtype\fR option passed to the the \fBindicator create\fR method when this display item was created. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBcreate, \fR\fI\fI$entryPath\fI, \fR?, \fI\-itemtype type\fR? ?\fIoption value ...\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBcreate, \fR\fI\f(CI$entryPath\fI, \fR?, \fI\-itemtype type\fR? ?\fIoption value ...\fR?)" 8 .IX Item "$hlist->indicator(create, $entryPath, ?, -itemtype type? ?option value ...?)" Creates a new display item as the indicator for the entry specified by \&\fI\f(CI$entryPath\fI\fR. If an indicator display item already exists for this entry, it will be replaced by the new item. An optional parameter \&\fI\-itemtype\fR can be used to specify what type of display item should be created. If the \fI\-itemtype\fR is not given, then by default the type specified by this HList widget's \fB\-itemtype\fR option is used. Additional parameters, in \fIoption-value\fR pairs, can be passed to configure the appearance of the display item. Each \&\fIoption-value\fR pair must be a valid option for this type of display item. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBdelete\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBdelete\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->indicator(delete, $entryPath)" Deletes the indicator display item for the entry given by \fI\f(CI$entryPath\fI\fR. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBexists\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBexists\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->indicator(exists, $entryPath)" Return true if an indicator display item exists for the entry given by \&\fI\f(CI$entryPath\fI\fR; return false otherwise. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBindicator\fR(\fBsize\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBindicator\fR(\fBsize\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->indicator(size, $entryPath)" If an indicator display item exists for the entry given by \&\fI\f(CI$entryPath\fI\fR, returns its size in a two element list of the form {\fIwidth height\fR}; returns an error if the indicator display item does not exist. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fIoption\fR, \fIarg, ...\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fIoption\fR, \fIarg, ...\fR)" 4 .IX Item "$hlist->info(option, arg, ...)" Query information about the HList widget. \fIoption\fR can be one of the following: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBanchor\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBanchor\fR)" 8 .IX Item "$hlist->info(anchor)" Returns the entryPath of the current anchor, if any, of the HList widget. If the anchor is not set, returns the empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfoBbox\fR(\fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfoBbox\fR(\fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->infoBbox($entryPath)" Returns a list of four numbers describing the visible bounding box of the entry given \fI\f(CI$entryPath\fI\fR. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the entry (specified in pixels relative to the widget) and the last two elements give the lower-right corner of the area, in pixels. If no part of the entry given by index is visible on the screen then the result is an empty string; if the entry is partially visible, the result gives the only the visible area of the entry. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBchildren\fR ?,\fI\fI$entryPath\fI\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBchildren\fR ?,\fI\f(CI$entryPath\fI\fR?)" 8 .IX Item "$hlist->info(children ?,$entryPath?)" If \fI\f(CI$entryPath\fI\fR is given, returns a list of the entryPath's of its children entries. Otherwise returns a list of the toplevel entryPath's. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBdata\fR ?,\fI\fI$entryPath\fI\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBdata\fR ?,\fI\f(CI$entryPath\fI\fR?)" 8 .IX Item "$hlist->info(data ?,$entryPath?)" Returns the data associated with \fI\f(CI$entryPath\fI\fR. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBdragsite\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBdragsite\fR)" 8 .IX Item "$hlist->info(dragsite)" Returns the entryPath of the current dragsite, if any, of the HList widget. If the dragsite is not set, returns the empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBdropsite\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBdropsite\fR)" 8 .IX Item "$hlist->info(dropsite)" Returns the entryPath of the current dropsite, if any, of the HList widget. If the dropsite is not set, returns the empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBexists\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBexists\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->info(exists, $entryPath)" Returns a boolean value indicating whether the list entry \&\fI\f(CI$entryPath\fI\fR exists. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBhidden\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBhidden\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->info(hidden, $entryPath)" Returns a boolean value indicating whether the list entry \&\fB\f(CB$entryPath\fB\fR is hidden or not. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBnext\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBnext\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->info(next, $entryPath)" Returns the entryPath of the list entry, if any, immediately below this list entry. If this entry is already at the bottom of the HList widget, returns an empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBparent\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBparent\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->info(parent, $entryPath)" Returns the name of the parent of the list entry identified by \&\fI\f(CI$entryPath\fI\fR. If \fIentryPath\fR is a toplevel list entry, returns the empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBprev\fR, \fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBprev\fR, \fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->info(prev, $entryPath)" Returns the entryPath of the list entry, if any, immediately above this list entry. If this entry is already at the top of the HList widget, returns an empty string. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBinfo\fR(\fBselection\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBinfo\fR(\fBselection\fR)" 8 .IX Item "$hlist->info(selection)" Returns a list of selected entries in the HList widget. In scalar context, returns an anonymous list of the selected entries. If no entries are selected, undef is returned in scalar context, and an empty list otherwise. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitem\fR(\fIoption, \fR?\fIargs, ...\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitem\fR(\fIoption, \fR?\fIargs, ...\fR?)" 4 .IX Item "$hlist->item(option, ?args, ...?)" Creates and configures the display items at individual columns the entries. The form of additional of arguments depends on the choice of \&\fIoption\fR: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitemCget\fR(\fI\fI$entryPath\fI\fR, \fI\fI$col\fI\fR, \fIoption\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitemCget\fR(\fI\f(CI$entryPath\fI\fR, \fI\f(CI$col\fI\fR, \fIoption\fR)" 8 .IX Item "$hlist->itemCget($entryPath, $col, option)" Returns the current value of the configure \fIoption\fR of the display item at the column designated by \fI\f(CI$col\fI\fR of the entry specified by \&\fI\f(CI$entryPath\fI\fR. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitemConfigure\fR(\fI\fI$entryPath\fI\fR, \fI\fI$col\fI\fR ?,\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitemConfigure\fR(\fI\f(CI$entryPath\fI\fR, \fI\f(CI$col\fI\fR ?,\fIoption\fR?, \fI?value, option, value, ...\fR?)" 8 .IX Item "$hlist->itemConfigure($entryPath, $col ?,option?, ?value, option, value, ...?)" Query or modify the configuration options of the display item at the column designated by \fI\f(CI$col\fI\fR of the entry specified by \&\fI\f(CI$entryPath\fI\fR. If no \fIoption\fR is specified, returns a list describing all of the available options for \fI\f(CI$entryPath\fI\fR (see Tk::options for information on the format of this list). If \fIoption\fR is specified with no \fIvalue\fR, then the method returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no \&\fIoption\fR is specified). If one or more \fIoption-value\fR pairs are specified, then the method modifies the given option(s) to have the given value(s); in this case the method returns an empty string. \&\fIOption\fR may have any of the values accepted by the \fBitem\fR create method. The exact set of options depends on the value of the \fB\-itemtype\fR option passed to the the \fBitem\fR create method when this display item was created. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitemCreate\fR(\fI\fI$entryPath\fI\fR, \fI\fI$col\fI\fR ?,\fI\-itemtype\fR=>\fItype\fR? ?,\fIoption value ...\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitemCreate\fR(\fI\f(CI$entryPath\fI\fR, \fI\f(CI$col\fI\fR ?,\fI\-itemtype\fR=>\fItype\fR? ?,\fIoption value ...\fR?)" 8 .IX Item "$hlist->itemCreate($entryPath, $col ?,-itemtype=>type? ?,option value ...?)" Creates a new display item at the column designated by \fI\f(CI$col\fI\fR of the entry specified by \fI\f(CI$entryPath\fI\fR. An optional parameter \&\fI\-itemtype\fR can be used to specify what type of display items should be created. If the \fI\-itemtype\fR is not specified, then by default the type specified by this HList widget's \fB\-itemtype\fR option is used. Additional parameters, in \fIoption-value\fR pairs, can be passed to configure the appearance of the display item. Each \&\fIoption\- value\fR pair must be a valid option for this type of display item. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitemDelete\fR(\fI\fI$entryPath\fI\fR, \fI\fI$col\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitemDelete\fR(\fI\f(CI$entryPath\fI\fR, \fI\f(CI$col\fI\fR)" 8 .IX Item "$hlist->itemDelete($entryPath, $col)" Deletes the display item at the column designated by \fI\f(CI$col\fI\fR of the entry specified by \fI\f(CI$entryPath\fI\fR. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBitemExists\fR(\fI\fI$entryPath\fI\fR, \fI\fI$col\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBitemExists\fR(\fI\f(CI$entryPath\fI\fR, \fI\f(CI$col\fI\fR)" 8 .IX Item "$hlist->itemExists($entryPath, $col)" Returns true if there is a display item at the column designated by \&\fI\f(CI$col\fI\fR of the entry specified by \fI\f(CI$entryPath\fI\fR; returns false otherwise. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBnearest\fR(\fIy\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBnearest\fR(\fIy\fR)" 4 .IX Item "$hlist->nearest(y)" \&\fI\f(CI$hlist\fI\fR\->\fBnearest\fR(\fIy\fR) Given a y\-coordinate within the HList window, this method returns the entryPath of the (visible) HList element nearest to that y\-coordinate. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBsee\fR(\fI\fI$entryPath\fI\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBsee\fR(\fI\f(CI$entryPath\fI\fR)" 4 .IX Item "$hlist->see($entryPath)" Adjust the view in the HList so that the entry given by \fI\f(CI$entryPath\fI\fR is visible. If the entry is already visible then the method has no effect; if the entry is near one edge of the window then the HList scrolls to bring the element into view at the edge; otherwise the HList widget scrolls to center the entry. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselection\fR(\fIoption\fR, \fIarg\fR, ...)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselection\fR(\fIoption\fR, \fIarg\fR, ...)" 4 .IX Item "$hlist->selection(option, arg, ...)" .PD 0 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselection\fR\fIOption\fR(\fIarg\fR, ...)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselection\fR\fIOption\fR(\fIarg\fR, ...)" 4 .IX Item "$hlist->selectionOption(arg, ...)" .PD This method is used to adjust the selection within a HList widget. It has several forms, depending on \fIoption\fR: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselectionClear\fR(?\fIfrom\fR?, ?\fIto\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselectionClear\fR(?\fIfrom\fR?, ?\fIto\fR?)" 8 .IX Item "$hlist->selectionClear(?from?, ?to?)" When no extra arguments are given, deselects all of the list entrie(s) in this HList widget. When only \fIfrom\fR is given, only the list entry identified by \fIfrom\fR is deselected. When both \fIfrom\fR and \&\fIto\fR are given, deselects all of the list entrie(s) between between \fIfrom\fR and \fIto\fR, inclusive, without affecting the selection state of elements outside that range. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselectionGet\fR" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselectionGet\fR" 8 .IX Item "$hlist->selectionGet" This is an alias for the \fBinfoSelection\fR method. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselectionIncludes\fR(\fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselectionIncludes\fR(\fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->selectionIncludes($entryPath)" Returns 1 if the list entry indicated by \fI\f(CI$entryPath\fI\fR is currently selected; returns 0 otherwise. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBselectionSet\fR(\fIfrom\fR?, \fIto\fR?)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBselectionSet\fR(\fIfrom\fR?, \fIto\fR?)" 8 .IX Item "$hlist->selectionSet(from?, to?)" Selects all of the list entrie(s) between between \fIfrom\fR and \&\fIto\fR, inclusive, without affecting the selection state of entries outside that range. When only \fIfrom\fR is given, only the list entry identified by \fIfrom\fR is selected. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBshow\fR(\fIoption\fR ?,\fI\fI$entryPath\fI\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBshow\fR(\fIoption\fR ?,\fI\f(CI$entryPath\fI\fR?)" 4 .IX Item "$hlist->show(option ?,$entryPath?)" Show the entries that are hidden by the \fBhide\fR method, \&\fIoption\fR can be one of the following: .RS 4 .IP "\fBentry\fR" 8 .IX Item "entry" Shows the list entry identified by \fI\f(CI$entryPath\fI\fR. .RE .RS 4 .Sp Currently only the \fBentry\fR option is supported. Other options will be added in future releases. .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fBxview\fR(\fIargs\fR)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBxview\fR(\fIargs\fR)" 4 .IX Item "$hlist->xview(args)" This method is used to query and change the horizontal position of the information in the widget's window. It can take any of the following forms: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fBxview\fR" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBxview\fR" 8 .IX Item "$hlist->xview" Returns a list containing two elements. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is \&.2 and the second element is .6, 20% of the HList entry is off-screen to the left, the middle 40% is visible in the window, and 40% of the entry is off-screen to the right. These are the same values passed to scrollbars via the \fB\-xscrollcommand\fR option. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBxview\fR(\fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBxview\fR(\fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->xview($entryPath)" Adjusts the view in the window so that the list entry identified by \&\fI\f(CI$entryPath\fI\fR is aligned to the left edge of the window. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBxview\fR(\fBmoveto\fR => \fIfraction\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBxview\fR(\fBmoveto\fR => \fIfraction\fR)" 8 .IX Item "$hlist->xview(moveto => fraction)" Adjusts the view in the window so that \fIfraction\fR of the total width of the HList is off-screen to the left. \fIfraction\fR must be a fraction between 0 and 1. .ie n .IP "\fI\fI$hlist\fI\fR\->\fBxview\fR(\fBscroll\fR => \fInumber, what\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fBxview\fR(\fBscroll\fR => \fInumber, what\fR)" 8 .IX Item "$hlist->xview(scroll => number, what)" This method shifts the view in the window left or right according to \&\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer. \&\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an abbreviation of one of these. If \fIwhat\fR is \fBunits\fR, the view adjusts left or right by \fInumber\fR character units (the width of the \fB0\fR character) on the display; if it is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negative then characters farther to the left become visible; if it is positive then characters farther to the right become visible. .RE .RS 4 .RE .ie n .IP "\fI\fI$hlist\fI\fR\->\fByview\fR(\fI?args\fR?)" 4 .el .IP "\fI\f(CI$hlist\fI\fR\->\fByview\fR(\fI?args\fR?)" 4 .IX Item "$hlist->yview(?args?)" This method is used to query and change the vertical position of the entries in the widget's window. It can take any of the following forms: .RS 4 .ie n .IP "\fI\fI$hlist\fI\fR\->\fByview\fR" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fByview\fR" 8 .IX Item "$hlist->yview" Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the list element at the top of the window, relative to the HList as a whole (0.5 means it is halfway through the HList, for example). The second element gives the position of the list entry just after the last one in the window, relative to the HList as a whole. These are the same values passed to scrollbars via the \fB\-yscrollcommand\fR option. .ie n .IP "\fI\fI$hlist\fI\fR\->\fByview\fR(\fI\fI$entryPath\fI\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fByview\fR(\fI\f(CI$entryPath\fI\fR)" 8 .IX Item "$hlist->yview($entryPath)" Adjusts the view in the window so that the list entry given by \&\fI\f(CI$entryPath\fI\fR is displayed at the top of the window. .ie n .IP "\fI\fI$hlist\fI\fR\->\fByview\fR(\fBmoveto\fR => \fIfraction\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fByview\fR(\fBmoveto\fR => \fIfraction\fR)" 8 .IX Item "$hlist->yview(moveto => fraction)" Adjusts the view in the window so that the list entry given by \&\fIfraction\fR appears at the top of the window. \fIFraction\fR is a fraction between 0 and 1; 0 indicates the first entry in the HList, 0.33 indicates the entry one-third the way through the HList, and so on. .ie n .IP "\fI\fI$hlist\fI\fR\->\fByview\fR(\fBscroll\fR => \fInumber, what\fR)" 8 .el .IP "\fI\f(CI$hlist\fI\fR\->\fByview\fR(\fBscroll\fR => \fInumber, what\fR)" 8 .IX Item "$hlist->yview(scroll => number, what)" This method adjust the view in the window up or down according to \&\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer. \&\fIWhat\fR must be either \fBunits\fR or \fBpages\fR. If \fIwhat\fR is \fBunits\fR, the view adjusts up or down by \fInumber\fR lines; if it is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negative then earlier entries become visible; if it is positive then later entries become visible. .RE .RS 4 .RE .SH "BINDINGS" .IX Header "BINDINGS" .IP "[1]" 4 .IX Item "[1]" If the \fB\-selectmode\fR is \*(L"browse\*(R", when the user drags the mouse pointer over the list entries, the entry under the pointer will be highlighted and the \fB\-browsecmd\fR callback will be called with one parameter, the entryPath of the highlighted entry. Only one entry can be highlighted at a time. The \fB\-command\fR callback will be called when the user double-clicks on a list entry. .IP "[2]" 4 .IX Item "[2]" If the \fB\-selectmode\fR is \*(L"single\*(R", the entries will only be highlighted by mouse events. When a new list entry is highlighted, the \fB\-browsecmd\fR callback will be called with one parameter indicating the highlighted list entry. The \&\fB\-command\fR callback will be called when the user double-clicks on a list entry. .IP "[3]" 4 .IX Item "[3]" If the \fB\-selectmode\fR is \*(L"multiple\*(R", when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. However, only a contiguous region of list entries can be selected. When the highlighted area is changed, the \&\fB\-browsecmd\fR callback will be called with an undefined parameter. It is the responsibility of the \fB\-browsecmd\fR callback to find out the exact highlighted selection in the HList. The \&\fB\-command\fR callback will be called when the user double-clicks on a list entry. .IP "[4]" 4 .IX Item "[4]" If the \fB\-selectmode\fR is \*(L"extended\*(R", when the user drags the mouse pointer over the list entries, all the entries under the pointer will be highlighted. The user can also make disjointed selections using . When the highlighted area is changed, the \&\fB\-browsecmd\fR callback will be called with an undefined parameter. It is the responsibility of the \fB\-browsecmd\fR callback to find out the exact highlighted selection in the HList. The \&\fB\-command\fR callback will be called when the user double-clicks on a list entry. .IP "[5]" 4 .IX Item "[5]" \&\fBArrow key bindings:\fR arrow key moves the anchor point to the item right on top of the current anchor item. arrow key moves the anchor point to the item right below the current anchor item. arrow key moves the anchor to the parent item of the current anchor item. moves the anchor to the first child of the current anchor item. If the current anchor item does not have any children, moves the anchor to the item right below the current anchor item. .SH "EXAMPLE" .IX Header "EXAMPLE" This example demonstrates how to use an HList to store a file directory structure and respond to the user's browse events: .PP .Vb 4 \& use strict; \& use Tk; \& use Tk::Label; \& use Tk::HList; \& \& my $mw = MainWindow\->new(); \& my $label = $mw\->Label(\-width=>15); \& my $hlist = $mw\->HList( \& \-itemtype => \*(Aqtext\*(Aq, \& \-separator => \*(Aq/\*(Aq, \& \-selectmode => \*(Aqsingle\*(Aq, \& \-browsecmd => sub { \& my $file = shift; \& $label\->configure(\-text=>$file); \& } \& ); \& \& foreach ( qw(/ /home /home/ioi /home/foo /usr /usr/lib) ) { \& $hlist\->add($_, \-text=>$_); \& } \& \& $hlist\->pack; \& $label\->pack; \& \& MainLoop; .Ve .SH "BUGS" .IX Header "BUGS" The fact that the display item at column 0 is implicitly associated with the whole entry is probably a design bug. This was done for backward compatibility purposes. The result is that there is a large overlap between the \fBitem\fR method and the \fBadd\fR, \&\fBaddchild\fR, \fBentrycget\fR and \fBentryconfigure\fR methods. Whenever multiple columns exist, the programmer should use \&\s-1ONLY\s0 the \fBitem\fR method to create and configure the display items in each column; the \fBadd\fR, \fBaddchild\fR, \fBentrycget\fR and \&\fBentryconfigure\fR should be used \s-1ONLY\s0 to create and configure entries. .SH "KEYWORDS" .IX Header "KEYWORDS" Hierarchical Listbox .SH "SEE ALSO" .IX Header "SEE ALSO" Tk::DItem