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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tix/] [man/] [Tree.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1996, Expert Interface Technologies
3
'\"
4
'\" See the file "license.terms" for information on usage and redistribution
5
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6
'\"
7
'\" The file man.macros and some of the macros used by this file are
8
'\" copyrighted: (c) 1990 The Regents of the University of California.
9
'\"              (c) 1994-1995 Sun Microsystems, Inc.
10
'\" The license terms of the Tcl/Tk distrobution are in the file
11
'\" license.tcl.
12
.so man.macros
13
'----------------------------------------------------------------------
14
.HS tixTree tix 4.0
15
.BS
16
'
17
'
18
'----------------------------------------------------------------------
19
.SH NAME
20
tixTree \- Create and manipulate tixTree widgets
21
'
22
'
23
'
24
'----------------------------------------------------------------------
25
.SH SYNOPSIS
26
\fBtixTree\fI \fIpathName ?\fIoptions\fR?
27
'
28
'
29
'----------------------------------------------------------------------
30
.PP
31
.SH SUPER-CLASS
32
The \fBTixTree\fR class is derived from the \fBTixScrolledHList\fR
33
class and inherits all the commands, options and subwidgets of its
34
super-class.
35
'
36
'----------------------------------------------------------------------
37
.SH "STANDARD OPTIONS"
38
'
39
\fBTixTree\fR supports all the standard options of a frame widget.
40
See the \fBoptions(n)\fR manual entry for details on the standard options.
41
'
42
'
43
'----------------------------------------------------------------------
44
.SH "WIDGET-SPECIFIC OPTIONS"
45
'
46
'----------BEGIN
47
.LP
48
.nf
49
Name:           \fBbrowseCmd\fR
50
Class:          \fBBrowseCmd\fR
51
Switch:         \fB\-browsecmd\fR
52
.fi
53
.IP
54
Specifies a command to call whenever the user browses on an entry
55
(usually by single-clicking on the entry). The command is called with
56
one argument, the pathname of the entry.
57
'----------END
58
'
59
'
60
'----------BEGIN
61
.LP
62
.nf
63
Name:           \fBcloseCmd\fR
64
Class:          \fBCloseCmd\fR
65
Switch:         \fB\-closecmd\fR
66
.fi
67
.IP
68
Specifies a command to call whenever an entry needs to be closed (See
69
the BINDINGS section below). This command is called with one argument,
70
the pathname of the entry. This command should perform appropriate
71
actions to close the specified entry. If the \fB\-closecmd\fR option
72
is not specified, the default closing action is to hide all child
73
entries of the specified entry.
74
'----------END
75
'
76
'----------BEGIN
77
.LP
78
.nf
79
Name:           \fBcommand\fR
80
Class:          \fBCommand\fR
81
Switch:         \fB\-command\fR
82
.fi
83
.IP
84
Specifies a command to call whenever the user activates an entry
85
(usually by double-clicking on the entry). The command
86
is called with one argument, the pathname of the entry.
87
'----------END
88
'
89
'----------BEGIN
90
.LP
91
.nf
92
Name:           \fBignoreInvoke\fR
93
Class:          \fBIgnoreInvoke\fR
94
Switch:         \fB\-ignoreinvoke\fR
95
.fi
96
.IP
97
A Boolean value that specifies when a branch should be opened or
98
closed. A branch will always be opened or closed when the user presses
99
the (+) and (-) indicators. However, when the user invokes a branch
100
(by doublc-clicking or pressing ), the branch will be opened
101
or closed only if \fB\-ignoreinvoke\fR is set to false (the default
102
setting).
103
'----------END
104
'
105
 
106
'----------BEGIN
107
.LP
108
.nf
109
Name:           \fBopenCmd\fR
110
Class:          \fBOpenCmd\fR
111
Switch:         \fB\-opencmd\fR
112
.fi
113
.IP
114
Specifies a command to call whenever an entry needs to be opened (See
115
the BINDINGS section below). This command is called with one argument,
116
the pathname of the entry. This command should perform appropriate
117
actions to open the specified entry. If the \fB\-opencmd\fR option
118
is not specified, the default opening action is to show all the child
119
entries of the specified entry.
120
'----------END
121
'
122
'
123
'----------------------------------------------------------------------
124
.SH SUBWIDGETS
125
'----------BEGIN
126
.LP
127
.nf
128
Name:           \fBhlist\fR
129
Class:          \fBTixHList\fR
130
.fi
131
.IP
132
The hierarchical listbox that displays the tree.
133
'----------END
134
'
135
'----------BEGIN
136
.LP
137
.nf
138
Name:           \fBhsb\fR
139
Class:          \fBScrollbar\fR
140
.fi
141
.IP
142
The horizontal scrollbar subwidget.
143
'----------END
144
'
145
'----------BEGIN
146
.LP
147
.nf
148
Name:           \fBvsb\fR
149
Class:          \fBScrollbar\fR
150
.fi
151
.IP
152
The vertical scrollbar subwidget.
153
'----------END
154
'
155
.BE
156
'
157
'
158
'----------------------------------------------------------------------
159
.SH DESCRIPTION
160
'
161
.PP
162
'
163
The \fBtixTree\fR command creates a new window (given by the
164
\fIpathName\fR argument) and makes it into a Tree widget.  Additional
165
options, described above, may be specified on the command line or in
166
the option database to configure aspects of the Tree widget such as its
167
cursor and relief.
168
 
169
The Tree widget can be used to display hierachical data in a tree
170
form. The user can adjust the view of the tree by opening or closing
171
parts of the tree.
172
 
173
To display a static tree structure, you can add the entries into the
174
\fBhlist\fR subwidget and hide any entries as desired. Then you can
175
call the \fBautosetmode\fR method. This will set up the Tree widget so
176
that it handles all the \fIopen\fR and \fIclose\fR events
177
automatically. (Please see the demonstration program
178
demos/samples/Tree.tcl).
179
 
180
The above method is not applicable if you want to maintain a dynamic
181
tree structure, i.e, you do not know all the entries in the tree and
182
you need to add or delete entries subsequently. To do this, you should
183
first create the entries in the \fBhlist\fR subwidget. Then, use the
184
setmode method to indicate the entries that can be opened or closed,
185
and use the \fB\-opencmd\fR and \fB \-closecmd\fR options to handle
186
the opening and closing events. (Please see the demonstration program
187
demos/samples/DynTree.tcl demo).
188
'
189
'
190
'----------------------------------------------------------------------
191
.SH WIDGET COMMANDS
192
.PP
193
'
194
The \fBtixTree\fR command creates a new Tcl command whose name is the
195
same as the path name of the Tree's window.  This command may be used
196
to invoke various operations on the widget. It has the following
197
general form:
198
'
199
.DS C
200
'
201
\fIpathName option \fR?\fIarg arg ...\fR?
202
.PP
203
.DE
204
'
205
\fIPathName\fR is the name of the command, which is the same as the
206
Tree widget's path name. \fIOption\fR and the \fIarg\fRs
207
determine the exact behavior of the command. The following commands
208
are possible for Tree widgets:
209
'
210
.TP
211
\fIpathName \fBautosetmode\fR
212
'
213
This command calls the \fBsetmode\fR method for all the entries in
214
this Tree widget: if an entry has no child entries, its mode is set to
215
\fBnone\fR. Otherwise, if the entry has any hidden child entries, its
216
mode is set to \fBopen\fR; otherwise its mode is set to \fBclose\fR.
217
'
218
.TP
219
\fIpathName \fBcget\fR \fIoption\fR
220
'
221
Returns the current value of the configuration option given by
222
\fIoption\fR. \fIOption\fR may have any of the values accepted by the
223
\fBtixTree\fR command.
224
'
225
'
226
.TP
227
\fIpathName \fBclose \fIentryPath\fR
228
'
229
Close the entry given by \fIentryPath\fR if its \fImode\fR is \fBclose\fR.
230
'
231
'
232
.TP
233
'
234
\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
235
'
236
Query or modify the configuration options of the widget.  If no
237
\fIoption\fR is specified, returns a list describing all of the
238
available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
239
information on the format of this list). If \fIoption\fR is specified
240
with no \fIvalue\fR, then the command returns a list describing the
241
one named option (this list will be identical to the corresponding
242
sublist of the value returned if no \fIoption\fR is specified).  If
243
one or more \fIoption\-value\fR pairs are specified, then the command
244
modifies the given widget option(s) to have the given value(s); in
245
this case the command returns an empty string.  \fIOption\fR may have
246
any of the values accepted by the \fBtixTree\fR command.
247
'
248
'
249
.TP
250
\fIpathName \fBgetmode \fIentryPath\fR
251
'
252
Returns the current \fImode\fR of the entry given by \fIentryPath\fR.
253
'
254
.TP
255
\fIpathName \fBopen \fIentryPath\fR
256
'
257
Open the entry givaen by \fIentryPath\fR if its \fImode\fR is \fBopen\fR.
258
'
259
.TP
260
\fIpathName \fBsetmode \fI entryPath mode\fR
261
'
262
This command is used to indicate whether the entry given by
263
\fIentryPath\fR has children entries and whether the children are
264
visible. \fImode\fR must be one of \fBopen\fR,
265
\fBclose\fR or \fBnone\fR. If \fImode\fR is set to \fBopen\fR, a (+)
266
indicator is drawn next the the entry. If \fImode\fR is set to
267
\fBclose\fR, a (-) indicator is drawn next the the entry. If
268
\fImode\fR is set to \fBnone\fR, no indicators will be drawn for this
269
entry. The default \fImode\fR is none. The \fBopen\fR mode indicates
270
the entry has hidden children and this entry can be opened by the
271
user. The \fBclose\fR mode indicates that all the children of the entry
272
are now visible and the entry can be closed by the user.
273
'
274
.TP
275
\fIpathName \fBsubwidget \fI name ?args?\fR
276
'
277
When no options are given, this command returns the pathname of the
278
subwidget of the specified name.
279
 
280
When options are given, the widget command of the specified subwidget
281
will be called with these options.
282
'
283
'
284
'
285
'----------------------------------------------------------------------
286
.SH BINDINGS
287
.PP
288
'
289
The basic mouse and keyboard bindings of the Tree widget are the same
290
as the bindings of the HList widget.
291
 
292
In addition, the entries can be opened or closed under the following
293
conditions:
294
'
295
.IP [1]
296
If the \fImode\fR of the entry is \fBopen\fR, it can be opened by clicking
297
on its (+) indicator or double-clicking on the entry.
298
'
299
.IP [2]
300
If the \fImode\fR of the entry is \fBclose\fR, it can be closed by clicking
301
on its (-) indicator or double-clicking on the entry.
302
'
303
'
304
'----------------------------------------------------------------------
305
.SH KEYWORDS
306
Tix(n),tixHList(n)

powered by: WebSVN 2.1.0

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