HDF5::tkview(3pm) | User Contributed Perl Documentation | HDF5::tkview(3pm) |
PDL::IO::HDF5::tkview - View HDF5 files using perl/tk and PDL::IO::HDF5 modules
This is a experimental object to view HDF5 files the PDL::IO::HDF5 module. The HDF files are displayed in a tree structure using Tk::Tree
use Tk; use PDL::IO::HDF5::tkview use PDL::IO::HDF5; my $mw = MainWindow->new; my $h5 = new PDL::IO::HDF5('datafile.h5'); # open HDF5 file object my $tkview = new PDL::IO::HDF5::tkview( $mw, $h5); MainLoop;
Tk Hlist object
####---------------------------------------------------------
PDL::IO::HDF5::tkview Constructor - creates new object
Usage:
$tkview = new PDL::IO::HDF5::tkview( $mw, $H5obj); Where: $mw Tk window $H5obj PDL::IO::HDF5::Object
Set the dataDisplaySub data member.
Usage:
# Data Display sub to call when a dataset is double-clicked my $dataDisplay = sub{ my $data = $_[0]; print "I'm Displaying This $data\n";}; $tkview->dataDisplaySubSet($dataDisplay);
The dataDisplaySub data member is a perl sub ref that is called when a dataset is double-clicked. This data member is initially set to just print the dataset's data to the command line. Using the dataDisplaySubSet method, different actions for displaying the data can be "plugged-in".
Internal Display method invoked whenever a tree element is activated (i.e. double-clicked). This method does nothing unless a dataset element has been selected. It that cases it calls $self->dataDisplaySub with the data.
2022-11-30 | perl v5.36.0 |