Scroll to navigation

Prima::Spinner(3) User Contributed Perl Documentation Prima::Spinner(3)

NAME

Prima::Spinner - spinner animation widget

SYNOPSIS

  use Prima qw(Application Buttons Spinner);
  my $mw = Prima::MainWindow->new(
        size      => [200, 400],
        text      => 'Button Example'
  );
  my $spinner = $mw->insert('Spinner',
        style     => 'drops',
        size      => [200,400],
        growMode  => gm::Center
  );
  my $button = $mw->insert(
        'Button',
        text      => 'Start/Stop',
        checkable => 1,
        checked   => 1,
        origin    => [0,0],
        onClick   => sub { $spinner->toggle },
        growMode  => gm::XCenter
  );
  run Prima;

DESCRIPTION

Prima::Spinner provides a simple spinning animation in three different designs and the opportunity to specify the colors of the spinning animation. This is useful to show the progress of a running process.

USAGE

Properties

Manages whether the spinning animation is active or not.
Inherited from Prima::Widget. "color" manages the basic foreground color. For the spinner widget, this means the background color of the circle or the color of the drops.
Inherited from Prima::Widget. The color is used to draw alternate foreground areas with high contrast. For the spinner widget, this defines the color of the arc. Only for the circle style.
If set, displays completion percent as text. Only for the circle style.
Same as active(1)
Same as active(0)
"style" can be 'drops', 'circle' or 'spiral'. "drops" shows drops with fading colors. The "circle" style features an arc moving around a circle. "spiral" shows a spinning spiral. The default is 'drops'.
An integer value between 0 and 100, shows completion percentage. Only for the circle style.
Same as active(!active)

SEE ALSO

Prima. Prima::Widget, examples/spinner.pl

AUTHOR

Maximilian Lika

2024-02-01 perl v5.38.2