FLTK Utility Library and Widget Collection (FLU): Flu_Dual_Progress_Meter class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members

# Flu_Dual_Progress_Meter Class Reference

This class provides a simple meter showing both current and total progress that also provides canceling behavior. More...

`#include <Flu_Dual_Progress_Meter.h>`

List of all members.

## Public Member Functions
| Flu_Dual_Progress_Meter (const char *t=NULL)
| Constructor which makes the progress meter with the title t.
virtual | ~Flu_Dual_Progress_Meter ()
| Default destructor.
void | setTitle (const char *t)
| Set the title of the progress meter to t.
const char * | getTitle () const
| the title of this meter
void | setLabel (const char *current, const char *total)
| Convenience routine combining setCurrentLabel() and setTotalLabel().
void | setCurrentLabel (const char *l)
| Set the "current" label displayed during the operation.
void | setTotalLabel (const char *l)
| Set the "total" label displayed during the operation.
const char * | getCurrentLabel () const
| Get the label for the current progress.
const char * | getTotalLabel () const
| Get the label for the total progress.
void | setColor (Fl_Color c)
| Set the color of the progress bar.
Fl_Color | getColor () const
| the current color of the progress bar
bool | setValue (float currentVal, float totalVal)
| Convenience routine combining setCurrentValue() and setTotalValue().
bool | setCurrentValue (float v)
| Set the value of the current progress bar. v should be on [0,1].
bool | setTotalValue (float v)
| Set the value of the total progress bar. v should be on [0,1].
float | getCurrentValue () const
| the current value of the progress bar, on [0,1]
float | getTotalValue () const
| the current value of the progress bar, on [0,1]
void | show (bool cancelBtnVisible=false)
| Show the meter. If cancelBtnVisible is `true`, then the "Cancel" button will be shown.
void | hide ()
| Hide the meter.
bool | shown () const
| `true` if the meter is shown, `false` otherwise
void | cancelCallback (void(*cb)(void *), void *cbd=NULL)
| Set the function that will be called when the "Cancel" button is pressed.
## Static Public Member Functions
void | currentValueCallback (float v, void *arg)
| This function can be registered to update the progress bar.
void | totalValueCallbackd (double v, void *arg)
| This function can be registered to update the progress bar.

## Detailed Description

This class provides a simple meter showing both current and total progress that also provides canceling behavior.

## Member Function Documentation

void Flu_Dual_Progress_Meter::setColor | ( | Fl_Color | c | ) | `[inline]`

| Set the color of the progress bar. Default is FL_BLUE

bool Flu_Dual_Progress_Meter::setCurrentValue | ( | float | v | ) |

| Set the value of the current progress bar. v should be on [0,1]. Returns: `true` if the cancel button has been pressed

bool Flu_Dual_Progress_Meter::setTotalValue | ( | float | v | ) |

| Set the value of the total progress bar. v should be on [0,1]. Returns: `true` if the cancel button has been pressed

The documentation for this class was generated from the following file:

- Flu_Dual_Progress_Meter.h