home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-03-23 | 52.7 KB | 1,019 lines |
-
- <HTML>
- <HEAD>
- <TITLE>Tk::HList - Create and manipulate Tix Hierarchial List widgets</TITLE>
- <LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
- <LINK REV="made" HREF="mailto:">
- </HEAD>
-
- <BODY>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::HList - Create and manipulate Tix Hierarchial List widgets</P></STRONG>
- </TD></TR>
- </TABLE>
-
- <A NAME="__index__"></A>
- <!-- INDEX BEGIN -->
-
- <UL>
-
- <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
-
- <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
- <LI><A HREF="#standard options">STANDARD OPTIONS</A></LI>
- <LI><A HREF="#widgetspecific options">WIDGET-SPECIFIC OPTIONS</A></LI>
- <LI><A HREF="#description">DESCRIPTION</A></LI>
- <LI><A HREF="#display items">DISPLAY ITEMS</A></LI>
- <LI><A HREF="#widget methods">WIDGET METHODS</A></LI>
- <LI><A HREF="#bindings">BINDINGS</A></LI>
- <LI><A HREF="#example">EXAMPLE</A></LI>
- <LI><A HREF="#bugs">BUGS</A></LI>
- <LI><A HREF="#keywords">KEYWORDS</A></LI>
- <LI><A HREF="#see also">SEE ALSO</A></LI>
- </UL>
- <!-- INDEX END -->
-
- <HR>
- <P>
- <H1><A NAME="name">NAME</A></H1>
- <P>Tk::HList - Create and manipulate Tix Hierarchial List widgets</P>
- <P>
- <HR>
- <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
- <UL>
- <LI>Linux</LI>
- <LI>Solaris</LI>
- <LI>Windows</LI>
- </UL>
- <HR>
- <H1><A NAME="synopsis">SYNOPSIS</A></H1>
- <P><EM>$hlist</EM> = <EM>$parent</EM>-><STRONG>HList</STRONG>(?<EM>options</EM>?);</P>
- <P>
- <HR>
- <H1><A NAME="standard options">STANDARD OPTIONS</A></H1>
- <P><TABLE CELLSPACING=0 CELLPADDING=0><TR><TD><STRONG>-background</STRONG><TD><STRONG>-borderwidth</STRONG><TD><STRONG>-cursor</STRONG><TD><STRONG>-exportselection</STRONG>
- <TR><TD><STRONG>-foreground</STRONG><TD><STRONG>-font</STRONG><TD><STRONG>-height</STRONG><TD><STRONG>-highlightcolor</STRONG>
- <TR><TD><STRONG>-highlightthickness</STRONG><TD><STRONG>-relief</STRONG><TD><STRONG>-selectbackground</STRONG>
- <TR><TD><STRONG>-selectforeground</STRONG><TD><STRONG>-xscrollcommand</STRONG><TD><STRONG>-yscrollcommand</STRONG>
- <TR><TD><STRONG>-width</STRONG></TABLE></P>
- <P>See <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for details of the standard options.</P>
- <P>
- <HR>
- <H1><A NAME="widgetspecific options">WIDGET-SPECIFIC OPTIONS</A></H1>
- <DL>
- <DT><STRONG><A NAME="item_Name%3A_browsecmd">Name: <STRONG>browsecmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_BrowseCmd">Class: <STRONG>BrowseCmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dbrowsecmd">Switch: <STRONG>-browsecmd</STRONG></A></STRONG><BR>
- <DD>
- Specifies a perl/Tk <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> to be executed when the user browses through the
- entries in the HList widget.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_columns">Name: <STRONG>columns</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Columns">Class: <STRONG>Columns</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dcolumns">Switch: <STRONG>-columns</STRONG></A></STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_command">Name: <STRONG>command</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Command">Class: <STRONG>Command</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dcommand">Switch: <STRONG>-command</STRONG></A></STRONG><BR>
- <DD>
- Specifies the perl/Tk <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> 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.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_drawBranch">Name: <STRONG>drawBranch</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_DrawBranch">Class: <STRONG>DrawBranch</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ddrawbranch">Switch: <STRONG>-drawbranch</STRONG></A></STRONG><BR>
- <DD>
- A Boolean value to specify whether branch line should be drawn to
- connect list entries to their parents.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_foreground">Name: <STRONG>foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Foreground">Class: <STRONG>Foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dforeground">Switch: <STRONG>-foreground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Alias%3A_%2Dfg">Alias: <STRONG>-fg</STRONG></A></STRONG><BR>
- <DD>
- <STRONG>[OBSOLETE]</STRONG> Specifies the default foreground color for the list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_gap">Name: <STRONG>gap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Gap">Class: <STRONG>Gap</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dgap">Switch: <STRONG>-gap</STRONG></A></STRONG><BR>
- <DD>
- <STRONG>[OBSOLETE]</STRONG> The default distance between the bitmap/image and the
- text in list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_header">Name: <STRONG>header</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Header">Class: <STRONG>Header</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dheader">Switch: <STRONG>-header</STRONG></A></STRONG><BR>
- <DD>
- A Boolean value specifying whether headers should be displayed for
- this HList widget (see the <STRONG>header</STRONG> method below).
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_height">Name: <STRONG>height</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Height">Class: <STRONG>Height</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dheight">Switch: <STRONG>-height</STRONG></A></STRONG><BR>
- <DD>
- Specifies the desired height for the window in number of characters.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_indent">Name: <STRONG>indent</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Indent">Class: <STRONG>Indent</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dindent">Switch: <STRONG>-indent</STRONG></A></STRONG><BR>
- <DD>
- Specifies the amount of horizontal indentation between a list entry
- and its children. Must be a valid screen distance value.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_indicator">Name: <STRONG>indicator</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Indicator">Class: <STRONG>Indicator</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dindicator">Switch: <STRONG>-indicator</STRONG></A></STRONG><BR>
- <DD>
- Specifies whether the indicators should be displayed inside the HList
- widget. See the <STRONG>indicator</STRONG> method below.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_indicatorCmd">Name: <STRONG>indicatorCmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_IndicatorCmd">Class: <STRONG>IndicatorCmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dindicatorcmd">Switch: <STRONG>-indicatorcmd</STRONG></A></STRONG><BR>
- <DD>
- Specifies a perl/Tk <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> to be executed when the user manipulates the
- indicator of an HList entry. The <STRONG>-indicatorcmd</STRONG> is triggered
- when the user press or releases the mouse button over the indicator in
- an HList entry. By default the perl/Tk <STRONG>callback</STRONG> specified by
- <STRONG>-indicatorcmd</STRONG> 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: <STRONG><Arm></STRONG>, <STRONG><Disarm></STRONG>,
- and <STRONG><Activate></STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_itemType">Name: <STRONG>itemType</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_ItemType">Class: <STRONG>ItemType</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Ditemtype">Switch: <STRONG>-itemtype</STRONG></A></STRONG><BR>
- <DD>
- Specifies the default type of display item for this HList widget. When
- you call the <STRONG>itemCreate</STRONG>, <STRONG>add</STRONG> and <STRONG>addchild</STRONG> methods, display
- items of this
- type will be created if the <STRONG>-itemtype</STRONG> option is not specified .
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_padX">Name: <STRONG>padX</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Pad">Class: <STRONG>Pad</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dpadx">Switch: <STRONG>-padx</STRONG></A></STRONG><BR>
- <DD>
- <STRONG>[OBSOLETE]</STRONG> The default horizontal padding for list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_padY">Name: <STRONG>padY</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG>Class: <STRONG>Pad</STRONG></STRONG><BR>
- <DD>
- <DT><STRONG>Switch: <STRONG>-padx</STRONG></STRONG><BR>
- <DD>
- <STRONG>[OBSOLETE]</STRONG> The default vertical padding for list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectBackground">Name: <STRONG>selectBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_SelectBackground">Class: <STRONG>SelectBackground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectbackground">Switch: <STRONG>-selectbackground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the background color for the selected list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectBorderWidth">Name: <STRONG>selectBorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_BorderWidth">Class: <STRONG>BorderWidth</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectborderwidth">Switch: <STRONG>-selectborderwidth</STRONG></A></STRONG><BR>
- <DD>
- 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 <STRONG>Tk_GetPixels</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectForeground">Name: <STRONG>selectForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_SelectForeground">Class: <STRONG>SelectForeground</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectforeground">Switch: <STRONG>-selectforeground</STRONG></A></STRONG><BR>
- <DD>
- Specifies the foreground color for the selected list entries.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_selectMode">Name: <STRONG>selectMode</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_SelectMode">Class: <STRONG>SelectMode</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dselectmode">Switch: <STRONG>-selectmode</STRONG></A></STRONG><BR>
- <DD>
- 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 <STRONG>single</STRONG>, <STRONG>browse</STRONG>, <STRONG>multiple</STRONG>, or
- <STRONG>extended</STRONG>; the default value is <STRONG>single</STRONG>.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_sizeCmd">Name: <STRONG>sizeCmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_SizeCmd">Class: <STRONG>SizeCmd</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dsizecmd">Switch: <STRONG>-sizecmd</STRONG></A></STRONG><BR>
- <DD>
- Specifies a perl/Tk <A HREF="../../../site/lib/Tk/callbacks.html">callback</A> to be called whenever the HList widget
- changes its size. This method can be useful to implement ``<EM>user scroll
- bars when needed</EM>'' features.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_separator">Name: <STRONG>separator</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Separator">Class: <STRONG>Separator</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dseparator">Switch: <STRONG>-separator</STRONG></A></STRONG><BR>
- <DD>
- Specifies the character to used as the separator character when
- intepreting the path-names of list entries. By default the character
- ``.'' is used.
- <P></P>
- <DT><STRONG><A NAME="item_Name%3A_width">Name: <STRONG>width</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Class%3A_Width">Class: <STRONG>Width</STRONG></A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_Switch%3A_%2Dwidth">Switch: <STRONG>-width</STRONG></A></STRONG><BR>
- <DD>
- Specifies the desired width for the window in characters.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="description">DESCRIPTION</A></H1>
- <P>The <STRONG>HList</STRONG> method creates a new window (given by the
- $widget argument) and makes it into a HList widget.
- Additional options, described above, may be specified on the command
- line or in the option database to configure aspects of the
- HList widget such as its cursor and relief.</P>
- <P>The HList widget can be used to display any data that have a
- hierarchical structure, for example, file system directory trees. The
- list entries are indented and connected by branch lines according to
- their places in the hierachy.</P>
- <P>Each list entry is identified by an <STRONG>entryPath</STRONG>. The entryPath is a
- sequence of <STRONG>entry names</STRONG> separated by the separator charactor
- (specified by the <STRONG>-separator</STRONG> option). An <STRONG>entry name</STRONG> can be
- any string that does not contain the separator charactor, or it can be
- the a string that contains only one separator charactor.</P>
- <P>For example, when ``.'' is used as the separator charactor,
- ``one.two.three'' is the entryPath for a list entry whose parent is
- ``one.two'', whose parent is ``one'', which is a toplevel entry (has no
- parents).</P>
- <P>Another examples: ``.two.three'' is the entryPath for a list entry whose
- parent is ``.two'', whose parent is ``.'', which is a toplevel entry.</P>
- <P>
- <HR>
- <H1><A NAME="display items">DISPLAY ITEMS</A></H1>
- <P>Each list entry in an HList widget is associated with a <STRONG>display</STRONG>
- item. The display item determines what visual information should
- be displayed for this list entry. Please see <A HREF="../../../site/lib/Tk/DItem.html">the Tk::DItem manpage</A>
- for a list of all display items.
- When a list entry is created by the <STRONG>itemCreate</STRONG>, <STRONG>add</STRONG> or
- <STRONG>addchild</STRONG> widget
- methods, the type of its display item is determined by the
- <STRONG>-itemtype</STRONG> option passed to these methods. If the
- <STRONG>-itemtype</STRONG> is omitted, then by default the type specified by
- this HList widget's <STRONG>-itemtype</STRONG> option is used.</P>
- <P>
- <HR>
- <H1><A NAME="widget methods">WIDGET METHODS</A></H1>
- <P>The <STRONG>HList</STRONG> method creates a widget object.
- This object supports the <STRONG>configure</STRONG> and <STRONG>cget</STRONG> methods
- described in <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> which can be used to enquire and
- modify the options described above.
- The widget also inherits all the methods provided by the generic
- <A HREF="../../../site/lib/Tk/Widget.html">Tk::Widget</A> class.</P>
- <P>The following additional methods are available HList widgets:</P>
- <DL>
- <DT><STRONG><A NAME="item_add"><EM>$hlist</EM>-><STRONG>add</STRONG>(<EM>$entryPath</EM> ?,<EM>option</EM>=><EM>value</EM>, ...?)</A></STRONG><BR>
- <DD>
- Creates a new list entry with the pathname <EM>$entryPath</EM>. 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 <A HREF="#bugs">BUGS</A> below.
- This method returns the
- entryPath of the newly created list entry. The following
- configuration options can be given to configure the list entry:
- <DL>
- <DT><STRONG><A NAME="item_%2Dat_%3D%3E_position"><STRONG>-at</STRONG> => <EM>position</EM></A></STRONG><BR>
- <DD>
- Insert the new list at the position given by <EM>position</EM>.
- <EM>position</EM> must be a valid integer. The position <STRONG>0</STRONG> indicates
- the first position, <STRONG>1</STRONG> indicates the second position, and so on.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dafter_%3D%3E_afterWhich"><STRONG>-after</STRONG> => <EM>afterWhich</EM></A></STRONG><BR>
- <DD>
- Insert the new list entry after the entry identified by
- <EM>afterWhich</EM>. <EM>afterWhich</EM> must be a valid list entry and it
- mush have the same parent as the new list entry
- <P></P>
- <DT><STRONG><A NAME="item_%2Dbefore_%3D%3E_beforeWhich"><STRONG>-before</STRONG> => <EM>beforeWhich</EM></A></STRONG><BR>
- <DD>
- Insert the new list entry before the entry identified by
- <EM>beforeWhich</EM>. <EM>beforeWhich</EM> must be a valid list entry and it
- mush have the same parent as the new list entry
- <P></P>
- <DT><STRONG><A NAME="item_%2Ddata_%3D%3E_string"><STRONG>-data</STRONG> => <EM>string</EM></A></STRONG><BR>
- <DD>
- Specifies a string to associate with this list entry. This string can
- be queried by the <STRONG>info</STRONG> method. The application
- programmer can use the <STRONG>-data</STRONG> option to associate the list entry
- with the data it represents.
- <P></P>
- <DT><STRONG><A NAME="item_%2Ditemtype_%3D%3E_type"><STRONG>-itemtype</STRONG> => <EM>type</EM></A></STRONG><BR>
- <DD>
- Specifies the type of display item to be display for the new list
- entry. <STRONG>type</STRONG> must be a valid display item type. Currently the
- available display item types are <STRONG>imagetext</STRONG>, <STRONG>text</STRONG>, and
- $widget. If this option is not specified, then by default the
- type specified by this HList widget's <STRONG>-itemtype</STRONG> option is used.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dstate_%3D%3E_state"><STRONG>-state</STRONG> => <EM>state</EM></A></STRONG><BR>
- <DD>
- Specifies whether this entry can be selected or invoked by the user.
- Must be either <STRONG>normal</STRONG> or <STRONG>disabled</STRONG>.
- <P></P></DL>
- <P>The <STRONG>add</STRONG> 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 <STRONG>-itemtype</STRONG> option. Please see
- <A HREF="../../../site/lib/Tk/DItem.html">the Tk::DItem manpage</A> for a list of the configuration options for
- each of the display item types.</P>
- <DT><STRONG><A NAME="item_addchild"><EM>$hlist</EM>-><STRONG>addchild</STRONG>(<EM>$parentPath, </EM>?<EM>option, value, ..., </EM>?)</A></STRONG><BR>
- <DD>
- Adds a new child entry to the children list of the list entry
- identified by <EM>$parentPath</EM>. Or, if <EM>$parentPath</EM> 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 <EM>$parentPath</EM> is <STRONG>foo</STRONG>, then the
- entryPath of the new entry will be <STRONG>foo.0</STRONG>, <STRONG>foo.1</STRONG>, ... etc.
- This method returns the entryPath of the newly created list entry.
- <EM>option</EM> can be any option for the <STRONG>add</STRONG> method.
- See also <A HREF="#bugs">BUGS</A> below.
- <P></P>
- <DT><STRONG><A NAME="item_anchorSet"><EM>$hlist</EM>-><STRONG>anchorSet</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Sets the anchor to the list entry identified by <EM>$entryPath</EM>. The
- anchor is the end of the selection that is fixed while the user is
- dragging out a selection with the mouse.
- <P></P>
- <DT><STRONG><A NAME="item_anchorClear"><EM>$hlist</EM>-><STRONG>anchorClear</STRONG></A></STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><A NAME="item_columnWidth"><EM>$hlist</EM>-><STRONG>columnWidth</STRONG>(<EM>$col</EM>?, <EM>-char</EM>?, ?<EM>width</EM>?)</A></STRONG><BR>
- <DD>
- Querys or sets the width of a the column <EM>$col</EM> in the HList
- widget. The value of <EM>$col</EM> 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:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>columnWidth</STRONG>(<EM>$col</EM>, <STRONG>''</STRONG>)</STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>columnWidth</STRONG>(<EM>$col, </EM><EM>width</EM>)</STRONG><BR>
- <DD>
- <EM>width</EM> must be in a form accepted by <STRONG>Tk_GetPixels</STRONG>.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>columnWidth</STRONG>(<EM>$col, </EM><STRONG>-char, </STRONG><EM>nChars</EM>)</STRONG><BR>
- <DD>
- The width is set to be the average width occupied by <EM>nChars</EM>
- number of characters of the font specified by the <STRONG>-font</STRONG> option
- of this HList widget.
- <P></P></DL>
- <DT><STRONG><A NAME="item_delete"><EM>$hlist</EM>-><STRONG>delete</STRONG>(<EM>option</EM>, <EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Delete one or more list entries. <EM>option</EM> may be one of the
- following:
- <DL>
- <DT><STRONG><A NAME="item_all"><STRONG>all</STRONG></A></STRONG><BR>
- <DD>
- Delete all entries in the HList. In this case the <EM>$entryPath</EM>
- does not need to be specified.
- <P></P>
- <DT><STRONG><A NAME="item_entry"><STRONG>entry</STRONG></A></STRONG><BR>
- <DD>
- Delete the entry specified by <EM>$entryPath</EM> and all its offsprings,
- if any.
- <P></P>
- <DT><STRONG><A NAME="item_offsprings"><STRONG>offsprings</STRONG></A></STRONG><BR>
- <DD>
- Delete all the offsprings, if any, of the entry specified by
- <EM>$entryPath</EM>. However, <EM>$entryPath</EM> itself is not deleted.
- <P></P>
- <DT><STRONG><A NAME="item_siblings"><STRONG>siblings</STRONG></A></STRONG><BR>
- <DD>
- Delete all the list entries that share the same parent with the entry
- specified by <EM>$entryPath</EM>. However, <EM>$entryPath</EM> itself is not
- deleted.
- <P></P></DL>
- <DT><STRONG><A NAME="item_dragsiteSet"><EM>$hlist</EM>-><STRONG>dragsiteSet</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Sets the dragsite to the list entry identified by
- <EM>$entryPath</EM>. 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.
- <P></P>
- <DT><STRONG><A NAME="item_dragsiteClear"><EM>$hlist</EM>-><STRONG>dragsiteClear</STRONG></A></STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><A NAME="item_dropsiteSet"><EM>$hlist</EM>-><STRONG>dropsiteSet</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Sets the dropsite to the list entry identified by <EM>$entryPath</EM>. 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.
- <P></P>
- <DT><STRONG><A NAME="item_dropsiteClear"><EM>$hlist</EM>-><STRONG>dropsiteClear</STRONG></A></STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><A NAME="item_entrycget"><EM>$hlist</EM>-><STRONG>entrycget</STRONG>(<EM>$entryPath</EM>, <EM>option</EM>)</A></STRONG><BR>
- <DD>
- Returns the current value of the configuration option given by
- <EM>option</EM> for the entry indentfied by <EM>$entryPath</EM>. <EM>Option</EM>
- may have any of the values accepted by the <STRONG>add</STRONG> method.
- <P></P>
- <DT><STRONG><A NAME="item_entryconfigure"><EM>$hlist</EM>-><STRONG>entryconfigure</STRONG>(<EM>$entryPath</EM> ?,<EM>option</EM>?, ?<EM>value</EM>=><EM>option</EM>, ...?)</A></STRONG><BR>
- <DD>
- Query or modify the configuration options of the list entry indentfied
- by <EM>$entryPath</EM>. If no <EM>option</EM> is specified, returns a list
- describing all of the available options for <EM>$entryPath</EM> (see
- <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for information on the format of this list.) If
- <EM>option</EM> is specified with no <EM>value</EM>, 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
- <EM>option</EM> is specified). If one or more <EM>option-value</EM> pairs
- are specified, then the method modifies the given <CODE>option(s)</CODE> to have
- the given value(s); in this case the method returns an empty string.
- <EM>Option</EM> may have any of the values accepted by the <STRONG>add</STRONG> or
- <STRONG>addchild</STRONG> method. The exact set of options depends on the
- value of the <STRONG>-itemtype</STRONG> option passed to the the <STRONG>add</STRONG> or
- <STRONG>addchild</STRONG> method when this list entry is created.
- <P></P>
- <DT><STRONG><A NAME="item_header"><EM>$hlist</EM>-><STRONG>header</STRONG>(<EM>option</EM>, <EM>$col</EM> ?,<EM>args</EM>, ...?)</A></STRONG><BR>
- <DD>
- Manipulates the header items of this HList widget. If the
- <STRONG>-header</STRONG> option of this HList widget is set to true, then a
- header item is displayed at the top of each column. The <EM>$col</EM>
- 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:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>cget</STRONG>, <EM>$col</EM>, <EM>option</EM>)</STRONG><BR>
- <DD>
- If the <EM>$col</EM>-th column has a header display item, returns the
- value of the specified <EM>option</EM> of the header item. If the header
- doesn't exist, returns an error.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>configure, </STRONG><EM>$col, </EM>?<EM>option</EM>?, <EM>?value, option, value, ...</EM>?)</STRONG><BR>
- <DD>
- Query or modify the configuration options of the header display item
- of the <EM>$col</EM>-th column. The header item must exist, or an error
- will result. If no <EM>option</EM> is specified, returns a list
- describing all of the available options for the header display item
- (see <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for information on the format of this
- list.) If <EM>option</EM> is specified with no <EM>value</EM>, 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
- <EM>option</EM> is specified). If one or more <EM>option-value</EM> pairs
- are specified, then the method modifies the given <CODE>option(s)</CODE> to have
- the given value(s); in this case the method returns an empty
- string. <EM>Option</EM> may have any of the values accepted by the
- <STRONG>header create</STRONG> method. The exact set of options depends
- on the value of the <STRONG>-itemtype</STRONG> option passed to the the <STRONG>header</STRONG>
- create method when this display item was created.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>create, </STRONG><EM>$col, </EM>?<EM>-itemtype type</EM>? ?<EM>option value ...</EM>?</STRONG><BR>
- <DD>
- Creates a new display item as the header for the <EM>$col</EM>-th
- column. See also <A HREF="#bugs">BUGS</A> below.
- If an header display item already exists for this column, it
- will be replaced by the new item. An optional parameter
- <EM>-itemtype</EM> can be used to specify what type of display item
- should be created. If the <EM>-itemtype</EM> is not given, then by
- default the type specified by this HList widget's <STRONG>-itemtype</STRONG>
- option is used. Additional parameters, in <EM>option-value</EM> pairs,
- can be passed to configure the appearance of the display item. Each
- <EM>option-value</EM> pair must be a valid option for this type of
- display item or one of the following:
- <DL>
- <DT><STRONG><A NAME="item_%2Dborderwidth_%3D%3E_color"><STRONG>-borderwidth</STRONG> => <EM>color</EM></A></STRONG><BR>
- <DD>
- Specifies the border width of this header item.
- <P></P>
- <DT><STRONG><A NAME="item_%2Dheaderbackground_%3D%3E_color"><STRONG>-headerbackground</STRONG> => <EM>color</EM></A></STRONG><BR>
- <DD>
- Specifies the background color of this header item.
- <P></P>
- <DT><STRONG><A NAME="item_%2Drelief_%3D%3E_type"><STRONG>-relief</STRONG> => <EM>type</EM></A></STRONG><BR>
- <DD>
- Specifies the relief type of the border of this header item.
- <P></P></DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>delete, </STRONG><EM>$col</EM>)</STRONG><BR>
- <DD>
- Deletes the header display item for the <EM>$col</EM>-th column.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>exists, </STRONG><EM>$col</EM>)</STRONG><BR>
- <DD>
- Return true if an header display item exists for the <EM>$col</EM>-th
- column; return false otherwise.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>header</STRONG>(<STRONG>size</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- If an header display item exists for the <EM>$col</EM>-th column , returns
- its size in pixels in a two element list <EM>(width, height)</EM>;
- returns an error if the header display item does not exist.
- <P></P></DL>
- <DT><STRONG><A NAME="item_hide"><EM>$hlist</EM>-><STRONG>hide</STRONG>(<EM>option</EM> ?,<EM>$entryPath</EM>?)</A></STRONG><BR>
- <DD>
- Makes some of entries invisible without deleting them.
- <EM>Option</EM> can be one of the following:
- <DL>
- <DT><STRONG><STRONG>entry</STRONG></STRONG><BR>
- <DD>
- Hides the list entry identified by <EM>$entryPath</EM>.
- <P></P></DL>
- <P>Currently only the <STRONG>entry</STRONG> option is supported. Other options will
- be added in the next release.</P>
- <DT><STRONG><A NAME="item_indicator"><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<EM>option</EM>, <EM>$entryPath</EM>, ?<EM>args, ...</EM>?)</A></STRONG><BR>
- <DD>
- 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. <EM>Option</EM> can be one of the following:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>cget</STRONG>, <EM>$entryPath</EM>, <EM>option</EM>)</STRONG><BR>
- <DD>
- If the list entry given by <EM>$entryPath</EM> has an indicator, returns
- the value of the specified <EM>option</EM> of the indicator. If the
- indicator doesn't exist, returns an error.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>configure</STRONG>, <EM>$entryPath</EM>, ?<EM>option</EM>?, <EM>?value, option, value, ...</EM>?)</STRONG><BR>
- <DD>
- Query or modify the configuration options of the indicator display
- item of the entry specified by <EM>$entryPath</EM>. The indicator item
- must exist, or an error will result. If no <EM>option</EM> is specified,
- returns a list describing all of the available options for the
- indicator display item (see <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for information
- on the format of this list). If <EM>option</EM> is specified with no
- <EM>value</EM>, 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 <EM>option</EM> is specified). If one or more
- <EM>option-value</EM> pairs are specified, then the method modifies the
- given <CODE>option(s)</CODE> to have the given value(s); in this case the method
- returns an empty string. <EM>Option</EM> may have any of the values
- accepted by the <STRONG>indicator create</STRONG> method. The exact set
- of options depends on the value of the <STRONG>-itemtype</STRONG> option passed
- to the the <STRONG>indicator create</STRONG> method when this display item
- was created.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>create, </STRONG><EM>$entryPath, </EM>?, <EM>-itemtype type</EM>? ?<EM>option value ...</EM>?)</STRONG><BR>
- <DD>
- Creates a new display item as the indicator for the entry specified by
- <EM>$entryPath</EM>. If an indicator display item already exists for this
- entry, it will be replaced by the new item. An optional parameter
- <EM>-itemtype</EM> can be used to specify what type of display item
- should be created. If the <EM>-itemtype</EM> is not given, then by
- default the type specified by this HList widget's <STRONG>-itemtype</STRONG>
- option is used. Additional parameters, in <EM>option-value</EM> pairs,
- can be passed to configure the appearance of the display item. Each
- <EM>option-value</EM> pair must be a valid option for this type of
- display item.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>delete</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Deletes the indicator display item for the entry given by <EM>$entryPath</EM>.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>exists</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Return true if an indicator display item exists for the entry given by
- <EM>$entryPath</EM>; return false otherwise.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>indicator</STRONG>(<STRONG>size</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- If an indicator display item exists for the entry given by
- <EM>$entryPath</EM>, returns its size in a two element list of the form
- {<EM>width height</EM>}; returns an error if the indicator display item
- does not exist.
- <P></P></DL>
- <DT><STRONG><A NAME="item_info"><EM>$hlist</EM>-><STRONG>info</STRONG>(<EM>option</EM>, <EM>arg, ...</EM>)</A></STRONG><BR>
- <DD>
- Query information about the HList widget. <EM>option</EM> can be one
- of the following:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>anchor</STRONG>)</STRONG><BR>
- <DD>
- Returns the entryPath of the current anchor, if any, of the HList
- widget. If the anchor is not set, returns the empty string.
- <P></P>
- <DT><STRONG><A NAME="item_infoBbox"><EM>$hlist</EM>-><STRONG>infoBbox</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Returns a list of four numbers describing the visible bounding box of
- the entry given <EM>$entryPath</EM>. 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.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>children</STRONG> ?,<EM>$entryPath</EM>?)</STRONG><BR>
- <DD>
- If <EM>$entryPath</EM> is given, returns a list of the entryPath's of its
- children entries. Otherwise returns a list of the toplevel
- entryPath's.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>data</STRONG> ?,<EM>$entryPath</EM>?)</STRONG><BR>
- <DD>
- Returns the data associated with <EM>$entryPath</EM>.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>dragsite</STRONG>)</STRONG><BR>
- <DD>
- Returns the entryPath of the current dragsite, if any, of the HList
- widget. If the dragsite is not set, returns the empty string.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>dropsite</STRONG>)</STRONG><BR>
- <DD>
- Returns the entryPath of the current dropsite, if any, of the HList
- widget. If the dropsite is not set, returns the empty string.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>exists</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Returns a boolean value indicating whether the list entry
- <EM>$entryPath</EM> exists.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>hidden</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Returns a boolean value indicating whether the list entry
- <STRONG>$entryPath</STRONG> is hidden or not.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>next</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>parent</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Returns the name of the parent of the list entry identified by
- <EM>$entryPath</EM>. If <EM>entryPath</EM> is a toplevel list entry,
- returns the empty string.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>prev</STRONG>, <EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- 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.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>info</STRONG>(<STRONG>selection</STRONG>)</STRONG><BR>
- <DD>
- Returns a list of selected entries in the HList widget. If no entries
- are selected, returns an empty string.
- <P></P></DL>
- <DT><STRONG><A NAME="item_item"><EM>$hlist</EM>-><STRONG>item</STRONG>(<EM>option, </EM>?<EM>args, ...</EM>?)</A></STRONG><BR>
- <DD>
- Creates and configures the display items at individual columns the
- entries. The form of additional of arguments depends on the choice of
- <EM>option</EM>:
- <DL>
- <DT><STRONG><A NAME="item_itemCget"><EM>$hlist</EM>-><STRONG>itemCget</STRONG>(<EM>$entryPath</EM>, <EM>$col</EM>, <EM>option</EM>)</A></STRONG><BR>
- <DD>
- Returns the current value of the configure <EM>option</EM> of the display
- item at the column designated by <EM>$col</EM> of the entry specified by
- <EM>$entryPath</EM>.
- <P></P>
- <DT><STRONG><A NAME="item_itemConfigure"><EM>$hlist</EM>-><STRONG>itemConfigure</STRONG>(<EM>$entryPath</EM>, <EM>$col</EM> ?,<EM>option</EM>?, <EM>?value, option, value, ...</EM>?)</A></STRONG><BR>
- <DD>
- Query or modify the configuration options of the display item at the
- column designated by <EM>$col</EM> of the entry specified by
- <EM>$entryPath</EM>. If no <EM>option</EM> is specified, returns a list
- describing all of the available options for <EM>$entryPath</EM> (see
- <A HREF="../../../site/lib/Tk/options.html">the Tk::options manpage</A> for information on the format of this
- list). If <EM>option</EM> is specified with no <EM>value</EM>, 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
- <EM>option</EM> is specified). If one or more <EM>option-value</EM> pairs
- are specified, then the method modifies the given <CODE>option(s)</CODE> to have
- the given value(s); in this case the method returns an empty string.
- <EM>Option</EM> may have any of the values accepted by the <STRONG>item</STRONG>
- create method. The exact set of options depends on the
- value of the <STRONG>-itemtype</STRONG> option passed to the the <STRONG>item</STRONG>
- create method when this display item was created.
- <P></P>
- <DT><STRONG><A NAME="item_itemCreate"><EM>$hlist</EM>-><STRONG>itemCreate</STRONG>(<EM>$entryPath</EM>, <EM>$col</EM> ?,<EM>-itemtype</EM>=><EM>type</EM>? ?,<EM>option value ...</EM>?)</A></STRONG><BR>
- <DD>
- Creates a new display item at the column designated by <EM>$col</EM> of
- the entry specified by <EM>$entryPath</EM>. An optional parameter
- <EM>-itemtype</EM> can be used to specify what type of display items
- should be created. If the <EM>-itemtype</EM> is not specified, then by
- default the type specified by this HList widget's <STRONG>-itemtype</STRONG>
- option is used. Additional parameters, in <EM>option-value</EM> pairs,
- can be passed to configure the appearance of the display item. Each
- <EM>option- value</EM> pair must be a valid option for this type of
- display item.
- <P></P>
- <DT><STRONG><A NAME="item_itemDelete"><EM>$hlist</EM>-><STRONG>itemDelete</STRONG>(<EM>$entryPath</EM>, <EM>$col</EM>)</A></STRONG><BR>
- <DD>
- Deletes the display item at the column designated by <EM>$col</EM> of
- the entry specified by <EM>$entryPath</EM>.
- <P></P>
- <DT><STRONG><A NAME="item_itemExists"><EM>$hlist</EM>-><STRONG>itemExists</STRONG>(<EM>$entryPath</EM>, <EM>$col</EM>)</A></STRONG><BR>
- <DD>
- Returns true if there is a display item at the column designated by
- <EM>$col</EM> of the entry specified by <EM>$entryPath</EM>; returns false
- otherwise.
- <P></P></DL>
- <DT><STRONG><A NAME="item_nearest"><EM>$hlist</EM>-><STRONG>nearest</STRONG>(<EM>y</EM>)</A></STRONG><BR>
- <DD>
- <EM>$hlist</EM>-><STRONG>nearest</STRONG>(<EM>y</EM>)
- Given a y-coordinate within the HList window, this method returns
- the entryPath of the (visible) HList element nearest to that
- y-coordinate.
- <P></P>
- <DT><STRONG><A NAME="item_see"><EM>$hlist</EM>-><STRONG>see</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Adjust the view in the HList so that the entry given by <EM>$entryPath</EM> 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.
- <P></P>
- <DT><STRONG><A NAME="item_selection"><EM>$hlist</EM>-><STRONG>selection</STRONG>(<EM>option</EM>, <EM>arg</EM>, ...)</A></STRONG><BR>
- <DD>
- <DT><STRONG><A NAME="item_selectionOption"><EM>$hlist</EM>-><STRONG>selection</STRONG><EM>Option</EM>(<EM>arg</EM>, ...)</A></STRONG><BR>
- <DD>
- This method is used to adjust the selection within a HList widget. It
- has several forms, depending on <EM>option</EM>:
- <DL>
- <DT><STRONG><A NAME="item_selectionClear"><EM>$hlist</EM>-><STRONG>selectionClear</STRONG>(?<EM>from</EM>?, ?<EM>to</EM>?)</A></STRONG><BR>
- <DD>
- When no extra arguments are given, deselects all of the list <CODE>entrie(s)</CODE>
- in this HList widget. When only <EM>from</EM> is given, only the list
- entry identified by <EM>from</EM> is deselected. When both <EM>from</EM> and
- <EM>to</EM> are given, deselects all of the list <CODE>entrie(s)</CODE> between
- between <EM>from</EM> and <EM>to</EM>, inclusive, without affecting the
- selection state of elements outside that range.
- <P></P>
- <DT><STRONG><A NAME="item_selectionGet"><EM>$hlist</EM>-><STRONG>selectionGet</STRONG></A></STRONG><BR>
- <DD>
- This is an alias for the <STRONG>infoSelection</STRONG> method.
- <P></P>
- <DT><STRONG><A NAME="item_selectionIncludes"><EM>$hlist</EM>-><STRONG>selectionIncludes</STRONG>(<EM>$entryPath</EM>)</A></STRONG><BR>
- <DD>
- Returns 1 if the list entry indicated by <EM>$entryPath</EM> is currently
- selected; returns 0 otherwise.
- <P></P>
- <DT><STRONG><A NAME="item_selectionSet"><EM>$hlist</EM>-><STRONG>selectionSet</STRONG>(<EM>from</EM>?, <EM>to</EM>?)</A></STRONG><BR>
- <DD>
- Selects all of the list <CODE>entrie(s)</CODE> between between <EM>from</EM> and
- <EM>to</EM>, inclusive, without affecting the selection state of entries
- outside that range. When only <EM>from</EM> is given, only the list entry
- identified by <EM>from</EM> is selected.
- <P></P></DL>
- <DT><STRONG><A NAME="item_show"><EM>$hlist</EM>-><STRONG>show</STRONG>(<EM>option</EM> ?,<EM>$entryPath</EM>?)</A></STRONG><BR>
- <DD>
- Show the entries that are hidden by the <STRONG>hide</STRONG> method,
- <EM>option</EM> can be one of the following:
- <DL>
- <DT><STRONG><STRONG>entry</STRONG></STRONG><BR>
- <DD>
- Shows the list entry identified by <EM>$entryPath</EM>.
- <P></P></DL>
- <P>Currently only the <STRONG>entry</STRONG> option is supported. Other options will
- be added in future releases.</P>
- <DT><STRONG><A NAME="item_xview"><EM>$hlist</EM>-><STRONG>xview</STRONG>(<EM>args</EM>)</A></STRONG><BR>
- <DD>
- 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:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>xview</STRONG></STRONG><BR>
- <DD>
- 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 <STRONG>-xscrollcommand</STRONG> option.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>xview</STRONG>(<EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Adjusts the view in the window so that the list entry identified by
- <EM>$entryPath</EM> is aligned to the left edge of the window.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>xview</STRONG>(<STRONG>moveto</STRONG> => <EM>fraction</EM>)</STRONG><BR>
- <DD>
- Adjusts the view in the window so that <EM>fraction</EM> of the total
- width of the HList is off-screen to the left. <EM>fraction</EM> must be
- a fraction between 0 and 1.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>xview</STRONG>(<STRONG>scroll</STRONG> => <EM>number, what</EM>)</STRONG><BR>
- <DD>
- This method shifts the view in the window left or right according to
- <EM>number</EM> and <EM>what</EM>. <EM>Number</EM> must be an integer.
- <EM>What</EM> must be either <STRONG>units</STRONG> or <STRONG>pages</STRONG> or an
- abbreviation of one of these. If <EM>what</EM> is <STRONG>units</STRONG>, the view
- adjusts left or right by <EM>number</EM> character units (the width of
- the <STRONG>0</STRONG> character) on the display; if it is <STRONG>pages</STRONG> then the
- view adjusts by <EM>number</EM> screenfuls. If <EM>number</EM> is negative
- then characters farther to the left become visible; if it is positive
- then characters farther to the right become visible.
- <P></P></DL>
- <DT><STRONG><A NAME="item_yview"><EM>$hlist</EM>-><STRONG>yview</STRONG>(<EM>?args</EM>?)</A></STRONG><BR>
- <DD>
- 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:
- <DL>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>yview</STRONG></STRONG><BR>
- <DD>
- 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 <STRONG>-yscrollcommand</STRONG>
- option.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>yview</STRONG>(<EM>$entryPath</EM>)</STRONG><BR>
- <DD>
- Adjusts the view in the window so that the list entry given by
- <EM>$entryPath</EM> is displayed at the top of the window.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>yview</STRONG>(<STRONG>moveto</STRONG> => <EM>fraction</EM>)</STRONG><BR>
- <DD>
- Adjusts the view in the window so that the list entry given by
- <EM>fraction</EM> appears at the top of the window. <EM>Fraction</EM> 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.
- <P></P>
- <DT><STRONG><EM>$hlist</EM>-><STRONG>yview</STRONG>(<STRONG>scroll</STRONG> => <EM>number, what</EM>)</STRONG><BR>
- <DD>
- This method adjust the view in the window up or down according to
- <EM>number</EM> and <EM>what</EM>. <EM>Number</EM> must be an integer.
- <EM>What</EM> must be either <STRONG>units</STRONG> or <STRONG>pages</STRONG>. If <EM>what</EM>
- is <STRONG>units</STRONG>, the view adjusts up or down by <EM>number</EM> lines; if
- it is <STRONG>pages</STRONG> then the view adjusts by <EM>number</EM> screenfuls.
- If <EM>number</EM> is negative then earlier entries become visible; if
- it is positive then later entries become visible.
- <P></P></DL>
- </DL>
- <P>
- <HR>
- <H1><A NAME="bindings">BINDINGS</A></H1>
- <DL>
- <DT><STRONG><A NAME="item_%5B1%5D">[1]</A></STRONG><BR>
- <DD>
- If the <STRONG>-selectmode</STRONG> is ``browse'', when the user drags the mouse
- pointer over the list entries, the entry under the pointer will be
- highlighted and the <STRONG>-browsecmd</STRONG> callback will be called with
- one parameter, the entryPath of the highlighted entry. Only one entry
- can be highlighted at a time. The <STRONG>-command</STRONG> callback will be
- called when the user double-clicks on a list entry.
- <P></P>
- <DT><STRONG><A NAME="item_%5B2%5D">[2]</A></STRONG><BR>
- <DD>
- If the <STRONG>-selectmode</STRONG> is ``single'', the entries will only be
- highlighted by mouse <ButtonRelease-1> events. When a new list entry
- is highlighted, the <STRONG>-browsecmd</STRONG> callback will be called with
- one parameter indicating the highlighted list entry. The
- <STRONG>-command</STRONG> callback will be called when the user double-clicks
- on a list entry.
- <P></P>
- <DT><STRONG><A NAME="item_%5B3%5D">[3]</A></STRONG><BR>
- <DD>
- If the <STRONG>-selectmode</STRONG> is ``multiple'', 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
- <STRONG>-browsecmd</STRONG> callback will be called with an undefined
- parameter. It is the responsibility of the <STRONG>-browsecmd</STRONG> callback
- to find out the exact highlighted selection in the HList. The
- <STRONG>-command</STRONG> callback will be called when the user double-clicks
- on a list entry.
- <P></P>
- <DT><STRONG><A NAME="item_%5B4%5D">[4]</A></STRONG><BR>
- <DD>
- If the <STRONG>-selectmode</STRONG> is ``extended'', 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
- <Control-ButtonPress-1>. When the highlighted area is changed, the
- <STRONG>-browsecmd</STRONG> callback will be called with an undefined
- parameter. It is the responsibility of the <STRONG>-browsecmd</STRONG> callback
- to find out the exact highlighted selection in the HList. The
- <STRONG>-command</STRONG> callback will be called when the user double-clicks
- on a list entry.
- <P></P>
- <DT><STRONG><A NAME="item_%5B5%5D">[5]</A></STRONG><BR>
- <DD>
- <STRONG>Arrow key bindings:</STRONG> <Up> arrow key moves the anchor point to the
- item right on top of the current anchor item. <Down> arrow key moves
- the anchor point to the item right below the current anchor item.
- <Left> arrow key moves the anchor to the parent item of the current
- anchor item. <Right> 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.
- <P></P></DL>
- <P>
- <HR>
- <H1><A NAME="example">EXAMPLE</A></H1>
- <P>This example demonstrates how to use an HList to store a file
- directory structure and respond to the user's browse events:</P>
- <PRE>
- use strict;
- use Tk;
- use Tk::Label;
- use Tk::HList;</PRE>
- <PRE>
- my $mw = MainWindow->new();
- my $label = $mw->Label(-width=>15);
- my $hlist = $mw->HList(
- -itemtype => 'text',
- -separator => '/',
- -selectmode => 'single',
- -browsecmd => sub {
- my $file = shift;
- $label->configure(-text=>$file);
- }
- );</PRE>
- <PRE>
- foreach ( qw(/ /home /home/ioi /home/foo /usr /usr/lib) ) {
- $hlist->add($_, -text=>$_);
- }</PRE>
- <PRE>
- $hlist->pack;
- $label->pack;</PRE>
- <PRE>
- MainLoop;</PRE>
- <P>
- <HR>
- <H1><A NAME="bugs">BUGS</A></H1>
- <P>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 <STRONG>item</STRONG> method and the <STRONG>add</STRONG>,
- <STRONG>addchild</STRONG>, <STRONG>entrycget</STRONG> and <STRONG>entryconfigure</STRONG>
- methods. Whenever multiple columns exist, the programmer should use
- ONLY the <STRONG>item</STRONG> method to create and configure the display items
- in each column; the <STRONG>add</STRONG>, <STRONG>addchild</STRONG>, <STRONG>entrycget</STRONG> and
- <STRONG>entryconfigure</STRONG> should be used ONLY to create and configure
- entries.</P>
- <P>
- <HR>
- <H1><A NAME="keywords">KEYWORDS</A></H1>
- <P>Hierarchical Listbox</P>
- <P>
- <HR>
- <H1><A NAME="see also">SEE ALSO</A></H1>
- <P><A HREF="../../../site/lib/Tk/DItem.html">Tk::DItem</A></P>
- <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
- <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
- <STRONG><P CLASS=block> Tk::HList - Create and manipulate Tix Hierarchial List widgets</P></STRONG>
- </TD></TR>
- </TABLE>
-
- </BODY>
-
- </HTML>
-