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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [DirList.html] - Blame information for rev 1781

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

Line No. Rev Author Line
1 578 markom
 
2
 
3
 
4
<TITLE>tixDirList - Create and manipulate tixDirList widgets</TITLE>
5
<Center><H2>tixDirList - Create and manipulate tixDirList widgets</H2></Center><hr>
6
 
7
</pre><H3>SYNOPSIS</H3>
8
<B>tixDirList<I> <I>pathName ?<I>options</I></B>?
9
<P>
10
</pre><H3>SUPER-CLASS</H3>
11
The <B>TixDirList</B></I> class is derived from the <B>TixScrolledHList</B></I>
12
class and inherits all the commands, options and subwidgets of its
13
super-class.
14
</pre><H3>STANDARD OPTIONS</H3>
15
<B>TixDirList</B></I> supports all the standard options of a frame widget.
16
See the <B>options(n)</B></I> manual entry for details on the standard options.
17
</pre><H3>WIDGET-SPECIFIC OPTIONS</H3>
18
<P>
19
<pre><code><code><code>
20
Name:           <B>browseCmd</B></I>
21
Class:          <B>BrowseCmd</B></I>
22
Switch:         <B>-browsecmd</B></I>
23
</code></code></code></pre>
24
<UL>
25
Specifies a command to call whenever the user browses on a directory
26
(usually by single-clicking on the name of the directory). The command
27
is called with one argument, the complete pathname of the directory.
28
</UL>
29
<P>
30
<pre><code><code><code>
31
Name:           <B>command</B></I>
32
Class:          <B>Command</B></I>
33
Switch:         <B>-command</B></I>
34
</code></code></code></pre>
35
<UL>
36
Specifies the command to be called when the user activates on a directory
37
(usually by double-clicking on the name of the directory). The command
38
is called with one argument, the complete pathname of the directory.
39
</UL>
40
<P>
41
<pre><code><code><code>
42
Name:           <B>dircmd</B></I>
43
Class:          <B>DirCmd</B></I>
44
Switch:         <B>-dircmd</B></I>
45
</code></code></code></pre>
46
<UL>
47
Specifies the TCL command to be called when a directory listing is
48
needed for a particular directory. If this option is not specified, by
49
default the DirList widget will attempt to read the directory as a
50
Unix directory. On special occasions, the application programmer may
51
want to supply a special method for reading directories: for example,
52
when he needs to list remote directories. In this case, the
53
<B>-dircmd</B></I> option can be used. The specified command accepts two
54
arguments: the first is the name of the directory to be listed; the
55
second is a Boolean value indicating whether hidden sub-directories
56
should be listed. This command returns a list of names of the
57
sub-directories of this directory. For example:
58
\fC
59
</UL>
60
<pre><code><code><code>
61
 
62
 proc read_dir {dir show_hidden} {
63
     if {$dir == "C:\\"} {
64
         return {DOS NORTON WINDOWS}
65
     } else {
66
         return {}
67
     }
68
 }
