NAME
Weaving::Tablet::Tk - Tk user interface to Weaving::Tablet designer
SYNOPSIS
use Weaving::Tablet::Tk;
use Tk;
my $pattern = Weaving::Tablet::Tk->new_pattern(mw => $mw, file => $file);
my $pattern2 = Weaving::Tablet::Tk->new_pattern(mw => $mw, cards => $cards, rows => $rows);
$pattern->canvas # get the drawing area
$pattern->window # get the toplevel window
MainLoop;
DESCRIPTION
Weaving::Tablet::Tk wraps a Tk user interface around the core routines in Weaving::Tablet.
Weaving::Tablet::Tk is a subclass of Weaving::Tablet.
new
The new function expects arguments as key/value pairs.
The key "mw" is always expected. If not present, a new MainWindow is created. If present, it is the parent for a new Toplevel window.
The key "file" identifies a pattern file to be loaded. If a pattern cannot be loaded from that file, undef is returned.
The keys "cards" and "rows" specify the size of a new, blank pattern.
If the "file" key is not provided, a blank pattern is created, with a default size of 1 row by 1 card.
The window and the drawing canvas are available via member functions.
Member Functions
You can retrieve the Toplevel window via the "window" member. You can retrieve the drawing canvas via the "canvas" member.
AUTHOR
Michael Houghton
SEE ALSO
perl(1).