NAME
LibUI::ProgressBar - Control that Visualizes the Progress of a Task
SYNOPSIS
use
LibUI::VBox;
use
LibUI::Window;
use
LibUI::ProgressBar;
Init &&
die
;
my
$window
= LibUI::Window->new(
'Hang on a tick...'
, 320, 100, 0 );
$window
->setMargined( 1 );
my
$box
= LibUI::VBox->new();
my
$progress
= LibUI::ProgressBar->new();
$progress
->setValue(-1);
$box
->append(
$progress
, 1 );
$window
->setChild(
$box
);
$window
->onClosing(
sub
{
Quit();
return
1;
},
undef
);
$window
->show;
Main();
DESCRIPTION
A LibUI::ProgressBar object represents a control that visualizes the progress of a task via the fill level of a horizontal bar.
Indeterminate values are supported via an animated bar.
Functions
Not a lot here but... well, it's just a progress bar.
new( )
my
$progress
= LibUI::ProgressBar->new( );
Creates a new progress bar.
setValue( ... )
$progress
->setValue( 32 );
Sets the progress bar value.
Valid values are [0, 100]
for displaying a solid bar imitating a percent value.
Use a value of -1
to render an animated bar to convey an indeterminate value.
value( )
my
$complete
=
$progress
->value( );
Returns the progress bar value.
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Sanko Robinson <sanko@cpan.org>