The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tickit::WidgetRole::SingleChildContainer - role for widgets that contain a single other widget

SYNOPSIS

   class Some::Widget::Class
      extends Tickit::Widget
      implements Tickit::WidgetRole::SingleChildContainer;

   ...

METHODS

child

   $child = $widget->child

Returns the contained child widget.

set_child

   $widget->set_child( $child )

Sets the child widget, or undef to remove.

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( ... ) );

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>