$VERSION = '3.009'; # $Id: //depot/Tk8/Tk/Dirlist.pm#9 $
use base qw(Tk::Derived Tk::HList);
Construct Tk
::Widget
'Dirlist';
unless (exists $w->{$key})
$w->{$key} = $w->Pixmap(-id
=> $key);
$w->{$key} = $w->Bitmap($key);
$cw->configure(-separator
=> '/', -itemtype
=> 'imagetext');
$cw->ConfigSpecs(-directory
=> ['SETMETHOD','directory','Directory','.']);
warn "Cannot cd to $path:$!"
foreach $name (split m
#/#,$dir)
next unless ($first == 1);
unless ($w->info('exists' => $path))
$w->add($path,-image
=> $w->getimage('folder'), -text
=> $name);
return 'folder' if (-d
$path);
return 'srcfile' if ($path =~ /\.[ch]$/);
return 'textfile' if (-T
$path);
my $h = DirHandle
->new($val);
$w->AddDir($val = fullpath
($val));
$w->entryconfigure($val,-image
=> $w->getimage('act_fold'));
foreach $f (sort $h->read)
unless ($w->info('exists' => $path))
my $image = $w->getimage($w->choose_image($path));
$w->add($path,-image
=> $image, -text
=> $f);