Tk-MK
view release on metacpan or search on metacpan
lib/Tk/Treeplus.pm view on Meta::CPAN
######################################## SOH ###########################################
## Function : Alternate version for Tk:HList with sorting and filtering of columns
##
## Copyright (c) 2013 Michael Krause. All rights reserved.
## This program is free software; you can redistribute it and/or modify it
## under the same terms as Perl itself.
##
## History : V0.1 06-Feb-2013 Class created. MK
## V0.2 10-Feb-2013 Added code for feature 'column resizing' (w/o headerresizebutton!). MK
## V0.3 13-Feb-2013 Added configure/cget access. Updated Pod documentation. MK
## V0.4 26-Feb-2013 Added wrapper/easier func 'advheaderCreate(). Updated Pod documentation. MK
###
######################################## EOH ###########################################
package Tk::Treeplus;
##############################################
### Use
##############################################
use strict;
use vars qw($VERSION);
$VERSION = '0.4';
# standards
use Carp;
use Time::HiRes qw(usleep);
# Tk related
use Tk;
use Tk qw(Ev);
use Tk::Derived;
use Tk::ItemStyle;
use Tk::Compound;
use Tk::DialogBox;
use Tk::LabEntry;
#--------------------------------------------------------------------------------------------------
#use base qw(Tk::Derived Tk::Tree);
use base qw(Tk::Derived Tk::Tree);
Tk::Widget->Construct ('Treeplus');
#--------------------------------------------------------------------------------------------------
my (%IconData, %Icons);
# Several internal constants
use constant MAX_HISTORY_SIZE => '10';
#
use constant DEFAULT_CLIPBOARD_SEPARATOR => '|';
#
use constant _HL_INDICATOR_NONE => '0';
use constant _HL_INDICATOR_OPEN => '1';
use constant _HL_INDICATOR_CLOSED => '2';
#--------------------------------------------------------------------------------------------------
# Setup Bitmaps
$IconData{Up} = <<'up_EOP';
/* XPM */
static char *Up[] = {
"6 3 2 1",
". c none",
"X c black",
"..XX..",
".XXXX.",
"XXXXXX",
};
up_EOP
$IconData{Down} = <<'down_EOP';
/* XPM */
static char *Down[] = {
"6 3 2 1",
". c none",
"X c black",
"XXXXXX",
".XXXX.",
"..XX..",
};
down_EOP
$IconData{Filter} = <<'filter_EOP';
/* XPM */
static char *Filter[] = {
"12 7 3 1",
". c none",
"X c black",
"X c grey",
"..XXXXXXXX..",
"...XXXXXX...",
"....XXXX....",
".....XX.....",
".....XX.....",
".....XX.....",
".....XX.....",
};
filter_EOP
#--------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------
sub ClassInit
( run in 0.506 second using v1.01-cache-2.11-cpan-a1f116cd669 )