sptk2 logo
SPTK Home Page

sptk::CProgressBar Class Reference
[GUI Classes]

Progress bar widget. More...

#include <CProgressBar.h>

Inheritance diagram for sptk::CProgressBar:

sptk::CInput sptk::CControl sptk::CLayoutClient

List of all members.

Public Member Functions

 CProgressBar (const char *lbl, int layoutSize=20, CLayoutAlign layoutAlign=SP_ALIGN_TOP)
virtual bool preferredSize (int &w, int &h)
void minimum (float min)
float minimum () const
 Returnes the progress bar minimum value.
void maximum (float max)
float maximum () const
 Returnes the progress bar maximum value.
void units (const char *un)
 Sets progress bar units, default is "%".
std::string units () const
 Returns progress bar units.
void showText (bool flag=true)
virtual CVariant data () const
virtual void data (const CVariant v)
 Universal data connection, sets data to date control.

Static Public Member Functions

static CLayoutClientcreator (CXmlNode *node)
 Creates a widget based on the XML node information.


Detailed Description

Progress bar widget.

The extended version of FLTK's standard Fl_Progress. Added the CLayoutClient interface and preferred size computations.


Constructor & Destructor Documentation

sptk::CProgressBar::CProgressBar ( const char *  lbl,
int  layoutSize = 20,
CLayoutAlign  layoutAlign = SP_ALIGN_TOP 
)

Constructor in SPTK style

Parameters:
lbl const char *, label
layoutSize int, widget align in layout
layoutAlign CLayoutAlign, widget align in layout


Member Function Documentation

static CLayoutClient* sptk::CProgressBar::creator ( CXmlNode node  )  [static]

Creates a widget based on the XML node information.

Parameters:
node CXmlNode*, an XML node with widget information

Reimplemented from sptk::CInput.

virtual CVariant sptk::CProgressBar::data (  )  const [virtual]

Universal data connection, returns data from date control. Data is returned as VAR_FLOAT.

Reimplemented from sptk::CInput.

void sptk::CProgressBar::maximum ( float  max  ) 

Defines the progress bar maximum value The default is 100

void sptk::CProgressBar::minimum ( float  min  ) 

Defines the progress bar minimum value The default is 0

virtual bool sptk::CProgressBar::preferredSize ( int &  w,
int &  h 
) [virtual]

Computes the optimal progress bar size

Parameters:
w int&, input - width offered by the program, output - width required by widget
h int&, input - height offered by the program, output - height required by widget
Returns:
true if the size is stable (doesn't depend on input sizes)

Reimplemented from sptk::CInput.

void sptk::CProgressBar::showText ( bool  flag = true  ) 

Show the progress text or not? The default is true


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

Mon Mar 5 11:56:18 2012: SPTK 3.5.7