Paul Evans

NAME

Tickit::Widget::Scroller::Item::Text - add static text to a Scroller

SYNOPSIS

 use Tickit::Widget::Scroller;
 use Tickit::Widget::Scroller::Item::Text;

 my $scroller = Tickit::Widget::Scroller->new;

 $scroller->push(
    Tickit::Widget::Scroller::Item::Text->new( "Hello world" )
 );

DESCRIPTION

This implementation of Tickit::Widget::Scroller::Item displays a simple static piece of text. It will be wrapped on whitespace (characters matching the /\s/ regexp pattern).

CONSTRUCTOR

$item = Tickit::Widget::Scroller::Item::Text->new( $text, %opts )

Constructs a new text item, containing the given string of text. Once constructed, the item is immutable.

The following options are recognised in %opts:

indent => INT

If the text item needs to wrap, indent the second and subsequent lines by this amount. Does not apply to the first line.

METHODS

$text = $item->text

Returns the text string displayed by this item.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>