NAME
Tk::DocumentTree - ITree based document list
SYNOPSIS
require Tk::DocumentTree;
my $tree= $window->DocumentTree(@options)->pack;
DESCRIPTION
Tk::DocumentTree is a Tree like megawidget. It consists of a Label and an ITree Widget.
You can use all of the options of an ITree widget except for -itemtype, -browsecmd, -separator, -selectmode and -exportselection.
The Label on top displays the path all added entries have in commom. It automatically creates a folder tree as entries are added.
Entries can have the status file or untracked An entry is untracked when it does not exist as a file.
CONFIG VARIABLES
- Switch: -diriconcall
-
Callback for obtaining the dir icon. By default it is set to a call that returns the default folder.xpm in the Perl/Tk distribution.
- Switch: -entryselect
-
Callback to execute when the user clicks (selects) and entry.
- Switch: -fileiconcall
-
Callback for obtaining the file icon. By default it is set to a call that returns the default file.xpm in the Perl/Tk distribution.
- Switch: -saveiconcall
-
Callback for obtaining the save icon. By default it is set to a call that returns save icon embedded in this package.
METHODS
- entryAdd($filename)
-
Adds the entry $filename. $filename can also be an untracked entry.
- entryDelete($filename)
-
Deletes the entry $filename. $filename can also be an untracked entry.
- entryModified($filename)
-
Sets the icon in the $filename entry to the save icon, indicating the entry is modified.
- entrySaved($filename)
-
Sets the icon in the $filename entry to the default file icon, indicating the entry is saved.
- entrySelect($filename)
-
Call this method if you want to change the selection.
- fileList
-
Returns a list of all files in the document tree. Untracked items are not included.
- untrackedList
-
Returns a list of all untracked items.
LICENSE
Same as Perl.
AUTHOR
Hans Jeuken (hanje at cpan dot org)
BUGS
Unknown. If you find any, please contact the author.