tixTree(n)
NAME π¦
Okay bestie, this is tixTree(n) from the Tix Built-In Commands manual β the page for creating and manipulating tixTree widgets. Main character energy only.
SYNOPSIS π
tixTree pathName ?options?
SUPER-CLASS π
The TixTree class is derived from the TixScrolledHList class and inherits all the commands, options and subwidgets of its super-class. No cap.
STANDARD OPTIONS β¨
TixTree supports all the standard options of a frame widget. See the options(n) manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS π
-browsecmdbrowseCmd β specifies a command to call whenever the user browses on an entry (usually by single-clicking on the entry). The command is called with one argument: the pathname of the entry.-closecmdcloseCmd β specifies a command to call whenever an entry needs to be closed (see the BINDINGS section below). This command is called with one argument, the pathname of the entry. This command should perform appropriate actions to close the specified entry. If the-closecmdoption is not specified, the default closing action is to hide all child entries of the specified entry.-commandcommand β specifies a command to call whenever the user activates an entry (usually by double-clicking on the entry). The command is called with one argument: the pathname of the entry.-ignoreinvokeignoreInvoke β a Boolean value that specifies when a branch should be opened or closed. A branch will always be opened or closed when the user presses the(+)and(-)indicators. However, when the user invokes a branch (by double-clicking or pressing<Return>), the branch will be opened or closed only if-ignoreinvokeis set to false (the default setting).-opencmdopenCmd β specifies a command to call whenever an entry needs to be opened (see the BINDINGS section below). This command is called with one argument, the pathname of the entry. This command should perform appropriate actions to open the specified entry. If the-opencmdoption is not specified, the default opening action is to show all the child entries of the specified entry.
SUBWIDGETS π§©
- Name:
hlistΒ· Class:TixHListβ the hierarchical listbox that displays the tree. - Name:
hsbΒ· Class:Scrollbarβ the horizontal scrollbar subwidget. - Name:
vsbΒ· Class:Scrollbarβ the vertical scrollbar subwidget.
DESCRIPTION πΈ
The tixTree command creates a new window (given by the pathName argument) and makes it into a Tree widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Tree widget such as its cursor and relief.
The Tree widget can be used to display hierarchical data in a tree form. The user can adjust the view of the tree by opening or closing parts of the tree.
To display a static tree structure, you can add the entries into the hlist subwidget and hide any entries as desired. Then you can call the autosetmode method. This will set up the Tree widget so that it handles all the open and close events automatically.
The above method is not applicable if you want to maintain a dynamic tree structure, i.e, you do not know all the entries in the tree and you need to add or delete entries subsequently. To do this, you should first create the entries in the hlist subwidget. Then, use the setmode method to indicate the entries that can be opened or closed, and use the -opencmd and -closecmd options to handle the opening and closing events.
WIDGET COMMANDS π₯
The tixTree command creates a new Tcl command whose name is the same as the path name of the Tree's window. This command may be used to invoke various operations on the widget. It has the following general form:
pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the Tree widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for Tree widgets:
pathName autosetmodeβ calls thesetmodemethod for all the entries in this Tree widget: if an entry has no child entries, its mode is set tonone. Otherwise, if the entry has any hidden child entries, its mode is set toopen; otherwise its mode is set toclose.pathName cget optionβ returns the current value of the configuration option given byoption.optionmay have any of the values accepted by thetixTreecommand.pathName close entryPathβ closes the entry given byentryPathif its mode isclose.pathName configure ?option? ?value option value ...?β queries or modifies the configuration options of the widget. If nooptionis specified, returns a list describing all of the available options forpathName(seeTk_ConfigureInfofor information on the format of this list). Ifoptionis specified with novalue, 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 nooptionis specified). If one or moreoption-valuepairs 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.optionmay have any of the values accepted by thetixTreecommand.pathName getmode entryPathβ returns the current mode of the entry given byentryPath.pathName open entryPathβ opens the entry given byentryPathif its mode isopen.pathName setmode entryPath modeβ this command is used to indicate whether the entry given byentryPathhas children entries and whether the children are visible.modemust be one ofopen,closeornone. Ifmodeis set toopen, a(+)indicator is drawn next to the entry. Ifmodeis set toclose, a(-)indicator is drawn next to the entry. Ifmodeis set tonone, no indicators will be drawn for this entry. The default mode isnone. Theopenmode indicates the entry has hidden children and this entry can be opened by the user. Theclosemode indicates that all the children of the entry are now visible and the entry can be closed by the user.pathName subwidget name ?args?β when no options are given, this command returns the pathname of the subwidget of the specifiedname. When options are given, the widget command of the specified subwidget will be called with these options.
BINDINGS π«Ά
The basic mouse and keyboard bindings of the Tree widget are the same as the bindings of the HList widget.
In addition, the entries can be opened or closed under the following conditions:
- If the mode of the entry is
open, it can be opened by clicking on its(+)indicator or double-clicking on the entry. - If the mode of the entry is
close, it can be closed by clicking on its(-)indicator or double-clicking on the entry.
KEYWORDS β
Cute sign-off: source/version is Tix 4.0, manual entry is tixTree(n), and the footer's date slot is blank β so no date to report, bestie. π
π¦ where this page comes from
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- Copyright (c) 1993-1999 Ioi Kim Lam
- Copyright (c) 2000-2001 Tix Project Group
- (c) 1990 The Regents of the University of California
- (c) 1994-1995 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms