Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / DirTree.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::DirTree - Create and manipulate DirTree widgets
5
6=for pm Tixish/DirTree.pm
7
8=for category Tix Extensions
9
10=head1 SYNOPSIS
11
12S< >B<use Tk::DirTree;>
13
14S< >I<$dirtree> = I<$parent>-E<gt>B<DirTree>(?I<options>?);
15
16=head1 SUPER-CLASS
17
18The B<DirTree> class is derived from the L<Tree|Tk::Tree> class and inherits
19all the methods, options and subwidgets of its super-class.
20
21=head1 STANDARD OPTIONS
22
23B<Tree> supports all the standard options of a Tree widget. See
24L<Tk::options> for details on the standard options.
25
26=head1 WIDGET-SPECIFIC OPTIONS
27
28=over 4
29
30=item Name: B<browseCmd>
31
32=item Class: B<BrowseCmd>
33
34=item Switch: B<-browsecmd>
35
36Specifies a L<callback|Tk::callbacks> to call whenever the user browses on a directory
37(usually by single-clicking on the name of the directory). The callback
38is called with one argument, the complete pathname of the directory.
39
40=item Name: B<command>
41
42=item Class: B<Command>
43
44=item Switch: B<-command>
45
46Specifies the L<callback|Tk::callbacks> to be called when the user activates on a directory
47(usually by double-clicking on the name of the directory). The callback
48is called with one argument, the complete pathname of the directory.
49
50=item Name: B<dircmd>
51
52=item Class: B<DirCmd>
53
54=item Switch: B<-dircmd>
55
56Specifies the L<callback|Tk::callbacks> to be called when a directory listing is needed
57for a particular directory. If this option is not specified, by
58default the DirTree widget will attempt to read the directory as a
59Unix directory. On special occasions, the application programmer may
60want to supply a special method for reading directories: for example,
61when he needs to list remote directories. In this case, the B<-dircmd>
62option can be used. The specified callback accepts two arguments: the
63first is the name of the directory to be listed; the second is a
64Boolean value indicating whether hidden sub-directories should be
65listed. This callback returns a list of names of the sub-directories of
66this directory. For example:
67
68 sub read_dir {
69 my( $dir, $showhidden ) = @_;
70 return( qw/DOS NORTON WINDOWS/ ) if $dir eq "C:\\";
71 return();
72 }
73
74=item Name: B<showHidden>
75
76=item Class: B<ShowHidden>
77
78=item Switch: B<-showhidden>
79
80Specifies whether hidden directories should be shown. By default, a
81directory name starting with a period "." is considered as a hidden
82directory. This rule can be overridden by supplying an alternative
83B<-dircmd> option.
84
85=item Name: B<directory>
86
87=item Class: B<Directory>
88
89=item Switch: B<-directory>
90
91=item Alias: B<-value>
92
93Specifies the name of the current directory to be displayed in the
94DirTree widget.
95
96=back
97
98=head1 DESCRIPTION
99
100The B<DirTree> constructor method creates a new window (given by the $dirtree
101argument) and makes it into a DirTree widget. Additional options,
102described above, may be specified on the command line or in the
103option database to configure aspects of the DirTree such as its
104cursor and relief. The DirTree widget displays a list view of a
105directory, its previous directories and its sub-directories. The
106user can choose one of the directories displayed in the list or
107change to another directory.
108
109=head1 WIDGET METHODS
110
111The B<DirTree> method creates a widget object.
112This object supports the B<configure> and B<cget> methods
113described in L<Tk::options> which can be used to enquire and
114modify the options described above.
115The widget also inherits all the methods provided by the generic
116L<Tk::Widget|Tk::Widget> class.
117
118The following additional methods are available for DirTree widgets:
119
120=over 4
121
122=item I<$dirtree>-E<gt>B<chdir>(I<dir>)
123
124Change the current directory to I<dir>.
125
126=back
127
128=head1 BINDINGS
129
130The mouse and keyboard bindings of the DirTree widget are the same as
131the bindings of the L<Tree|Tk::Tree> widget.
132
133=head1 KEYWORDS
134
135directory, tree, tix
136
137=head1 SEE ALSO
138
139L<Tk::Tree|Tk::Tree>
140L<Tk::HList|Tk::HList>
141
142=head1 AUTHOR
143
144Perl/TK version by Chris Dean <ctdean@cogit.com>. Original Tcl/Tix
145version by Ioi Kim Lam.
146
147=cut
148