-
-
25 Apr 2022 14:27:17 UTC
- Distribution: Tickit-Widget-Scroller
- Module version: 0.28
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (2)
- Testers (27 / 0 / 45)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.26.0
- Activity
24 month- Tools
- Download (34.27KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Object::Pad
- String::Tagged
- Tickit::Pen
- Tickit::RenderBuffer
- Tickit::Widget
- Tickit::Window
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Tickit::Widget::Scroller::Item::RichText
- static text with render attributesSYNOPSIS
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 ) );
DESCRIPTION
This subclass of Tickit::Widget::Scroller::Item::Text draws static text with rendering attributes, used to apply formatting. The attributes are stored by supplying the text in an instance of a String::Tagged object.
The recognised attributes are those of Tickit::Pen, taking the same names and values. To use a String::Tagged::Formatting instance instead, use the "new_from_formatting" constructor.
CONSTRUCTOR
new_from_formatting
$item = Tickit::Widget::Scroller::Item::RichText->new_from_formatting( $str, %opts )
Constructs a new item containing the text given by the String::Tagged instance, converting the tags from the String::Tagged::Formatting convention into native Tickit::Pen format.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
Module Install Instructions
To install Tickit::Widget::Scroller, copy and paste the appropriate command in to your terminal.
cpanm Tickit::Widget::Scroller
perl -MCPAN -e shell install Tickit::Widget::Scroller
For more information on module installation, please visit the detailed CPAN module installation guide.