Tickit::WidgetRole::SingleChildContainer - role for widgets that contain a single other widget
Tickit::WidgetRole::SingleChildContainer
class Some::Widget::Class :isa(Tickit::Widget) :does(Tickit::WidgetRole::SingleChildContainer); ...
Applying this role to a Tickit::Widget subclass adds behaviour for it to act as a container widget holding a single child widget.
$child = $widget->child;
Returns the contained child widget.
$widget->set_child( $child );
Sets the child widget, or undef to remove.
undef
This method returns the container widget instance itself making it suitable to use as a chaining mutator; e.g.
my $container = Tickit::SingleChildWidget->new( ... ) ->set_child( Tickit::Widget::Static->new( ... ) );
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit::Widgets, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widgets
CPAN shell
perl -MCPAN -e shell install Tickit::Widgets
For more information on module installation, please visit the detailed CPAN module installation guide.