URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [insight/] [tix/] [man/] [DirList.html] - Rev 1774
Go to most recent revision | Compare with Previous | Blame | View Log
<TITLE>tixDirList - Create and manipulate tixDirList widgets</TITLE> <Center><H2>tixDirList - Create and manipulate tixDirList widgets</H2></Center><hr> </pre><H3>SYNOPSIS</H3> <B>tixDirList<I> <I>pathName ?<I>options</I></B>? <P> </pre><H3>SUPER-CLASS</H3> The <B>TixDirList</B></I> class is derived from the <B>TixScrolledHList</B></I> class and inherits all the commands, options and subwidgets of its super-class. </pre><H3>STANDARD OPTIONS</H3> <B>TixDirList</B></I> supports all the standard options of a frame widget. See the <B>options(n)</B></I> manual entry for details on the standard options. </pre><H3>WIDGET-SPECIFIC OPTIONS</H3> <P> <pre><code><code><code> Name: <B>browseCmd</B></I> Class: <B>BrowseCmd</B></I> Switch: <B>-browsecmd</B></I> </code></code></code></pre> <UL> Specifies a command to call whenever the user browses on a directory (usually by single-clicking on the name of the directory). The command is called with one argument, the complete pathname of the directory. </UL> <P> <pre><code><code><code> Name: <B>command</B></I> Class: <B>Command</B></I> Switch: <B>-command</B></I> </code></code></code></pre> <UL> Specifies the command to be called when the user activates on a directory (usually by double-clicking on the name of the directory). The command is called with one argument, the complete pathname of the directory. </UL> <P> <pre><code><code><code> Name: <B>dircmd</B></I> Class: <B>DirCmd</B></I> Switch: <B>-dircmd</B></I> </code></code></code></pre> <UL> Specifies the TCL command to be called when a directory listing is needed for a particular directory. If this option is not specified, by default the DirList widget will attempt to read the directory as a Unix directory. On special occasions, the application programmer may want to supply a special method for reading directories: for example, when he needs to list remote directories. In this case, the <B>-dircmd</B></I> option can be used. The specified command accepts two arguments: the first is the name of the directory to be listed; the second is a Boolean value indicating whether hidden sub-directories should be listed. This command returns a list of names of the sub-directories of this directory. For example: \fC </UL> <pre><code><code><code> proc read_dir {dir show_hidden} { if {$dir == "C:\\"} { return {DOS NORTON WINDOWS} } else { return {} } } </code></code></code></pre> </B></I> <P> <pre><code><code><code> Name: <B>disableCallback</B></I> Class: <B>DisableCallback</B></I> Switch: <B>-disablecallback</B></I> </code></code></code></pre> <UL> A boolean value indicating whether callbacks should be disabled. When set to true, the TCL command specified by the <B>-command</B></I> option is not executed when the <B>-value</B></I> of the DirList widget changes. </UL> <P> <pre><code><code><code> Name: <B>showHidden</B></I> Class: <B>ShowHidden</B></I> Switch: <B>-showhidden</B></I> </code></code></code></pre> <UL> Specifies whether hidden directories should be shown. By default, a directory name starting with a period "." is considered as a hidden directory. This rule can be overridden by supplying an alternative <B>-dircmd</B></I> option. </UL> <P> <pre><code><code><code> Name: <B>root</B></I> Class: <B>Root</B></I> Switch: <B>-root</B></I> </code></code></code></pre> <UL> Specifies the name of the root directory. Usually this is <B>"/"</B></I> under Unix machines, but can be changed to <B>"C:\\"</B></I> in DOS environments. </UL> <P> <pre><code><code><code> Name: <B>rootName</B></I> Class: <B>RootNAme</B></I> Switch: <B>-rootname</B></I> </code></code></code></pre> <UL> Specifies a text string to display at the root directory. If unspecified, the text string will be the same as the string specified by <B>-root</B></I>. </UL> <P> <pre><code><code><code> Name: <B>value</B></I> Class: <B>Value</B></I> Switch: <B>-value</B></I> Alias: <B>-directory</B></I> </code></code></code></pre> <UL> Specifies the name of the current directory to be displayed in the DirList widget. </UL> </pre><H3>SUBWIDGETS</H3> <P> <pre><code><code><code> Name: <B>hlist</B></I> Class: <B>TixHList</B></I> </code></code></code></pre> <UL> The hierarchical listbox that displays the directory listing. </UL> <P> <pre><code><code><code> Name: <B>hsb</B></I> Class: <B>Scrollbar</B></I> </code></code></code></pre> <UL> The horizontal scrollbar subwidget. </UL> <P> <pre><code><code><code> Name: <B>vsb</B></I> Class: <B>Scrollbar</B></I> </code></code></code></pre> <UL> The vertical scrollbar subwidget. </UL> </pre><HR> </pre><H3>DESCRIPTION</H3> <P> The <B>tixDirList</B></I> command creates a new window (given by the <I>pathName</I></B> argument) and makes it into a DirList widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the DirList such as its cursor and relief. The DirList widget displays a list view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory. </pre><H3>WIDGET COMMANDS</H3> <P> The <B>tixDirList</B></I> command creates a new Tcl command whose name is command may be used to invoke various operations on the widget. It has the following general form: <pre> <I>pathName option </I></B>?<I>arg arg ...</I></B>? <P> </pre> <I>PathName</I></B> is the name of the command, which is the same as the determine the exact behavior of the command. The following commands are possible for DirList widgets: <DL> <DT> <I>pathName <B>cget</B></I> <I>option</I></B> </I></B> <DD> Returns the current value of the configuration option given by <I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the <B>tixDirList</B></I> command. </DL> <DL> <DT> <I>pathName <B>chdir</B></I> <I>dir</I></B> </I></B> <DD> Change the current directory to <I>dir</I></B>. </DL> <DL> <DT> <I>pathName <B>configure</B></I> ?<I>option</I></B>? <I>?value option value ...</I></B>? </I></B> <DD> Query or modify the configuration options of the widget. If no <I>option</I></B> is specified, returns a list describing all of the available options for <I>pathName</I></B> (see <B>Tk_ConfigureInfo</B></I> for information on the format of this list). If <I>option</I></B> is specified with no <I>value</I></B>, 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 <I>option</I></B> is specified). If one or more <I>option-value</I></B> 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. <I>Option</I></B> may have any of the values accepted by the <B>tixDirList</B></I> command. </DL> <DL> <DT> <I>pathName <B>subwidget <I> name ?args?</I></B> </I></B> <DD> 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. </DL> </pre><H3>BINDINGS</H3> <P> The mouse and keyboard bindings of the DirList widget are the same as the bindings of the HList widget. </pre><H3>KEYWORDS</H3> Tix(n) <hr><i>Last modified Sun Jan 19 22:34:22 EST 1997 </i> --- <i>Serial 853731297</i>
Go to most recent revision | Compare with Previous | Blame | View Log