Tickit...::Text(3pm)
π Tickit::Widget::Scroller::Item::Text π
okay bestie, so this is the Tickit::Widget::Scroller::Item::Text page from the User Contributed Perl Documentation, and it's literally just about dropping some static text into a Scroller. no cap. β¨
πΈ NAME πΈ
Tickit::Widget::Scroller::Item::Text β the way this module's whole job is adding static text to a Scroller and it does it flawlessly. π
π¦ 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" )
);
likeβ¦ that's it. that's the whole vibe. push some text, slay. π₯
β¨ DESCRIPTION β¨
so this is an implementation of Tickit::Widget::Scroller::Item that displays a simple static piece of text. it's giving "set it and forget it" honestly.
and it gets wrapped on whitespace β meaning characters matching the /\s/ regexp pattern. so it'll break your lines at the spaces, not mid-word. iconic behaviour tbh. π
π§ CONSTRUCTOR π§
new
$item = Tickit::Widget::Scroller::Item::Text->new( $text, %opts );
constructs a new text item holding the given string of text. and listen β once it's constructed, the item is immutable. it's not changing for anybody, periodt. π
these are the options it recognises in %opts:
indent => INTβ if the text item needs to wrap, this indents the second and subsequent lines by this amount. ngl it does not apply to the first line, only the follow-ups. π«margin_left => INTβ since version 0.30. a number of columns to leave blank at the left edge of the item. this applies outside of any extra space thatindentadds. π«Άmargin_right => INTβ since version 0.30. same energy asmargin_leftbut for the right edge. a number of columns to leave blank there. and yeah, this also applies outside of whateverindentadded. πmargin => INTβ since version 0.30. this is the shortcut, bestie β it just sets bothmargin_leftandmargin_rightto the same value at once. two birds, one adorable line of code. π¦pen => Tickit::Penβ a pen to set for rendering the item, and that includes erasing its background. heads up though: it will not be set while erasing the area required for its margin. β
π METHODS π
chunks
@chunks = $item->chunks;
returns the chunks of text displayed by this item. each chunk is represented by an ARRAY reference of three fields β the text string, its width in columns, and various options:
[ $text, $width, %opts ]
the recognised options are:
pen => Tickit::Penβ the pen to render the chunk with. ποΈlinebreak => BOOLβ if this is true, it forces a linebreak after this chunk, so the next one starts on the following line. lowkey dramatic of it but okay. π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
and that's the whole page, bestie!! π₯° it's from the User Contributed Perl Documentation, generated with perl v5.38.2 on 2024-08-10. go forth and push text into your scrollers. you're gonna eat. ππβ¨
π¦ where this page comes from
- debian trixie: libtickit-widget-scroller-perl 0.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtickit-widget-scroller-perl 0.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtickit-widget-scroller-perl 0.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms