Prima::Spinner - spinner animation widget
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;
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.
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.
color
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)
active(1)
Same as active(0)
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'.
style
drops
circle
spiral
An integer value between 0 and 100, shows completion percentage. Only for the circle style.
Same as active(!active)
active(!active)
Prima. Prima::Widget, examples/spinner.pl
Maximilian Lika
To install Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prima
CPAN shell
perl -MCPAN -e shell install Prima
For more information on module installation, please visit the detailed CPAN module installation guide.