Tk-ListBrowser
view release on metacpan or search on metacpan
lib/Tk/ListBrowser.pm view on Meta::CPAN
package Tk::ListBrowser;
=head1 NAME
Tk::ListBrowser - Tk::IconList inspired chameleon list box.
=cut
use strict;
use warnings;
use Carp;
use vars qw($VERSION);
$VERSION = '0.10';
use base qw(Tk::Derived Tk::Frame);
Construct Tk::Widget 'ListBrowser';
use Math::Round;
use Tk;
require Tk::PopList;
require Tk::ListBrowser::Entry;
require Tk::ListBrowser::FilterEntry;
require Tk::ListBrowser::HashList;
require Tk::ListBrowser::Item;
require Tk::ListBrowser::LBCanvas;
require Tk::ListBrowser::LBHeader;
require Tk::ListBrowser::SideColumn;
#available refresh handlers
my %handlers = (
bar => 'Bar',
column => 'Column',
list => 'List',
hlist => 'HList',
row => 'Row',
tree => 'Tree',
);
my %columnCapable = (
list => 1,
hlist => 1,
tree => 1,
);
my $minusimg = '#define indicatorclose_width 11
#define indicatorclose_height 11
static unsigned char indicatorclose_bits[] = {
0xff, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0xfd, 0x05,
0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0xff, 0x07 };
';
my $plusimg = '#define indicatoropen_width 11
#define indicatoropen_height 11
static unsigned char indicatoropen_bits[] = {
0xff, 0x07, 0x01, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0xfd, 0x05,
0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x01, 0x04, 0xff, 0x07 };
';
=head1 SYNOPSIS
require Tk::ListBrowser;
my $ib= $window->ListBrowser(@options)->pack;
$ib->add('item_1', -image => $image1, -text => $text1);
$ib->add('item_2', -image => $image2, -text => $text2);
$ib->refresh;
=head1 DESCRIPTION
B<Tk::ListBrowser> began as an inspiration on L<Tk::IconList>.
Nice, column oriented arrangement, but how about row oriented
arrangement. And while we are at it, also list bar hlist and tree
oriented arrangement. Scrollbars work automatically. Efforts have been
made to follow the conventions of the Tk hierarchical list
family as close as possible.
( run in 1.620 second using v1.01-cache-2.11-cpan-e1769b4cff6 )