Tickit::Widget::Scroller::Item::Text(3pm) | User Contributed Perl Documentation | Tickit::Widget::Scroller::Item::Text(3pm) |
"Tickit::Widget::Scroller::Item::Text" - add static text to a Scroller
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).
$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:
@chunks = $item->chunks
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:
Paul Evans <leonerd@leonerd.org.uk>
2022-12-17 | perl v5.36.0 |