URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [insight/] [tix/] [man/] [Tree.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 tixTree tix 4.0.BS'''----------------------------------------------------------------------.SH NAMEtixTree \- Create and manipulate tixTree widgets''''----------------------------------------------------------------------.SH SYNOPSIS\fBtixTree\fI \fIpathName ?\fIoptions\fR?'''----------------------------------------------------------------------.PP.SH SUPER-CLASSThe \fBTixTree\fR class is derived from the \fBTixScrolledHList\fRclass and inherits all the commands, options and subwidgets of itssuper-class.''----------------------------------------------------------------------.SH "STANDARD OPTIONS"'\fBTixTree\fR supports all the standard options of a frame widget.See 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 command to call whenever the user browses on an entry(usually by single-clicking on the entry). The command is called withone argument, the pathname of the entry.'----------END'''----------BEGIN.LP.nfName: \fBcloseCmd\fRClass: \fBCloseCmd\fRSwitch: \fB\-closecmd\fR.fi.IPSpecifies a command to call whenever an entry needs to be closed (Seethe BINDINGS section below). This command is called with one argument,the pathname of the entry. This command should perform appropriateactions to close the specified entry. If the \fB\-closecmd\fR optionis not specified, the default closing action is to hide all childentries of the specified entry.'----------END''----------BEGIN.LP.nfName: \fBcommand\fRClass: \fBCommand\fRSwitch: \fB\-command\fR.fi.IPSpecifies a command to call whenever the user activates an entry(usually by double-clicking on the entry). The commandis called with one argument, the pathname of the entry.'----------END''----------BEGIN.LP.nfName: \fBignoreInvoke\fRClass: \fBIgnoreInvoke\fRSwitch: \fB\-ignoreinvoke\fR.fi.IPA Boolean value that specifies when a branch should be opened orclosed. A branch will always be opened or closed when the user pressesthe (+) and (-) indicators. However, when the user invokes a branch(by doublc-clicking or pressing <Return>), the branch will be openedor closed only if \fB\-ignoreinvoke\fR is set to false (the defaultsetting).'----------END''----------BEGIN.LP.nfName: \fBopenCmd\fRClass: \fBOpenCmd\fRSwitch: \fB\-opencmd\fR.fi.IPSpecifies a command to call whenever an entry needs to be opened (Seethe BINDINGS section below). This command is called with one argument,the pathname of the entry. This command should perform appropriateactions to open the specified entry. If the \fB\-opencmd\fR optionis not specified, the default opening action is to show all the childentries of the specified entry.'----------END'''----------------------------------------------------------------------.SH SUBWIDGETS'----------BEGIN.LP.nfName: \fBhlist\fRClass: \fBTixHList\fR.fi.IPThe hierarchical listbox that displays the tree.'----------END''----------BEGIN.LP.nfName: \fBhsb\fRClass: \fBScrollbar\fR.fi.IPThe horizontal scrollbar subwidget.'----------END''----------BEGIN.LP.nfName: \fBvsb\fRClass: \fBScrollbar\fR.fi.IPThe vertical scrollbar subwidget.'----------END'.BE'''----------------------------------------------------------------------.SH DESCRIPTION'.PP'The \fBtixTree\fR command creates a new window (given by the\fIpathName\fR argument) and makes it into a Tree widget. Additionaloptions, described above, may be specified on the command line or inthe option database to configure aspects of the Tree widget such as itscursor and relief.The Tree widget can be used to display hierachical data in a treeform. The user can adjust the view of the tree by opening or closingparts of the tree.To display a static tree structure, you can add the entries into the\fBhlist\fR subwidget and hide any entries as desired. Then you cancall the \fBautosetmode\fR method. This will set up the Tree widget sothat it handles all the \fIopen\fR and \fIclose\fR eventsautomatically. (Please see the demonstration programdemos/samples/Tree.tcl).The above method is not applicable if you want to maintain a dynamictree structure, i.e, you do not know all the entries in the tree andyou need to add or delete entries subsequently. To do this, you shouldfirst create the entries in the \fBhlist\fR subwidget. Then, use thesetmode method to indicate the entries that can be opened or closed,and use the \fB\-opencmd\fR and \fB \-closecmd\fR options to handlethe opening and closing events. (Please see the demonstration programdemos/samples/DynTree.tcl demo).'''----------------------------------------------------------------------.SH WIDGET COMMANDS.PP'The \fBtixTree\fR command creates a new Tcl command whose name is thesame as the path name of the Tree's window. This command may be usedto invoke various operations on the widget. It has the followinggeneral form:'.DS C'\fIpathName option \fR?\fIarg arg ...\fR?.PP.DE'\fIPathName\fR is the name of the command, which is the same as theTree widget's path name. \fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command. The following commandsare possible for Tree widgets:'.TP\fIpathName \fBautosetmode\fR'This command calls the \fBsetmode\fR method for all the entries inthis Tree widget: if an entry has no child entries, its mode is set to\fBnone\fR. Otherwise, if the entry has any hidden child entries, itsmode is set to \fBopen\fR; otherwise its mode is set to \fBclose\fR.'.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\fBtixTree\fR command.''.TP\fIpathName \fBclose \fIentryPath\fR'Close the entry given by \fIentryPath\fR if its \fImode\fR is \fBclose\fR.''.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 \fBtixTree\fR command.''.TP\fIpathName \fBgetmode \fIentryPath\fR'Returns the current \fImode\fR of the entry given by \fIentryPath\fR.'.TP\fIpathName \fBopen \fIentryPath\fR'Open the entry givaen by \fIentryPath\fR if its \fImode\fR is \fBopen\fR.'.TP\fIpathName \fBsetmode \fI entryPath mode\fR'This command is used to indicate whether the entry given by\fIentryPath\fR has children entries and whether the children arevisible. \fImode\fR must be one of \fBopen\fR,\fBclose\fR or \fBnone\fR. If \fImode\fR is set to \fBopen\fR, a (+)indicator is drawn next the the entry. If \fImode\fR is set to\fBclose\fR, a (-) indicator is drawn next the the entry. If\fImode\fR is set to \fBnone\fR, no indicators will be drawn for thisentry. The default \fImode\fR is none. The \fBopen\fR mode indicatesthe entry has hidden children and this entry can be opened by theuser. The \fBclose\fR mode indicates that all the children of the entryare now visible and the entry can be closed by the user.'.TP\fIpathName \fBsubwidget \fI name ?args?\fR'When no options are given, this command returns the pathname of thesubwidget of the specified name.When options are given, the widget command of the specified subwidgetwill be called with these options.''''----------------------------------------------------------------------.SH BINDINGS.PP'The basic mouse and keyboard bindings of the Tree widget are the sameas the bindings of the HList widget.In addition, the entries can be opened or closed under the followingconditions:'.IP [1]If the \fImode\fR of the entry is \fBopen\fR, it can be opened by clickingon its (+) indicator or double-clicking on the entry.'.IP [2]If the \fImode\fR of the entry is \fBclose\fR, it can be closed by clickingon its (-) indicator or double-clicking on the entry.'''----------------------------------------------------------------------.SH KEYWORDSTix(n),tixHList(n)
