Games::Go::Sgf2Dg::Dg2Tk(3pm) | User Contributed Perl Documentation | Games::Go::Sgf2Dg::Dg2Tk(3pm) |
Games::Go::Sgf2Dg::Dg2Tk - convert Games::Go::Sgf2Dg::Diagrams to perl/Tk windows
use Games::Go::Sgf2Dg::Dg2Tk
my $dg2tk = B<Games::Go::Sgf2Dg::Dg2Tk-E<gt>new> (options); my $canvas = $dg2tk->convertDiagram($diagram);
A Games::Go::Sgf2Dg::Dg2Tk object converts a Games::Go::Sgf2Dg::Diagram object into Tk::Canvas item. The close method calls Tk::MainLoop to dispays the collection of Canvases.
Bindings for the normal editing keys: Up, Down, Next (PageDown) and Prior (PageUp) traverse the NoteBook tabs. Tab and Shift-tab also work as expected.
Left and Right keys select the previous or next NoteBook tab, but don't display it. Space and Enter (carriage return) display the selected tab.
A new Games::Go::Sgf2Dg::Dg2Tk takes the following options:
Default: 19
Default: false
Default: false
Default:
sub { my ($x, $y) = @_;
$x = chr($x - 1 + ord('a')); # convert 1 to 'a',
etc
$y = chr($y - 1 + ord('a'));
return("$x$y"); }, # concatenate two letters
See also the diaCoords method below.
my $int = $diagram->get($dg2mp->diaCoords(3, 4));
Returns the converted text.
my $canvas = $dg2tk->diagrams->[$idx]->Subwidget('scrolled');
We ain't got to show you no stinkin' bugs!
2019-10-27 | perl v5.30.0 |