Curses::Toolkit::Widget::ProgressBar - progress bar widget base class
version 0.211
# don't use this widget directly
A ProgressBar widget is a widget that displays a progress bar horizontally or vertically
Don't use this widget directly. Please see Curses::Toolkit::Widget::HProgressBar and Curses::Toolkit::Widget::VProgressBar.
The minimum value (a float) for the progress bar. Default to 0.
The maximum value (a float) for the progress bar. Default to 100.
The current value of the progress bar. Default to 0.
What to show in the progress bar. Must be a PROGRESS_BAR_LABEL - check Curses::Toolkit::Types for valid options. Default to percent.
PROGRESS_BAR_LABEL
percent
input: none output: a Curses::Toolkit::Widget::ProgressBar
my @signals = keys $progressbar->possible_signals();
Returns the possible signals that can be used on this widget. See Curses::Toolkit::Widget::signal_connect to bind signals to actions
input: none output: HASH, keys are signal names, values are signal classes
The progress bar accepts no signal.
To set/get a theme properties, you should do :
$progressbar->set_theme_property(property_name => $property_value); $value = $progressbar->get_theme_property('property_name');
Here is the list of properties related to the progressbar, that can be changed in the associated theme. See the Curses::Toolkit::Theme class used for the default (default class to look at is Curses::Toolkit::Theme::Default)
Don't forget to look at properties from the parent class, as these are also inherited from!
The width of the border of the progressbar.
Example: # set the progressbar to have a border of 1 $progressbar->set_theme_property(border_width => 1 );
Sets the value of the default length of the progress bar.
Example : # set default_length $progressbar->set_theme_property(default_length => 10 );
Sets the value of the char used to represent the done portion of the progress bar.
Example : # set char_done $progressbar->set_theme_property(char_done => '=' );
Sets the value of the char used to represent the left portion of the progress bar.
Example : # set char_left $progressbar->set_theme_property(char_left => ' ' );
The string to be displayed at the left/top of the progress bar. Usually some enclosing characters.
Example : # set left/top enclosing $progressbar->set_theme_property(start_enclosing => '< ' ); $progressbar->set_theme_property(start_enclosing => '[ ' );
The string to be displayed at the right/bottom of the progress bar. Usually some enclosing characters.
Example : # set right/bottom enclosing $progressbar->set_theme_property(end_enclosing => ' >' ); $progressbar->set_theme_property(end_enclosing => ' ]' );
Damien "dams" Krotkine
This software is copyright (c) 2011 by Damien "dams" Krotkine.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Curses::Toolkit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Curses::Toolkit
CPAN shell
perl -MCPAN -e shell install Curses::Toolkit
For more information on module installation, please visit the detailed CPAN module installation guide.