Tickit::WidgetRole::Penable - implement widgets with setable pens
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
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
- name => STRING
Required. The name to use for
NAMEin the following generated methods, and used as the
$ididentifier to the
- default => HASH
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
Paul Evans <email@example.com>