Tickit::Widget::Scroller::Item::RichText(3pm)

Tickit::Widget::Scroller::Item::RichText3pm

Static text with render attributes

Usage

   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 )
   );

Overview

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.

Releases

4 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13

Author

Paul Evans <[email protected]>

From libtickit-widget-scroller-perl 0.33-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.