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

Flu_Progress_Meter Class Reference

This class provides a simple progress meter with elapsed time, estimated time to completion, and optional canceling behavior. More...

#include <Flu_Progress_Meter.h>

List of all members.

Public Member Functions

 Flu_Progress_Meter (const char *t=NULL)
 Constructor which makes the progress meter with the title t.

virtual ~Flu_Progress_Meter ()
 Default destructor.

void title (const char *t)
 Set the title of the progress meter to t.

const char * title () const
 the title of this meter

void label (const char *l)
 Set the label that is displayed during the operation to l.

const char * label () const
 Get the label that is currently displayed.

void color (Fl_Color c)
 Set the color of the progress bar. Default is FL_BLUE.

Fl_Color color () const
 the current color of the progress bar

bool value (float v)
 Set the value of the progress bar. v should be on [0,1].

float value () const
 the current value of the progress bar, on [0,1]

void show_completion_time (bool b)
 Set whether to show the estimated time to completion of the operation. Default is true.

bool show_completion_time () const
 Get whether to show the estimated time to completion of the operation.

void show (bool withCancelButton=false)
 Show the meter. If withCancelButton is true, then the "Cancel" button will be shown.

void reset ()
void hide ()
 Hide the meter.

void cancel_callback (void(*cb)(void *), void *cbd=NULL)
 Set the function that will be called when the "Cancel" button is pressed.


Static Public Member Functions

void value_callback (float v, void *arg)
 This function can be registered to update the progress bar.

void value_callbackd (double v, void *arg)
 This function can be registered to update the progress bar.

bool cvalue_callback (float v, void *arg)
 This function can be registered to update the progress bar.

bool cvalue_callbackd (double v, void *arg)
 This function can be registered to update the progress bar.


Detailed Description

This class provides a simple progress meter with elapsed time, estimated time to completion, and optional canceling behavior.


Member Function Documentation

bool Flu_Progress_Meter::value float  v  ) 
 

Set the value of the 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:
Generated on Fri Nov 5 12:41:32 2004 for FLTK Utility Library and Widget Collection (FLU) by doxygen 1.3.5