The tixHList command creates a new Tcl command whose name is the same as the path name of the HList
widget's window. This command may be used to invoke various operations on the widget. It has the
following general form:
pathNameoption ?argarg...?
PathName is the name of the command, which is the same as the HList widget's path name. Option and the
args determine the exact behavior of the command. The following commands are possible for HList widgets:
pathNameaddentryPath ?optionvalue...?
Creates a new list entry with the pathname entryPath. A list entry must be created after its
parent is created (unless this entry is a top-level entry, which has no parent). This command
returns the entryPath of the newly created list entry. The following configuration options can be
given to configure the list entry:
-atposition
Insert the new list at the position given by position. position must be a valid integer.
the Position 0 indicates the first position, 1 indicates the second position, and so on.
-afterafterWhich
Insert the new list entry after the entry identified by afterWhich. afterWhich must be a
valid list entry and it mush have the same parent as the new list entry
-beforebeforeWhich
Insert the new list entry before the entry identified by beforeWhich. beforeWhich must be a
valid list entry and it mush have the same parent as the new list entry
-datastring
Specifies a string to associate with this list entry. This string can be queried by the
info widget command. The application programmer can use the -data option to associate the
list entry with the data it represents.
-itemtypetype
Specifies the type of display item to be display for the new list entry. type must be a
valid display item type. Currently the available display item types are imagetext, text,
and window. If this option is not specified, then by default the type specified by this
HList widget's -itemtype option is used.
-state Specifies whether this entry can be selected or invoked by the user. Must be either normal
or disabled.
The add widget command 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 -itemtype option. Please see the tixDisplayStyle manual page for a list of the configuration
options for each of the display item types.
pathNameaddchildparentPath ?optionvalue... ?
Adds a new child entry to the children list of the list entry identified by parentPath. Or, if
parentPath 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
parentPath is foo, then the entryPath of the new entry will be foo.1, foo.2, ... etc. This
command returns the entryPath of the newly created list entry. option can be any option for the
add widget command.
pathNameanchorsetentryPath
Sets the anchor to the list entry identified by entryPath. The anchor is the end of the selection
that is fixed while the user is dragging out a selection with the mouse.
pathNameanchorclear
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.
pathNamecgetoption
Returns the current value of the configuration option given by option. Option may have any of the
values accepted by the tixHList command.
pathNamecolumnwidthcol ?-char? ?width?
Querys or sets the width of a the column col in the HList widget. The value of col 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:
pathNamecolumnwidthcol{}
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.
pathNamecolumnwidthcolwidthwidth must be in a form accepted by Tk_GetPixels(3).
pathNamecolumnwidthcol-charnChars
The width is set to be the average width occupied by nChars number of characters of the
font specified by the -font option of this HList widget.
pathNameconfigure ?option? ?valueoptionvalue...?
Query or modify the configuration options of the widget. If no option is specified, returns a
list describing all of the available options for pathName (see Tk_ConfigureInfo for information on
the format of this list). If option is specified with no value, then the command returns a list
describing the one named option (this list will be identical to the corresponding sublist of the
value returned if no option is specified). If one or more option-value pairs are specified, then
the command modifies the given widget option(s) to have the given value(s); in this case the
command returns an empty string. Option may have any of the values accepted by the tixHList
command.
pathNamedeleteoption ?entryPath?
Delete one or more list entries. option may be one of the following:
all Delete all entries in the HList. In this case the entryPath does not need to be specified.
entry Delete the entry specified by entryPath and all its offsprings, if any.
offsprings
Delete all the offsprings, if any, of the entry specified by entryPath. However, entryPath
itself is not deleted.
siblings
Delete all the list entries that share the same parent with the entry specified by
entryPath. However, entryPath itself is not deleted.
pathNamedragsitesetentryPath
Sets the dragsite to the list entry identified by entryPath. 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.
pathNamedragsiteclear
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.
pathNamedropsitesetentryPath
Sets the dropsite to the list entry identified by entryPath. The dropsite is used to indicate the
target of a grag-and-drop action. Currently drag-and-drop functionality has not been implemented
in Tix yet.
pathNamedropsiteclear
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.
pathNameentrycgetentryPathoption
Returns the current value of the configuration option given by option for the entry indentfied by
entryPath. Option may have any of the values accepted by the add widget command.
pathNameentryconfigureentryPath ?option? ?valueoptionvalue...?
Query or modify the configuration options of the list entry indentfied by entryPath. If no option
is specified, returns a list describing all of the available options for entryPath (see
Tk_ConfigureInfo for information on the format of this list.) If option is specified with no
value, then the command returns a list describing the one named option (this list will be
identical to the corresponding sublist of the value returned if no option is specified). If one or
more option-value pairs are specified, then the command modifies the given option(s) to have the
given value(s); in this case the command returns an empty string. Option may have any of the
values accepted by the add or addchild widget command. The exact set of options depends on the
value of the -itemtype option passed to the the add or addchild widget command when this list
entry is created.
pathNameheaderoptioncol ?args...?
Manipulates the header items of this HList widget. If the -header option of this HList widget is
set to true, then a header item is displayed at the top of each column. The col argument for this
command must be a valid integer. 0 indicates the first column, 1 the second column, ... and so on.
This command supports the following options:
pathNameheadercgetcoloption
If the col-th column has a header display item, returns the value of the specified option
of the header item. If the header doesn't exist, returns an error.
pathNameheaderconfigurecol ?option? ?valueoptionvalue...?
Query or modify the configuration options of the header display item of the col-th column.
The header item must exist, or an error will result. If no option is specified, returns a
list describing all of the available options for the header display item (see
Tk_ConfigureInfo(3) for information on the format of this list.) If option is specified
with no value, then the command returns a list describing the one named option (this list
will be identical to the corresponding sublist of the value returned if no option is
specified). If one or more option-value pairs are specified, then the command modifies the
given option(s) to have the given value(s); in this case the command returns an empty
string. Option may have any of the values accepted by the headercreate widget command. The
exact set of options depends on the value of the -itemtype option passed to the the headercreate widget command when this display item was created.
pathNameheadercreatecol ?-itemtypetype? ?optionvalue...?
Creates a new display item as the header for the col-th column. If an header display item
already exists for this column, it will be replaced by the new item. An optional parameter
-itemtype can be used to specify what type of display item should be created. If the
-itemtype is not given, then by default the type specified by this HList widget's -itemtype
option is used. Additional parameters, in option-value pairs, can be passed to configure
the appearance of the display item. Each option-value pair must be a valid option for this
type of display item or one of the following:
-borderwidth
Specifies the border width of this header item.
-headerbackground
Specifies the background color of this header item.
-relief
Specifies the relief type of the border of this header item.
pathNameheaderdeletecol
Deletes the header display item for the col-th column.
pathNameheaderexistscol
Return true if an header display item exists for the col-th column; return false otherwise.
pathNameheadersizeentryPath
If an header display item exists for the col-th column , returns its size in a two element
list of the form {widthheight}; returns an error if the header display item does not
exist.
pathNamehideoption?entryPath?
Makes some of entries invisible invisible without deleting them. Option can be one of the
following:
entry Hides the list entry identified by entryPath.
Currently only the entry option is supported. Other options will be added in the next release.
pathNameindicatoroption entryPath ?args...?
Manipulates the indicator on the list entries. An indicator is usually a small display item (such
as an image) that is displayed to the left to an entry to indicate the status of the entry. For
example, it may be used to indicator whether a directory is opened or closed. option can be one of
the following:
pathNameindicatorcgetentryPathoption
If the list entry given by entryPath has an indicator, returns the value of the specified
option of the indicator. If the indicator doesn't exist, returns an error.
pathNameindicatorconfigureentryPath ?option? ?valueoptionvalue...?
Query or modify the configuration options of the indicator display item of the entry
specified by entryPath. The indicator item must exist, or an error will result. If no
option is specified, returns a list describing all of the available options for the
indicator display item (see Tk_ConfigureInfo(3) for information on the format of this
list). If option is specified with no value, then the command returns a list describing the
one named option (this list will be identical to the corresponding sublist of the value
returned if no option is specified). If one or more option-value pairs are specified, then
the command modifies the given option(s) to have the given value(s); in this case the
command returns an empty string. Option may have any of the values accepted by the
indicatorcreate widget command. The exact set of options depends on the value of the
-itemtype option passed to the the indicatorcreate widget command when this display item
was created.
pathNameindicatorcreateentryPath ?-itemtypetype? ?optionvalue...?
Creates a new display item as the indicator for the entry specified by entryPath. If an
indicator display item already exists for this entry, it will be replaced by the new item.
An optional parameter -itemtype can be used to specify what type of display item should be
created. If the -itemtype is not given, then by default the type specified by this HList
widget's -itemtype option is used. Additional parameters, in option-value pairs, can be
passed to configure the appearance of the display item. Each option-value pair must be a
valid option for this type of display item.
pathNameindicatordeleteentryPath
Deletes the indicator display item for the entry given by entryPath.
pathNameindicatorexistsentryPath
Return true if an indicator display item exists for the entry given by entryPath; return
false otherwise.
pathNameindicatorsizeentryPath
If an indicator display item exists for the entry given by entryPath, returns its size in a
two element list of the form {widthheight}; returns an error if the indicator display item
does not exist.
pathNameinfooptionarg...
Query information about the HList widget. option can be one of the following:
pathNameinfoanchor
Returns the entryPath of the current anchor, if any, of the HList widget. If the anchor is
not set, returns the empty string.
pathNameinfobboxentryPath
Returns a list of four numbers describing the visible bounding box of the entry given
entryPath. 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.
pathNameinfochildren ?entryPath?
If entrpyPath is given, returns a list of the entryPath's of its children entries.
Otherwise returns a list of the toplevel entryPath's.
pathNameinfodata ?entryPath?
Returns the data associated with entryPath.
pathNameinfodragsite
Returns the entryPath of the current dragsite, if any, of the HList widget. If the dragsite
is not set, returns the empty string.
pathNameinfodropsite
Returns the entryPath of the current dropsite, if any, of the HList widget. If the dropsite
is not set, returns the empty string.
pathNameinfoexistsentryPath
Returns a boolean value indicating whether the list entry entrpyPath exists.
pathNameinfohiddenentryPath
Returns a boolean value indicating whether the list entry entrpyPath is hidden or not.
pathNameinfonextentryPath
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.
pathNameinfoparententryPath
Returns the name of the parent of the list entry identified by entrpyPath. If entrpyPath is
a toplevel list entry, returns the empty string.
pathNameinfopreventryPath
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.
pathNameinfoselection
Returns a list of selected entries in the HList widget. If no entries are selectd, returns
an empty string.
pathNameitemoption ?args...?
Creates and configures the display items at individual columns the entries. The form of additional
of arguments depends on the choice of option:
pathNameitemcgetentryPathcoloption
Returns the current value of the configure option of the display item at the column
designated by col of the entry specified by entryPath.
pathNameitemconfigureentryPathcol ?option? ?valueoptionvalue...?
Query or modify the configuration options of the display item at the column designated by
col of the entry specified by entryPath. If no option is specified, returns a list
describing all of the available options for entryPath (see Tk_ConfigureInfo(3) for
information on the format of this list). If option is specified with no value, then the
command returns a list describing the one named option (this list will be identical to the
corresponding sublist of the value returned if no option is specified). If one or more
option-value pairs are specified, then the command modifies the given option(s) to have the
given value(s); in this case the command returns an empty string. Option may have any of
the values accepted by the itemcreate widget command. The exact set of options depends on
the value of the -itemtype option passed to the the itemcreate widget command when this
display item was created.
pathNameitemcreateentryPathcol ?-itemtypetype? ?optionvalue...?
Creates a new display item at the column designated by col of the entry specified by
entryPath. An optional parameter -itemtype can be used to specify what type of display
items should be created. If the -itemtype is not specified, then by default the type
specified by this HList widget's -itemtype option is used. Additional parameters, in
option-value pairs, can be passed to configure the appearance of the display item. Each
option-value pair must be a valid option for this type of display item.
pathNameitemdeleteentryPathcol
Deletes the display item at the column designated by col of the entry specified by
entryPath.
pathNameitemexistsentryPathcol
Returns true if there is a display item at the column designated by col of the entry
specified by entryPath; returns false otherwise.
pathNamenearesty
Given a y-coordinate within the HList window, this command returns the entryPath of the (visible)
HList element nearest to that y-coordinate.
pathNameseeentryPath
Adjust the view in the HList so that the entry given by entryPath is visible. If the entry is
already visible then the command 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.
pathNameselectionoptionarg...
This command is used to adjust the selection within a HList widget. It has several forms,
depending on option:
pathNameselectionclear ?from? ?to?
When no extra arguments are given, deselects all of the list entrie(s) in this HList
widget. When only from is given, only the list entry identified by from is deselected. When
both from and to are given, deselects all of the list entrie(s) between between from and
to, inclusive, without affecting the selection state of entries outside that range.
pathNameselectionget
This is an alias for the infoselection widget command. ,
pathNameselectionincludesentryPath
Returns 1 if the list entry indicated by entryPath is currently selected; returns 0
otherwise.
pathNameselectionsetfrom ?to?
Selects all of the list entrie(s) between between from and to, inclusive, without affecting
the selection state of entries outside that range. When only from is given, only the list
entry identified by from is selected.
pathNameshowoption?entryPath?
Show the entries that are hidden by the hide command, option can be one of the following:
entry Shows the list entry identified by entryPath.
Currently only the entry option is supported. Other options will be added in future releases.
pathNamexviewargs
This command 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:
pathNamexview
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 -xscrollcommand option.
pathNamexviewentryPath
Adjusts the view in the window so that the list entry identified by entryPath is aligned to
the left edge of the window.
pathNamexviewmovetofraction
Adjusts the view in the window so that fraction of the total width of the HList is off-
screen to the left. fraction must be a fraction between 0 and 1.
pathNamexviewscrollnumberwhat
This command shifts the view in the window left or right according to number and what.
Number must be an integer. What must be either units or pages or an abbreviation of one of
these. If what is units, the view adjusts left or right by number character units (the
width of the 0 character) on the display; if it is pages then the view adjusts by number
screenfuls. If number is negative then characters farther to the left become visible; if it
is positive then characters farther to the right become visible.
pathNameyview?args?
This command 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:
pathNameyview
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
-yscrollcommand option.
pathNameyviewentryPath
Adjusts the view in the window so that the list entry given by entryPath is displayed at
the top of the window.
pathNameyviewmovetofraction
Adjusts the view in the window so that the list entry given by fraction appears at the top
of the window. Fraction 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.
pathNameyviewscrollnumberwhat
This command adjust the view in the window up or down according to number and what. Number
must be an integer. What must be either units or pages. If what is units, the view
adjusts up or down by number lines; if it is pages then the view adjusts by number
screenfuls. If number is negative then earlier entries become visible; if it is positive
then later entries become visible.