Tk::DataTree - A tree widget for arbitrary data structures |
Tk::DataTree - A tree widget for arbitrary data structures
use Tk; use Tk::DataTree; $mw = new MainWindow; $dt = $mw->DataTree; $dt->data( { foo => 1, bar => [2, 3] } );
The Tk::DataTree class is a derivate of the Tk::Tree manpage intended for displaying arbitrary data structures. It's a bit like having the Data::Dumper manpage as a Tk widget.
data
method.
data
call.
undef
.
Tk::ItemStyle
object that allows you to configure the
appearance of the node tree items.
Tk::ItemStyle
object that allows you to configure the
appearance of the normal tree items.
Tk::ItemStyle
object that allows you to configure the
appearance of the active tree items.
Tk::ItemStyle
object that allows you to configure the
appearance of the undefined tree items.
The data
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 data
multiple
times, and the tree will always be updated according to
the new data structure. Changing (active) values will be
highlighted with each data
call.
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 (c) 2004-2008 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.
See Tk, the Tk::Tree manpage, the Tk::DItem manpage and the Data::Dumper manpage.
Tk::DataTree - A tree widget for arbitrary data structures |