Tickit::Widget::Spinner(3pm)

Tickit::Widget::Spinner3pm

A widget displaying a small text animation

Usage

   use Tickit;
   use Tickit::Widget::Spinner;
   my $spinner = Tickit::Widget::Spinner->new(
      chars => [ "<X>  ", " <X> ", "  <X>", ">  <X", "X>  <" ],
   );
   Tickit->new( root => $spinner )->run;

Overview

This class provides a widget which displays a simple animation, cycling through a fixed set of strings with a fixed interval.

Style

The default style pen is used as the widget pen.

Constructor

new

   $spinner = Tickit::Widget::Spinner->new( %args );

Constructs a new "Tickit::Widget::Spinner" object.

Takes the following named arguments:

chars => ARRAY

Optional. An ARRAY reference containing the text strings to use.

interval => NUM

Optional. The time each string is displayed for. Defaults to 0.5.

Methods

start

   $spinner->start;

Starts the animation effect.

stop

   $spinner->stop;

Stops the animation effect.

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-widgets-perl 0.42-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.