table of contents
other versions
- buster 1:0.73-5+b2
- testing 1:0.73-6
- unstable 1:0.73-6
- experimental 1:0.75-1~exp1
| HDF5::tkview(3pm) | User Contributed Perl Documentation | HDF5::tkview(3pm) |
NAME¶
PDL::IO::HDF5::tkview - View HDF5 files using perl/tk and PDL::IO::HDF5 modulesDESCRIPTION¶
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::TreeSYNOPSIS¶
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;
MEMBER DATA¶
- mw
- Tk window where the file structure is displayed.
- H5obj
- PDL::IO::HDF5 Object
- hl
- Tk Hlist object
- dataDisplaySub
- Sub ref to execute when a dataset is double-clicked. This defaults to a
print of the dataset. See dataDisplaySubSet for details.
Tk Hlist object
METHODS¶
####---------------------------------------------------------new¶
PDL::IO::HDF5::tkview Constructor - creates new objectUsage:
$tkview = new PDL::IO::HDF5::tkview( $mw, $H5obj);
Where:
$mw Tk window
$H5obj PDL::IO::HDF5::Object
dataDisplaySubSet¶
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".
activateCmd¶
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.| 2018-11-20 | perl v5.28.0 |