Tk-DocumentTree

 view release on metacpan or  search on metacpan

lib/Tk/DocumentTree.pm  view on Meta::CPAN

package Tk::DocumentTree;

=head1 NAME

Tk::DocumentTree - Tk::ListBrowser based document list

=cut

use strict;
use vars qw($VERSION);
$VERSION = '0.11';

use base qw(Tk::Derived Tk::Frame);

require Tk::ListBrowser;
use File::Basename;
use Tk;
use Config;

Construct Tk::Widget 'DocumentTree';

my $save_pixmap = '
/* XPM */
static char *save[]={
"16 16 4 1",
". c None",
"# c #000000",
"a c #808080",
"b c #ffff00",
"................",
"..############..",
".#aaaaaaaaaaaa#.",
".#aaaaaaaaaaaa#.",
".#aaaaaaaaaaaa#.",
".#aaaaaaaaaaaa#.",
".#aaaaaaaaaaaa#.",
".#aaaaaaaaaaaa#.",
".#aa########aa#.",
".#aa########aa#.",
".#aa########aa#.",
".#aa########aa#.",
".#aa#bbbbbb#aa#.",
".#aa#bbbbbb#aa#.",
"..############..",
"................"};
';

=head1 SYNOPSIS

 require Tk::DocumentTree;
 my $tree= $window->DocumentTree(@options)->pack;

=head1 DESCRIPTION

B<Tk::DocumentTree> is a Tree like megawidget. It consists of a Label and a ListBrowser widget.

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 I<file> or I<untracked>
An entry is untracked when it does not exist as a file.

=head1 CONFIG VARIABLES

=over 4

=item Switch: B<-contextmenu>

Specify menuitems for a menu that pops on Button-3.
By default it has entries for collapseAll and expandAll,

=item Switch: B<-diriconcall>



( run in 1.757 second using v1.01-cache-2.11-cpan-800906f7e73 )