NAME
Tk::DataTree - A tree widget for arbitrary data structures
SYNOPSIS
use Tk;
use Tk::DataTree;
$mw = new MainWindow;
$dt = $mw->DataTree;
$dt->update( { foo => 1, bar => [2, 3] } );
DESCRIPTION
The Tk::DataTree class is a derivate of Tk::Tree intended for displaying arbitrary data structures.
WIDGET-SPECIFIC OPTIONS
- -typename
-
If the data structure is an array or hash, this is the label of the root node.
- -activecolor
-
The color that is used for changing (active) items. An item is considered active if it is new or it has changed its value since the last
update
call. - -undefcolor
-
The color that is used for items whose value is
undef
.
METHODS
update
The update
method is the core part of the class. Just pass it any kind of perl data structure, and it will be visualized in the tree. You can call update
multiple times, and the tree will always be updated according to the new data structure. Changing (active) values will be highlighted with each update
call.
BUGS
I'm sure there are still lots of bugs in the code for this module. If you find any bugs, Tk::DataTree doesn't seem to build on your system or any of its tests fail, please use the CPAN Request Tracker at http://rt.cpan.org/ to create a ticket for the module. Alternatively, just send a mail to <mhx@cpan.org>.
COPYRIGHT
Copyright (c) 2004 Marcus Holland-Moritz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.