OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [Tree.n] - Rev 1781

Go to most recent revision | 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 NAME
tixTree \- Create and manipulate tixTree widgets
'
'
'
'----------------------------------------------------------------------
.SH SYNOPSIS
\fBtixTree\fI \fIpathName ?\fIoptions\fR?
'
'
'----------------------------------------------------------------------
.PP
.SH SUPER-CLASS
The \fBTixTree\fR class is derived from the \fBTixScrolledHList\fR
class and inherits all the commands, options and subwidgets of its
super-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
.nf
Name:           \fBbrowseCmd\fR
Class:          \fBBrowseCmd\fR
Switch:         \fB\-browsecmd\fR
.fi
.IP
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.
'----------END
'
'
'----------BEGIN
.LP
.nf
Name:           \fBcloseCmd\fR
Class:          \fBCloseCmd\fR
Switch:         \fB\-closecmd\fR
.fi
.IP
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 \fB\-closecmd\fR option
is not specified, the default closing action is to hide all child
entries of the specified entry.
'----------END
'
'----------BEGIN
.LP
.nf
Name:           \fBcommand\fR
Class:          \fBCommand\fR
Switch:         \fB\-command\fR
.fi
.IP
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.
'----------END
'
'----------BEGIN
.LP
.nf
Name:           \fBignoreInvoke\fR
Class:          \fBIgnoreInvoke\fR
Switch:         \fB\-ignoreinvoke\fR
.fi
.IP
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 doublc-clicking or pressing <Return>), the branch will be opened
or closed only if \fB\-ignoreinvoke\fR is set to false (the default
setting).
'----------END
'

'----------BEGIN
.LP
.nf
Name:           \fBopenCmd\fR
Class:          \fBOpenCmd\fR
Switch:         \fB\-opencmd\fR
.fi
.IP
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 \fB\-opencmd\fR option
is not specified, the default opening action is to show all the child
entries of the specified entry.
'----------END
'
'
'----------------------------------------------------------------------
.SH SUBWIDGETS
'----------BEGIN
.LP
.nf
Name:           \fBhlist\fR
Class:          \fBTixHList\fR
.fi
.IP
The hierarchical listbox that displays the tree.
'----------END
'
'----------BEGIN
.LP
.nf
Name:           \fBhsb\fR
Class:          \fBScrollbar\fR
.fi
.IP
The horizontal scrollbar subwidget.
'----------END
'
'----------BEGIN
.LP
.nf
Name:           \fBvsb\fR
Class:          \fBScrollbar\fR
.fi
.IP
The 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.  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 hierachical 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
\fBhlist\fR subwidget and hide any entries as desired. Then you can
call the \fBautosetmode\fR method. This will set up the Tree widget so
that it handles all the \fIopen\fR and \fIclose\fR events
automatically. (Please see the demonstration program
demos/samples/Tree.tcl).

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 \fBhlist\fR subwidget. Then, use the
setmode method to indicate the entries that can be opened or closed,
and use the \fB\-opencmd\fR and \fB \-closecmd\fR options to handle
the opening and closing events. (Please see the demonstration program
demos/samples/DynTree.tcl demo).
'
'
'----------------------------------------------------------------------
.SH WIDGET COMMANDS
.PP
'
The \fBtixTree\fR 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:
'
.DS C
'
\fIpathName option \fR?\fIarg arg ...\fR?
.PP
.DE
'
\fIPathName\fR is the name of the command, which is the same as the
Tree widget's path name. \fIOption\fR and the \fIarg\fRs
determine the exact behavior of the command. The following commands
are possible for Tree widgets:
'
.TP
\fIpathName \fBautosetmode\fR
'
This command calls the \fBsetmode\fR method for all the entries in
this 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, its
mode 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 the
available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
information on the format of this list). If \fIoption\fR is specified
with no \fIvalue\fR, 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 \fIoption\fR is specified).  If
one or more \fIoption\-value\fR 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.  \fIOption\fR may have
any 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 are
visible. \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 this
entry. The default \fImode\fR is none. The \fBopen\fR mode indicates
the entry has hidden children and this entry can be opened by the
user. The \fBclose\fR mode indicates that all the children of the entry
are 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 the
subwidget of the specified name.

When options are given, the widget command of the specified subwidget
will be called with these options.
'
'
'
'----------------------------------------------------------------------
.SH BINDINGS
.PP
'
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:
'
.IP [1]
If the \fImode\fR of the entry is \fBopen\fR, it can be opened by clicking
on 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 clicking
on its (-) indicator or double-clicking on the entry.
'
'
'----------------------------------------------------------------------
.SH KEYWORDS
Tix(n),tixHList(n)

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.