OSDN Git Service

Initial revision
[pf3gnuchains/pf3gnuchains3x.git] / tix / man / DirTree.html
1
2
3
4 <TITLE>tixDirTree - Create and manipulate tixDirTree widgets</TITLE>
5 <Center><H2>tixDirTree - Create and manipulate tixDirTree widgets</H2></Center><hr>
6
7 </pre><H3>SYNOPSIS</H3>
8 <B>tixDirTree<I> <I>pathName ?<I>options</I></B>?
9 <P>
10 </pre><H3>SUPER-CLASS</H3>
11 The <B>TixDirTree</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>TixDirTree</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 DirTree 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 DirTree 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>value</B></I>
98 Class:          <B>Value</B></I>
99 Switch:         <B>-value</B></I>
100 Alias:          <B>-directory</B></I>
101 </code></code></code></pre>
102 <UL>
103 Specifies the name of the current directory to be displayed in the
104 DirTree widget.
105 </UL>
106 </pre><H3>SUBWIDGETS</H3>
107 <P>
108 <pre><code><code><code>
109 Name:           <B>hlist</B></I>
110 Class:          <B>TixHList</B></I>
111 </code></code></code></pre>
112 <UL>
113 The hierarchical listbox that displays the directory listing.
114 </UL>
115 <P>
116 <pre><code><code><code>
117 Name:           <B>hsb</B></I>
118 Class:          <B>Scrollbar</B></I>
119 </code></code></code></pre>
120 <UL>
121 The horizontal scrollbar subwidget.
122 </UL>
123 <P>
124 <pre><code><code><code>
125 Name:           <B>vsb</B></I>
126 Class:          <B>Scrollbar</B></I>
127 </code></code></code></pre>
128 <UL>
129 The vertical scrollbar subwidget.
130 </UL>
131 </pre><HR>
132 </pre><H3>DESCRIPTION</H3>
133 <P>
134 The <B>tixDirTree</B></I> command creates a new window (given by the
135 <I>pathName</I></B> argument) and makes it into a DirTree widget.
136 Additional options, described above, may be specified on the command
137 line or in the option database to configure aspects of the
138 DirTree such as its cursor and relief.
139
140 The DirTree widget displays a list view of a directory, its
141 previous directories and its sub-directories. The user can choose one
142 of the directories displayed in the list or change to another
143 directory.
144 </pre><H3>WIDGET COMMANDS</H3>
145 <P>
146 The <B>tixDirTree</B></I> command creates a new Tcl command whose name is
147 command may be used to invoke various operations on the widget. It has
148 the following general form:
149 <pre>
150 <I>pathName option </I></B>?<I>arg arg ...</I></B>?
151 <P>
152 </pre>
153 <I>PathName</I></B> is the name of the command, which is the same as the
154 determine the exact behavior of the command. The following commands
155 are possible for DirTree widgets:
156 <DL>
157 <DT> <I>pathName <B>cget</B></I> <I>option</I></B>
158 </I></B>
159 <DD> Returns the current value of the configuration option given by
160 <I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
161 <B>tixDirTree</B></I> command.
162 </DL>
163 <DL>
164 <DT> <I>pathName <B>chdir</B></I> <I>dir</I></B>
165 </I></B>
166 <DD> Change the current directory to <I>dir</I></B>.
167 </DL>
168 <DL>
169 <DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>?
170 </I></B>
171 <DD> Query or modify the configuration options of the widget.  If no
172 <I>option</I></B> is specified, returns a list describing all of the
173 available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
174 information on the format of this list). If <I>option</I></B> is specified
175 with no <I>value</I></B>, then the command returns a list describing the
176 one named option (this list will be identical to the corresponding
177 sublist of the value returned if no <I>option</I></B> is specified).  If
178 one or more <I>option-value</I></B> pairs are specified, then the command
179 modifies the given widget option(s) to have the given value(s); in
180 this case the command returns an empty string.  <I>Option</I></B> may have
181 any of the values accepted by the <B>tixDirTree</B></I> command.
182 </DL>
183 <DL>
184 <DT> <I>pathName <B>subwidget <I> name ?args?</I></B> 
185 </I></B>
186 <DD> When no options are given, this command returns the pathname of the
187 subwidget of the specified name.
188
189 When options are given, the widget command of the specified subwidget
190 will be called with these options.
191 </DL>
192 </pre><H3>BINDINGS</H3>
193 <P>
194 The mouse and keyboard bindings of the DirTree widget are the same as
195 the bindings of the HList widget.
196 </pre><H3>KEYWORDS</H3>
197 Tix(n)
198 <hr><i>Last modified Sun Jan 19 22:34:22 EST 1997 </i> --- 
199 <i>Serial 853731297</i>