Tickit::Widget::Scroller::Item::Text - add static text to a Scroller
Tickit::Widget::Scroller::Item::Text
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" ) );
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).
/\s/
Constructs a new text item, containing the given string of text. Once constructed, the item is immutable.
The following options are recognised in %opts:
%opts
If the text item needs to wrap, indent the second and subsequent lines by this amount. Does not apply to the first line.
Returns the chunks of text displayed by this item. Each chunk is represented by an ARRAY reference of three fields, giving the text string, its width in columns, and various options
[ $text, $width, %opts ]
Recognised options are:
Pen to render the chunk with.
If true, force a linebreak after this chunk; the next one starts on the following line.
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit::Widget::Scroller, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widget::Scroller
CPAN shell
perl -MCPAN -e shell install Tickit::Widget::Scroller
For more information on module installation, please visit the detailed CPAN module installation guide.