69
</code></code></code></pre>
70
</B></I>
71
<P>
72
<pre><code><code><code>
73
Name:           <B>disableCallback</B></I>
74
Class:          <B>DisableCallback</B></I>
75
Switch:         <B>-disablecallback</B></I>
76
</code></code></code></pre>
77
<UL>
78
A boolean value indicating whether callbacks should be disabled. When
79
set to true, the TCL command specified by the <B>-command</B></I> option
80
is not executed when the <B>-value</B></I> of the DirList widget
81
changes.
82
</UL>
83
<P>
84
<pre><code><code><code>
85
Name:           <B>showHidden</B></I>
86
Class:          <B>ShowHidden</B></I>
87
Switch:         <B>-showhidden</B></I>
88
</code></code></code></pre>
89
<UL>
90
Specifies whether hidden directories should be shown. By default, a
91
directory name starting with a period "." is considered as a hidden
92
directory. This rule can be overridden by supplying an alternative
93
<B>-dircmd</B></I> option.
94
</UL>
95
<P>
96
<pre><code><code><code>
97
Name:           <B>root</B></I>
98
Class:          <B>Root</B></I>
99
Switch:         <B>-root</B></I>
100
</code></code></code></pre>
101
<UL>
102
Specifies the name of the root directory. Usually this is <B>"/"</B></I>
103
under Unix machines, but can be changed to <B>"C:\\"</B></I> in DOS environments.
104
</UL>
105
<P>
106
<pre><code><code><code>
107
Name:           <B>rootName</B></I>
108
Class:          <B>RootNAme</B></I>
109
Switch:         <B>-rootname</B></I>
110
</code></code></code></pre>
111
<UL>
112
Specifies a text string to display at the root directory. If
113
unspecified, the text string will be the same as the string specified
114
by <B>-root</B></I>.
115
</UL>
116
<P>
117
<pre><code><code><code>
118
Name:           <B>value</B></I>
119
Class:          <B>Value</B></I>
120
Switch:         <B>-value</B></I>
121
Alias:          <B>-directory</B></I>
122
</code></code></code></pre>
123
<UL>
124
Specifies the name of the current directory to be displayed in the
125
DirList widget.
126
</UL>
127
</pre><H3>SUBWIDGETS</H3>
128
<P>
129
<pre><code><code><code>
130
Name:           <B>hlist</B></I>
131
Class:          <B>TixHList</B></I>
132
</code></code></code></pre>
133
<UL>
134
The hierarchical listbox that displays the directory listing.
135
</UL>
136
<P>
137
<pre><code><code><code>
138
Name:           <B>hsb</B></I>
139
Class:          <B>Scrollbar</B></I>
140
</code></code></code></pre>
141
<UL>
142
The horizontal scrollbar subwidget.
143
</UL>
144
<P>
145
<pre><code><code><code>
146
Name:           <B>vsb</B></I>
147
Class:          <B>Scrollbar</B></I>
148
</code></code></code></pre>
149
<UL>
150
The vertical scrollbar subwidget.
151
</UL>
152
</pre><HR>
153
</pre><H3>DESCRIPTION</H3>
154
<P>
155
The <B>tixDirList</B></I> command creates a new window (given by the
156
<I>pathName</I></B> argument) and makes it into a DirList widget.
157
Additional options, described above, may be specified on the command
158
line or in the option database to configure aspects of the
159
DirList such as its cursor and relief.
160
 
161
The DirList widget displays a list view of a directory, its
162
previous directories and its sub-directories. The user can choose one
163
of the directories displayed in the list or change to another
164
directory.
165
</pre><H3>WIDGET COMMANDS</H3>
166
<P>
167
The <B>tixDirList</B></I> command creates a new Tcl command whose name is
168
command may be used to invoke various operations on the widget. It has
169
the following general form:
170
<pre>
171
<I>pathName option </I></B>?<I>arg arg ...</I></B>?
172
<P>
173
</pre>
174
<I>PathName</I></B> is the name of the command, which is the same as the
175
determine the exact behavior of the command. The following commands
176
are possible for DirList widgets:
177
<DL>
178
<DT> <I>pathName <B>cget</B></I> <I>option</I></B>
179
</I></B>
180
<DD> Returns the current value of the configuration option given by
181
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
182
<B>tixDirList</B></I> command.
183
</DL>
184
<DL>
185
<DT> <I>pathName <B>chdir</B></I> <I>dir</I></B>
186
</I></B>
187
<DD> Change the current directory to <I>dir</I></B>.
188
</DL>
189
<DL>
190
<DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>?
191
</I></B>
192
<DD> Query or modify the configuration options of the widget.  If no
193
<I>option</I></B> is specified, returns a list describing all of the
194
available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
195
information on the format of this list).  If <I>option</I></B> is specified
196
with no <I>value</I></B>, then the command returns a list describing the
197
one named option (this list will be identical to the corresponding
198
sublist of the value returned if no <I>option</I></B> is specified).  If
199
one or more <I>option-value</I></B> pairs are specified, then the command
200
modifies the given widget option(s) to have the given value(s); in
201
this case the command returns an empty string.  <I>Option</I></B> may have
202
any of the values accepted by the <B>tixDirList</B></I> command.
203
</DL>
204
<DL>
205
<DT> <I>pathName <B>subwidget <I> name ?args?</I></B>
206
</I></B>
207
<DD> When no options are given, this command returns the pathname of the
208
subwidget of the specified name.
209
 
210
When options are given, the widget command of the specified subwidget
211
will be called with these options.
212
</DL>
213
</pre><H3>BINDINGS</H3>
214
<P>
215
The mouse and keyboard bindings of the DirList widget are the same as
216
the bindings of the HList widget.
217
</pre><H3>KEYWORDS</H3>
218
Tix(n)
219
<hr><i>Last modified Sun Jan 19 22:34:22 EST 1997 </i> ---
220
<i>Serial 853731297</i>

powered by: WebSVN 2.1.0

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