Inherits fltk::Widget.
Public Member Functions | |
void | maximum (double nm) |
void | minimum (double nm) |
void | position (double pos) |
void | range (double min, double max, double step=1) |
void | showtext (bool st) |
void | step (double step) |
Protected Member Functions | |
void | draw () |
ProgressBar is a widget meant to display progress of some operation. maximum() and optionally minimum() values should be set, and for each step of operation step() should be called.
void ProgressBar::draw | ( | void | ) | [protected, virtual] |
Fltk calls this virtual function to draw the widget, after setting up the graphics (current window, xy translation, etc) so that any drawing functions will go into this widget.
User code should not call this! You probably want to call redraw().
The default version calls draw_box() and draw_label(), thus drawing the box() to fill the widget and putting the label() and image() inside it to fill it, unless the align() flags are set to put it outside.
Information on how to write your own version is here.
Reimplemented from fltk::Widget.
ProgressBar::maximum | ( | double | nm | ) | [inline] |
Set maximal value for in the progess widget. It should represent operation length.
ProgressBar::minimum | ( | double | nm | ) | [inline] |
Set minimal value for in the progess widget.
ProgressBar::position | ( | double | value | ) | [inline] |
Set position of bar in progress widget and redraw it. If value goes out of minimum()/maximum() bounds, it will be ignored.
ProgressBar::range | ( | double | min, |
double | max, | ||
double | step = 1 |
||
) | [inline] |
A shorthand for minimum(), maximum() and step().
ProgressBar::showtext | ( | bool | st | ) | [inline] |
Shows completition percentage inside progress widget.
ProgressBar::step | ( | double | step | ) | [inline] |
Increase bar length with given step and redraw widget. If value goes out of minimum() and maximum() bounds, it will be ignored.