URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [insight/] [tix/] [man/] [HList.n] - Rev 1782
Compare with Previous | Blame | View Log
'\"'\" 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 distrobution are in the file'\" license.tcl..so man.macros'----------------------------------------------------------------------.HS tixHList tix 4.0.BS'''----------------------------------------------------------------------.SH NAMEtixHList \- Create and manipulate Tix Hierarchial List widgets'''----------------------------------------------------------------------.SH SYNOPSIS\fBtixHList\fI \fIpathName ?\fIoptions\fR?'''----------------------------------------------------------------------.PP.SH SUPER-CLASSNone.''----------------------------------------------------------------------.SH "STANDARD OPTIONS"'.LP.nf.ta 4c 8c 12c\fBbackground\fR \fBborderWidth\fR \fBcursor\fR \fBforeground\fR\fBfont\fR \fBheight\fR \fBhighlightColor \fBhighlightThickness\fBrelief\fR \fBselectBackground\fR \fBselectForeground\fR\fBxScrollCommand\fR \fByScrollCommand\fR \fBwidth\fR.ta 4c.fi.LPSee the \fBoptions(n)\fR manual entry for details on the standard options.'''----------------------------------------------------------------------.SH "WIDGET-SPECIFIC OPTIONS"''----------BEGIN.LP.nfName: \fBbrowsecmd\fRClass: \fBBrowseCmd\fRSwitch: \fB\-browsecmd\fR.fi.IPSpecifies a TCL command to be executed when the user browses through theentries in the HList widget.'----------END''----------BEGIN.LP.nfName: \fBcolumns\fRClass: \fBColumns\fRSwitch: \fB\-columns\fR.fi.IPSpecifies the number of columns in this HList widget. This option canonly be set during the creation of the HList widget and cannot bechanged subsequently.'----------END''----------BEGIN.LP.nfName: \fBcommand\fRClass: \fBCommand\fRSwitch: \fB\-command\fR.fi.IPSpecifies the TCL command to be executed when the user invokes a listentry in the HList widget. Normally the user invokes a listentry by double-clicking it or pressing the Return key.'----------END''----------BEGIN.LP.nfName: \fBdrawBranch\fRClass: \fBDrawBranch\fRSwitch: \fB\-drawbranch\fR.fi.IPA Boolean value to specify whether branch line should be drawn toconnect list entries to their parents.'----------END'''----------BEGIN.LP.nfName: \fBforeground\fRClass: \fBForeground\fRSwitch: \fB\-foreground\fRAlias: \fB\-fg\fR.fi.IP\fB[OBSOLETE]\fR Specifies the default foreground color for the list entries.'----------END'''----------BEGIN.LP.nfName: \fBgap\fRClass: \fBGap\fRSwitch: \fB\-gap\fR.fi.IP\fB[OBSOLETE]\fR The default distance between the bitmap/image and thetext in list entries.'----------END''----------BEGIN.LP.nfName: \fBheader\fRClass: \fBHeader\fRSwitch: \fB\-header\fR.fi.IPA Boolean value specifying whether headers should be displayed forthis HList widget (see the \fBheader\fR widget command below).'----------END''----------BEGIN.LP.nfName: \fBheight\fRClass: \fBHeight\fRSwitch: \fB\-height\fR.fi.IPSpecifies the desired height for the window in number of characters.'----------END''----------BEGIN.LP.nfName: \fBindent\fRClass: \fBIndent\fRSwitch: \fB\-indent\fR.fi.IPSpecifies the amount of horizontal indentation between a list entryand its children. Must be a valid screen distance value.'----------END''----------BEGIN.LP.nfName: \fBindicator\fRClass: \fBIndicator\fRSwitch: \fB\-indicator\fR.fi.IPSpecifies whether the indicators should be displayed inside the HListwidget. See the \fBindicator\fR widget command below.'----------END'''----------BEGIN.LP.nfName: \fBindicatorCmd\fRClass: \fBIndicatorCmd\fRSwitch: \fB\-indicatorcmd\fR.fi.IPSpecifies a TCL command to be executed when the user manipulates theindicator of an HList entry. The \fB\-indicatorcmd\fR is triggeredwhen the user press or releases the mouse button over the indicator inan HList entry. By default the TCL command specified by\fB\-indicatorcmd\fR is executed with one additional argument, theentryPath of the entry whose indicator has been triggered. Additionalinformation about the event can be obtained by the \fBtixEvent\fRcommand.'----------END'''----------BEGIN.LP.nfName: \fBitemType\fRClass: \fBItemType\fRSwitch: \fB\-itemtype\fR.fi.IPSpecifies the default type of display item for this HList widget. Whenyou call the add and addchild widget commands, display items of thistype will be created if the \fB\-itemtype\fR option is not specified .'----------END''----------BEGIN.LP.nfName: \fBpadX\fRClass: \fBPad\fRSwitch: \fB\-padx\fR.fi.IP\fB[OBSOLETE]\fR The default horizontal padding for list entries.'----------END''----------BEGIN.LP.nfName: \fBpadY\fRClass: \fBPad\fRSwitch: \fB\-padx\fR.fi.IP\fB[OBSOLETE]\fR The default vertical padding for list entries.'----------END'----------BEGIN.LP.nfName: \fBselectBackground\fRClass: \fBSelectBackground\fRSwitch: \fB\-selectbackground\fR.fi.IPSpecifies the background color for the selected list entries.'----------END''----------BEGIN.LP.nfName: \fBselectBorderWidth\fRClass: \fBBorderWidth\fRSwitch: \fB\-selectborderwidth\fR.fi.IPSpecifies a non-negative value indicating the width of the 3-D borderto draw around selected items. The value may have any of the formsacceptable to \fBTk_GetPixels\fR.'----------END''----------BEGIN.LP.nfName: \fBselectForeground\fRClass: \fBSelectForeground\fRSwitch: \fB\-selectforeground\fR.fi.IPSpecifies the foreground color for the selected list entries.'----------END''----------BEGIN.LP.nfName: \fBselectMode\fRClass: \fBSelectMode\fRSwitch: \fB\-selectmode\fR.fi.IPSpecifies one of several styles for manipulating the selection. Thevalue of the option may be arbitrary, but the default bindings expectit to be either \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or\fBextended\fR; the default value is \fBsingle\fR.'----------END''----------BEGIN.LP.nfName: \fBsizeCmd\fRClass: \fBSizeCmd\fRSwitch: \fB\-sizecmd\fR.fi.IPSpecifies a TCL script to be called whenever the HList widgetchanges its size. This command can be useful to implement "user scrollbars when needed" features.'----------END''----------BEGIN.LP.nfName: \fBseparator\fRClass: \fBSeparator\fRSwitch: \fB\-separator\fR.fi.IPSpecifies the character to used as the separator character whenintepreting the path-names of list entries. By default the character"." is used.'----------END''----------BEGIN.LP.nfName: \fBwidth\fRClass: \fBWidth\fRSwitch: \fB\-width\fR.fi.IPSpecifies the desired width for the window in characters.'----------END.BE'''----------------------------------------------------------------------.SH DESCRIPTION'.PP'The \fBtixHList\fR command creates a new window (given by the\fIpathName\fR argument) and makes it into a HList widget.Additional options, described above, may be specified on the commandline or in the option database to configure aspects of theHList widget such as its cursor and relief..PPThe HList widget can be used to display any data that have ahierarchical structure, for example, file system directory trees. Thelist entries are indented and connected by branch lines according totheir places in the hierachy..PPEach list entry is identified by an \fBentryPath\fR. The entryPath is asequence of \fBentry names\fR separated by the separator charactor(specified by the \fB\-separator\fR option). An \fBentry name\fR can beany string that does not contain the separator charactor, or it can bethe a string that contains only one separator charactor..PPFor 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 noparents)..PPAnother examples: ".two.three" is the entryPath for a list entry whoseparent is ".two", whose parent is ".", which is a toplevel entry.'.SH "DISPLAY ITEMS".PPEach list entry in an HList widget is associated with a \fBdisplayitem\fR. The display item determines what visual information shouldbe displayed for this list entry. Please see the \fBDItem(n)\fR manualpage for a list of all display items.When a list entry is created by the \fBadd\fR or \fBaddchild\fR widgetcommands, the type of its display item is determined by the\fB\-itemtype\fR option passed to these commands. If the\fB\-itemtype\fR is omitted, then by default the type specified bythis HList widget's \fB\-itemtype\fR option is used.'----------------------------------------------------------------------.SH "WIDGET COMMAND".PP'The \fBtixHList\fR command creates a new Tcl command whose name is thesame as the path name of the HList widget's window. This commandmay be used to invoke various operations on the widget. It has thefollowing general form:'.DS C'\fIpathName option \fR?\fIarg arg ...\fR?.PP.DE'\fIPathName\fR is the name of the command, which is the same asthe HList widget's path name. \fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command. The followingcommands are possible for HList widgets:'.TP\fIpathName \fBadd\fI entryPath \fR?\fIoption value ...\fR?'Creates a new list entry with the pathname \fIentryPath\fR. A listentry must be created after its parent is created (unless this entryis a top-level entry, which has no parent). This command returns theentryPath of the newly created list entry. The followingconfiguration options can be given to configure the list entry:'.RS'.TP\fB\-at\fI position\fR'Insert the new list at the position given by \fIposition\fR.\fIposition\fR must be a valid integer. the Position \fB0\fR indicatesthe first position, \fB1\fR indicates the second position, and so on.'.TP\fB\-after\fI afterWhich\fR'Insert the new list entry after the entry identified by\fIafterWhich\fR. \fIafterWhich\fR must be a valid list entry and itmush have the same parent as the new list entry'.TP\fB\-before\fI beforeWhich\fR'Insert the new list entry before the entry identified by\fIbeforeWhich\fR. \fIbeforeWhich\fR must be a valid list entry and itmush have the same parent as the new list entry'.TP\fB\-data\fI string\fR'Specifies a string to associate with this list entry. This string canbe queried by the \fBinfo\fR widget command. The applicationprogrammer can use the \fB\-data\fR option to associate the list entrywith the data it represents.'.TP\fB\-itemtype\fI type\fR'Specifies the type of display item to be display for the new listentry. \fBtype\fR must be a valid display item type. Currently theavailable display item types are \fBimagetext\fR, \fBtext\fR, and\fBwindow\fR. If this option is not specified, then by default thetype specified by this HList widget's \fB\-itemtype\fR option is used.'.TP\fB\-state\fR'Specifies whether this entry can be selected or invoked by the user.Must be either \fBnormal\fR or \fBdisabled\fR.'.RE'The \fBadd\fR widget command accepts additional configuration optionsto configure the display item associated with this list entry. The setof additional configuration options depends on the type of the displayitem given by the \fB\-itemtype\fR option. Please see the\fBDItem(n)\fR manual page for a list of the configuration options foreach of the display item types.'.TP\fIpathName \fBaddchild\fI parentPath \fR?\fIoption value ... \fR?'Adds a new child entry to the children list of the list entryidentified by \fIparentPath\fR. Or, if \fIparentPath\fR is set to bethe empty string, then creates a new toplevel entry. The name of thenew list entry will be a unique name automatically generated by theHList widget. Usually if \fIparentPath\fR is \fBfoo\fR, then theentryPath of the new entry will be \fBfoo.1\fR, \fBfoo.2\fR, ... etc.This command returns the entryPath of the newly created list entry.\fIoption\fR can be any option for the \fBadd\fR widget command.'.TP\fIpathName \fBanchor set \fIentryPath\fR'Sets the anchor to the list entry identified by \fIentryPath\fR. Theanchor is the end of the selection that is fixed while the user isdragging out a selection with the mouse.'.TP\fIpathName \fBanchor clear\fR'Removes the anchor, if any, from this HList widget. This onlyremoves the surrounding highlights of the anchor entry and does notaffect its selection status.'.TP\fIpathName \fBcget\fR \fIoption\fR'Returns the current value of the configuration option given by\fIoption\fR. \fIOption\fR may have any of the values accepted by the\fBtixHList\fR command.'.TP'\fIpathName \fBcolumn width \fIcol\fR ?\fI\-char\fR? ?\fIwidth\fR?'Querys or sets the width of a the column \fIcol\fR in the HListwidget. The value of \fIcol\fR is zero-based: 0 stands for the firstcolumn, 1 stands for the second, and so on. If no further parametersare given, returns the current width of this column (in number ofpixels). Additional parameters can be given to set the width of thiscolumn:.PP.RS.TP\fIpathName \fBcolumn width \fIcol\fR \fB{}\fR'An empty string indicates that the width of the column should be justwide enough to display the widest element in this column. In thiscase, the width of this column may change as a result of the elementsin this column changing their sizes.'.TP\fIpathName \fBcolumn width \fIcol\fR \fIwidth\fR'\fIwidth\fR must be in a form accepted by \fBTk_GetPixels(3)\fR.'.TP\fIpathName \fBcolumn width \fIcol\fR \fB-char\fR \fInChars\fR'The width is set to be the average width occupied by \fInChars\fRnumber of characters of the font specified by the \fB\-font\fR optionof this HList widget.'.RE.TP'\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?'Query or modify the configuration options of the widget. If no\fIoption\fR is specified, returns a list describing all of theavailable options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list). If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified). Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given widget option(s) to have the given value(s); inthis case the command returns an empty string. \fIOption\fR may haveany of the values accepted by the \fBtixHList\fR command.'.TP\fIpathName \fBdelete\fR \fIoption\fR ?\fIentryPath\fR?Delete one or more list entries. \fIoption\fR may be one of thefollowing:.RS.TP\fBall\fRDelete all entries in the HList. In this case the \fIentryPath\fRdoes not need to be specified.'.TP\fBentry\fRDelete the entry specified by \fIentryPath\fR and all its offsprings,if any.'.TP\fBoffsprings\fRDelete all the offsprings, if any, of the entry specified by\fIentryPath\fR. However, \fIentryPath\fR itself is not deleted.'.TP\fBsiblings\fRDelete all the list entries that share the same parent with the entryspecified by \fIentryPath\fR. However, \fIentryPath\fR itself is notdeleted..RE''.TP\fIpathName \fBdragsite set \fIentryPath\fR'Sets the dragsite to the list entry identified by\fIentryPath\fR. The dragsite is used to indicate the source of adrag-and-drop action. Currently drag-and-drop functionality has notbeen implemented in Tix yet.'.TP\fIpathName \fBdragsite clear\fRRemove the dragsite, if any, from the this HList widget. This onlyremoves the surrounding highlights of the dragsite entry and does notaffect its selection status.''.TP\fIpathName \fBdropsite set \fIentryPath\fR'Sets the dropsite to the list entry identified by \fIentryPath\fR. Thedropsite is used to indicate the target of a grag-and-dropaction. Currently drag-and-drop functionality has not been implementedin Tix yet.'.TP\fIpathName \fBdropsite clear\fR'Remove the dropsite, if any, from the this HList widget. This onlyremoves the surrounding highlights of the dropsite entry and does notaffect its selection status.'.TP\fIpathName \fBentrycget\fR \fI entryPath option\fR'Returns the current value of the configuration option given by\fIoption\fR for the entry indentfied by \fIentryPath\fR. \fIOption\fRmay have any of the values accepted by the \fBadd\fR widget command.'.TP\fIpathName \fBentryconfigure\fI entryPath \fR?\fIoption\fR? \fI?value option value ...\fR?'Query or modify the configuration options of the list entry indentfiedby \fIentryPath\fR. If no \fIoption\fR is specified, returns a listdescribing all of the available options for \fIentryPath\fR (see\fBTk_ConfigureInfo\fR for information on the format of this list.) If\fIoption\fR is specified with no \fIvalue\fR, then the commandreturns a list describing the one named option (this list will beidentical to the corresponding sublist of the value returned if no\fIoption\fR is specified). If one or more \fIoption\-value\fR pairsare specified, then the command modifies the given option(s) to havethe given value(s); in this case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBadd\fR or\fBaddchild\fR widget command. The exact set of options depends on thevalue of the \fB\-itemtype\fR option passed to the the \fBadd\fR or\fBaddchild\fR widget command when this list entry is created.''.TP\fIpathName \fBheader \fIoption\fR \fIcol\fR ?\fIargs ...\fR?'Manipulates the header items of this HList widget. If the\fB\-header\fR option of this HList widget is set to true, then aheader item is displayed at the top of each column. The \fIcol\fRargument for this command must be a valid integer. 0 indicates thefirst column, 1 the second column, ... and so on. This commandsupports the following options:'.RS.TP\fIpathName \fBheader \fBcget\fR \fIcol\fR \fIoption\fR'If the \fIcol\fR-th column has a header display item, returns thevalue of the specified \fIoption\fR of the header item. If the headerdoesn't exist, returns an error.'.TP\fIpathName \fBheader \fBconfigure\fR \fIcol\fR ?\fIoption\fR? \fI?value option value ...\fR?'Query or modify the configuration options of the header display itemof the \fIcol\fR-th column. The header item must exist, or an errorwill result. If no \fIoption\fR is specified, returns a listdescribing all of the available options for the header display item(see \fBTk_ConfigureInfo(3)\fR for information on the format of thislist.) If \fIoption\fR is specified with no \fIvalue\fR, then thecommand returns a list describing the one named option (this list willbe identical to the corresponding sublist of the value returned if no\fIoption\fR is specified). If one or more \fIoption\-value\fR pairsare specified, then the command modifies the given option(s) to havethe given value(s); in this case the command returns an emptystring. \fIOption\fR may have any of the values accepted by the\fBheader create\fR widget command. The exact set of options dependson the value of the \fB\-itemtype\fR option passed to the the \fBheadercreate\fR widget command when this display item was created.'.TP\fIpathName \fBheader \fBcreate\fR \fIcol\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?'Creates a new display item as the header for the \fIcol\fR-thcolumn. If an header display item already exists for this column, itwill be replaced by the new item. An optional parameter\fI\-itemtype\fR can be used to specify what type of display itemshould be created. If the \fI\-itemtype\fR is not given, then bydefault the type specified by this HList widget's \fB\-itemtype\fRoption 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 ofdisplay item or one of the following:.RS'.TP\fB\-borderwidth\fR'Specifies the border width of this header item.'.TP\fB\-headerbackground\fR'Specifies the background color of this header item.'.TP\fB\-relief\fR'Specifies the relief type of the border of this header item.'.RE'.TP\fIpathName \fBheader \fBdelete \fIcol\fR'Deletes the header display item for the \fIcol\fR-th column.'.TP\fIpathName \fBheader \fBexists \fIcol\fR'Return true if an header display item exists for the \fIcol\fR-thcolumn; return false otherwise.'.TP\fIpathName \fBheader \fBsize \fIentryPath\fR'If an header display item exists for the \fIcol\fR-th column , returnsits size in a two element list of the form {\fIwidth height\fR};returns an error if the header display item does not exist.'.RE'.TP\fIpathName \fBhide \fIoption ?entryPath?\fR'Makes some of entries invisible invisible without deleting them.\fIOption\fR can be one of the following:.RS.TP\fBentry\fRHides the list entry identified by \fIentryPath\fR..PPCurrently only the \fBentry\fR option is supported. Other options willbe added in the next release..RE'.TP\fIpathName \fBindicator \fIoption\fR entryPath ?\fIargs ...\fR?'Manipulates the indicator on the list entries. An indicator is usuallya small display item (such as an image) that is displayed to the leftto an entry to indicate the status of the entry. For example, it maybe used to indicator whether a directory is opened orclosed. \fIoption\fR can be one of the following:'.RS.TP\fIpathName \fBindicator \fBcget\fR \fIentryPath\fR \fIoption\fR'If the list entry given by \fIentryPath\fR has an indicator, returnsthe value of the specified \fIoption\fR of the indicator. If theindicator doesn't exist, returns an error.'.TP\fIpathName \fBindicator \fBconfigure\fR \fIentryPath\fR ?\fIoption\fR? \fI?value option value ...\fR?'Query or modify the configuration options of the indicator displayitem of the entry specified by \fIentryPath\fR. The indicator itemmust exist, or an error will result. If no \fIoption\fR is specified,returns a list describing all of the available options for theindicator display item (see \fBTk_ConfigureInfo(3)\fR for informationon the format of this list). If \fIoption\fR is specified with no\fIvalue\fR, then the command returns a list describing the one namedoption (this list will be identical to the corresponding sublist ofthe value returned if no \fIoption\fR is specified). If one or more\fIoption\-value\fR pairs are specified, then the command modifies thegiven option(s) to have the given value(s); in this case the commandreturns an empty string. \fIOption\fR may have any of the valuesaccepted by the \fBindicator create\fR widget command. The exact setof options depends on the value of the \fB\-itemtype\fR option passedto the the \fBindicator create\fR widget command when this display itemwas created.'.TP\fIpathName \fBindicator \fBcreate\fR \fIentryPath\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?'Creates a new display item as the indicator for the entry specified by\fIentryPath\fR. If an indicator display item already exists for thisentry, it will be replaced by the new item. An optional parameter\fI\-itemtype\fR can be used to specify what type of display itemshould be created. If the \fI\-itemtype\fR is not given, then bydefault the type specified by this HList widget's \fB\-itemtype\fRoption 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 ofdisplay item.'.TP\fIpathName \fBindicator \fBdelete \fIentryPath\fR'Deletes the indicator display item for the entry given by \fIentryPath\fR.'.TP\fIpathName \fBindicator \fBexists \fIentryPath\fR'Return true if an indicator display item exists for the entry given by\fIentryPath\fR; return false otherwise.'.TP\fIpathName \fBindicator \fBsize \fIentryPath\fR'If an indicator display item exists for the entry given by\fIentryPath\fR, returns its size in a two element list of the form{\fIwidth height\fR}; returns an error if the indicator display itemdoes not exist.'.RE'.TP\fIpathName \fBinfo \fIoption\fR \fIarg ...\fR'Query information about the HList widget. \fIoption\fR can be oneof the following:.RS.TP\fIpathName \fBinfo \fBanchor\fR'Returns the entryPath of the current anchor, if any, of the HListwidget. If the anchor is not set, returns the empty string.'.TP\fIpathName \fBinfo bbox\fR \fIentryPath\fR'Returns a list of four numbers describing the visible bounding box ofthe entry given \fIentryPath\fR. The first two elements of the listgive the x and y coordinates of the upper-left corner of the screenarea covered by the entry (specified in pixels relative to the widget)and the last two elements give the lower-right corner of the area, inpixels. If no part of the entry given by index is visible on thescreen then the result is an empty string; if the entry is partiallyvisible, the result gives the only the visible area of the entry.'.TP\fIpathName \fBinfo \fBchildren\fR ?\fIentryPath\fR?'If \fIentrpyPath\fR is given, returns a list of the entryPath's of itschildren entries. Otherwise returns a list of the toplevelentryPath's.'.TP\fIpathName \fBinfo \fBdata\fR ?\fIentryPath\fR?'Returns the data associated with \fIentryPath\fR.'.TP\fIpathName \fBinfo \fBdragsite\fR'Returns the entryPath of the current dragsite, if any, of the HListwidget. If the dragsite is not set, returns the empty string.'.TP\fIpathName \fBinfo \fBdropsite\fR'Returns the entryPath of the current dropsite, if any, of the HListwidget. If the dropsite is not set, returns the empty string.'.TP\fIpathName \fBinfo \fBexists\fR \fIentryPath\fRReturns a boolean value indicating whether the list entry\fIentrpyPath\fR exists.'.TP\fIpathName \fBinfo \fBhidden\fR \fIentryPath\fR'Returns a boolean value indicating whether the list entry\fBentrpyPath\fR is hidden or not.'.TP\fIpathName \fBinfo \fBnext\fR \fIentryPath\fRReturns the entryPath of the list entry, if any, immediately belowthis list entry. If this entry is already at the bottom of the HListwidget, returns an empty string.'.TP\fIpathName \fBinfo \fBparent\fR \fIentryPath\fRReturns the name of the parent of the list entry identified by\fIentrpyPath\fR. If \fIentrpyPath\fR is a toplevel list entry,returns the empty string.'.TP\fIpathName \fBinfo \fBprev\fR \fIentryPath\fR'Returns the entryPath of the list entry, if any, immediately abovethis list entry. If this entry is already at the top of the HListwidget, returns an empty string.'.TP\fIpathName \fBinfo \fBselection\fR'Returns a list of selected entries in the HList widget. If no entriesare selectd, returns an empty string..RE'.TP\fIpathName \fBitem \fIoption\fR ?\fIargs ...\fR?'Creates and configures the display items at individual columns theentries. The form of additional of arguments depends on the choice of\fIoption\fR:'.RS'.TP\fIpathName \fBitem \fBcget \fIentryPath col option\fR''Returns the current value of the configure \fIoption\fR of the displayitem at the column designated by \fIcol\fR of the entry specified by\fIentryPath\fR.'.TP\fIpathName \fBitem configure \fIentryPath col\fR ?\fIoption\fR? \fI?value option value ...\fR?'Query or modify the configuration options of the display item at thecolumn designated by \fIcol\fR of the entry specified by\fIentryPath\fR. If no \fIoption\fR is specified, returns a listdescribing all of the available options for \fIentryPath\fR (see\fBTk_ConfigureInfo(3)\fR for information on the format of thislist). If \fIoption\fR is specified with no \fIvalue\fR, then thecommand returns a list describing the one named option (this list willbe identical to the corresponding sublist of the value returned if no\fIoption\fR is specified). If one or more \fIoption\-value\fR pairsare specified, then the command modifies the given option(s) to havethe given value(s); in this case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBitemcreate\fR widget command. The exact set of options depends on thevalue of the \fB\-itemtype\fR option passed to the the \fBitemcreate\fR widget command when this display item was created.'.TP\fIpathName \fBitem create \fIentryPath col\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?''Creates a new display item at the column designated by \fIcol\fR ofthe entry specified by \fIentryPath\fR. An optional parameter\fI\-itemtype\fR can be used to specify what type of display itemsshould be created. If the \fI\-itemtype\fR is not specified, then bydefault the type specified by this HList widget's \fB\-itemtype\fRoption 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 ofdisplay item.'.TP\fIpathName \fBitem delete \fIentryPath col\fR'Deletes the display item at the column designated by \fIcol\fR ofthe entry specified by \fIentryPath\fR.'.TP\fIpathName \fBitem exists \fIentryPath col\fR'Returns true if there is a display item at the column designated by\fIcol\fR of the entry specified by \fIentryPath\fR; returns falseotherwise.'.RE'.TP\fIpathName \fBnearest \fIy\fR'Given a y-coordinate within the HList window, this command returnsthe entryPath of the (visible) HList element nearest to thaty-coordinate.''.TP\fIpathName \fBsee \fIentryPath\fR'Adjust the view in the HList so that the entry given by \fIentryPath\fR isvisible. If the entry is already visible then the command has noeffect; if the entry is near one edge of the window then the HListscrolls to bring the element into view at the edge; otherwise theHList widget scrolls to center the entry.'.TP\fIpathName \fBselection \fIoption\fR \fIarg ...\fR'This command is used to adjust the selection within a HList widget. Ithas several forms, depending on \fIoption\fR:.RS'.TP\fIpathName \fBselection clear \fR?\fIfrom\fR? ?\fIto\fR?'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 listentry identified by \fIfrom\fR is deselected. When both \fIfrom\fR and\fIto\fR are given, deselects all of the list entrie(s) betweenbetween \fIfrom\fR and \fIto\fR, inclusive, without affecting theselection state of entries outside that range.'.TP\fIpathName \fBselection get\fR'This is an alias for the \fBinfo selection\fR widget command.,.TP\fIpathName \fBselection includes \fIentryPath\fR'Returns 1 if the list entry indicated by \fIentryPath\fR is currentlyselected; returns 0 otherwise.'.TP\fIpathName \fBselection set \fIfrom\fR ?\fIto\fR?'Selects all of the list entrie(s) between between \fIfrom\fR and\fIto\fR, inclusive, without affecting the selection state of entriesoutside that range. When only \fIfrom\fR is given, only the list entryidentified by \fIfrom\fR is selected..RE'.TP\fIpathName \fBshow \fIoption ?entryPath?\fR'Show the entries that are hidden by the \fBhide\fR command,\fIoption\fR can be one of the following:.RS.TP\fBentry\fRShows the list entry identified by \fIentryPath\fR..PPCurrently only the \fBentry\fR option is supported. Other options willbe added in future releases..RE'.TP\fIpathName \fBxview \fIargs\fRThis command is used to query and change the horizontal position of theinformation in the widget's window. It can take any of the followingforms:.RS.TP\fIpathName \fBxview\fR'Returns a list containing two elements. Each element is a realfraction between 0 and 1; together they describe the horizontal spanthat is visible in the window. For example, if the first element is.2 and the second element is .6, 20% of the HList entry isoff-screen to the left, the middle 40% is visible in the window, and40% of the entry is off-screen to the right. These are the same valuespassed to scrollbars via the \fB\-xscrollcommand\fR option..TP\fIpathName \fBxview\fR \fIentryPath\fR'Adjusts the view in the window so that the list entry identified by\fIentryPath\fR is aligned to the left edge of the window..TP\fIpathName \fBxview moveto\fI fraction\fR'Adjusts the view in the window so that \fIfraction\fR of the totalwidth of the HList is off-screen to the left. \fIfraction\fR must bea fraction between 0 and 1.'.TP\fIpathName \fBxview scroll \fInumber what\fR'This command 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 anabbreviation of one of these. If \fIwhat\fR is \fBunits\fR, the viewadjusts left or right by \fInumber\fR character units (the width ofthe \fB0\fR character) on the display; if it is \fBpages\fR then theview adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negativethen characters farther to the left become visible; if it is positivethen characters farther to the right become visible.'.RE'.TP\fIpathName \fByview \fI?args\fR?'This command is used to query and change the vertical position of theentries in the widget's window. It can take any of the following forms:'.RS.TP\fIpathName \fByview\fR'Returns a list containing two elements, both of which are realfractions between 0 and 1. The first element gives the position ofthe list element at the top of the window, relative to the HList as awhole (0.5 means it is halfway through the HList, for example). Thesecond element gives the position of the list entry just after thelast one in the window, relative to the HList as a whole. These arethe same values passed to scrollbars via the \fB\-yscrollcommand\fRoption.'.TP\fIpathName \fByview\fR \fIentryPath\fR'Adjusts the view in the window so that the list entry given by\fIentryPath\fR is displayed at the top of the window.'.TP\fIpathName \fByview moveto\fI fraction\fR'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 afraction between 0 and 1; 0 indicates the first entry in theHList, 0.33 indicates the entry one-third the way through theHList, and so on..TP\fIpathName \fByview scroll \fInumber what\fR'This command 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\fRis \fBunits\fR, the view adjusts up or down by \fInumber\fR lines; ifit is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls.If \fInumber\fR is negative then earlier entries become visible; ifit is positive then later entries become visible..RE''----------------------------------------------------------------------.SH BINDINGS.PP.IP [1]If the \fB\-selectmode\fR is "browse", when the user drags the mousepointer over the list entries, the entry under the pointer will behighlighted and the \fB\-browsecmd\fR procedure will be called withone parameter, the entryPath of the highlighted entry. Only one entrycan be highlighted at a time. The \fB\-command\fR procedure will becalled when the user double-clicks on a list entry.'.IP [2]If the \fB\-selectmode\fR is "single", the entries will only behighlighted by mouse <ButtonRelease-1> events. When a new list entryis highlighted, the \fB\-browsecmd\fR procedure will be called withone parameter indicating the highlighted list entry. The\fB\-command\fR procedure will be called when the user double-clickson a list entry.''.IP [3]If the \fB\-selectmode\fR is "multiple", when the user drags the mousepointer over the list entries, all the entries under the pointer willbe highlighted. However, only a contiguous region of list entries canbe selected. When the highlighted area is changed, the\fB\-browsecmd\fR procedure will be called with an undefinedparameter. It is the responsibility of the \fB\-browsecmd\fR procedureto find out the exact highlighted selection in the HList. The\fB\-command\fR procedure will be called when the user double-clickson a list entry.'.IP [4]'If the \fB\-selectmode\fR is "extended", when the user drags the mousepointer over the list entries, all the entries under the pointer willbe highlighted. The user can also make disjointed selections using<Control-ButtonPress-1>. When the highlighted area is changed, the\fB\-browsecmd\fR procedure will be called with an undefinedparameter. It is the responsibility of the \fB\-browsecmd\fR procedureto find out the exact highlighted selection in the HList. The\fB\-command\fR procedure will be called when the user double-clickson a list entry.'.IP [5]\fBArrow key bindings:\fR <Up> arrow key moves the anchor point to theitem right on top of the current anchor item. <Down> arrow key movesthe anchor point to the item right below the current anchor item.<Left> arrow key moves the anchor to the parent item of the currentanchor item. <Right> moves the anchor to the first child of thecurrent anchor item. If the current anchor item does not have anychildren, moves the anchor to the item right below the current anchoritem.'----------------------------------------------------------------------.SH EXAMPLE.PPThis example demonstrates how to use an HList to store a filedirectory structure and respond to the user's browse events:.PP\fC.nftixHList .h -separator "/" \-browsecmd browse \-selectmode single \\-itemtype text.h add / \-text /.h add /home \-text /home.h add /home/ioi \-text /home/ioi.h add /home/foo \-text /home/foo.h add /usr \-text /usr.h add /usr/lib \-text /usr/libpack .hproc browse {file} {puts "$file browsed"}.fi\fR''.SH BUGS'The fact that the display item at column 0 is implicitly associatedwith the whole entry is probably a design bug. This was done forbackward compatibility purposes. The result is that there is a largeoverlap between the \fBitem\fR command and the \fBadd\fR,\fBaddchild\fR, \fBentrycget\fR and \fBentryconfigure\fRcommands. Whenever multiple columns exist, the programmer should useONLY the \fBitem\fR command to create and configure the display itemsin each column; the \fBadd\fR, \fBaddchild\fR, \fBentrycget\fR and\fBentryconfigure\fR should be used ONLY to create and configureentries.''----------------------------------------------------------------------.SH KEYWORDSTix(n), Hierarchical Listbox
