Tickit...chText(3pm)
π NAME π
Tickit::Widget::Scroller::Item::RichText β static text, but make it β¨fashionβ¨ (aka with render attributes)
okay bestie, real talk: this is the glow-up edition of scroller text. Same vibe, extra sparkle. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
use Tickit::Widget::Scroller;
use Tickit::Widget::Scroller::Item::RichText;
use String::Tagged;
my $str = String::Tagged->new( "An important message" );
$str->apply_tag( 3, 9, b => 1 );
my $scroller = Tickit::Widget::Scroller->new;
$scroller->push(
Tickit::Widget::Scroller::Item::RichText->new( $str )
);
like, look at her go π
you build a String::Tagged, tag a lil slice of it, yeet it into the scroller, done. no cap.
π¦ DESCRIPTION π¦
So this class is a subclass of Tickit::Widget::Scroller::Item::Text, and what it does is draw static text with rendering attributes β basically formatting, the whole point, the moment. π
Where do those attributes live? Not in vibes. They're stored by handing the text over inside an instance of a String::Tagged object. That's the whole delivery mechanism, periodt.
The attributes it recognises are the attributes of Tickit::Pen β same names, same values, no remixing, no rebranding. And if what you've actually got on your hands is a String::Tagged::Formatting instance instead? Then babe, you want the new_from_formatting constructor. Different door, same house πͺβ¨
π CONSTRUCTOR π
new_from_formatting
$item = Tickit::Widget::Scroller::Item::RichText->new_from_formatting( $str, %opts )
Constructs a brand new item holding the text given by that String::Tagged instance β and the slay part is that it converts the tags from the String::Tagged::Formatting convention over into native Tickit::Pen format. Translation service, but make it text rendering π§
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> β the icon who wrote this. we stan. π«Ά
and that's the whole page, bestie β written by Paul Evans, shipped in perl v5.38.2, dated 2024-08-10, and documented under User Contributed Perl Documentation. mwah π go tag some text π
π¦ 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