Tickit::WidgetRole::Penable - implement widgets with setable pens
Tickit::WidgetRole::Penable
Mixing this parametric role into a Tickit::Widget subclass adds behaviour to implement a custom pen. The mixing widget will automatically subscribe to the pen for updates by its add_on_changed method. The mixing widget class still responsible for implementing the on_pen_changed method.
add_on_changed
on_pen_changed
The following methods are provided parametrically on the caller package when the module is imported by
use Tickit::WidgetRole::Penable name => NAME, default => DEFAULT
The parameters are
Required. The name to use for NAME in the following generated methods, and used as the $id identifier to the add_on_changed method.
NAME
$id
Optional. A HASH reference containing the default attributes this pen should have on initialisation.
Returns the Tickit::Pen instance.
Sets a new pen instance.
Sets the initial default value of the pen, by calling set_NAME_pen.
set_NAME_pen
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit
CPAN shell
perl -MCPAN -e shell install Tickit
For more information on module installation, please visit the detailed CPAN module installation guide.