Public Member Functions | Private Member Functions | Private Attributes

ProgressBar Class Reference

Shows progress of operations for visual feedback. More...

#include <ProgressBar.h>

Inheritance diagram for ProgressBar:
Control Broadcaster Listener

List of all members.

Public Member Functions

 ProgressBar (const std::string &name, int minWidth=16, int minHeight=16)
void setProgress (double progress)
void showPercent (bool toggle)
void setBarColor (int r, int g, int b)

Private Member Functions

void drawSkin ()
void drawPlain ()
void logic ()

Private Attributes

int mBarWidth
int mBarRed
int mBarGreen
int mBarBlue
double mProgress
bool mShowPercent

Detailed Description

Shows progress of operations for visual feedback.

Note:
Can show percentage or text.

Constructor & Destructor Documentation

ProgressBar::ProgressBar ( const std::string &  name,
int  minWidth = 16,
int  minHeight = 16 
)

Member Function Documentation

void ProgressBar::drawPlain (  )  [private, virtual]

Draws a Control without a Skin.

Reimplemented from Control.

void ProgressBar::drawSkin (  )  [private, virtual]

Draws a Control using a Skin.

Reimplemented from Control.

void ProgressBar::logic (  )  [private, virtual]

Reimplemented from Control.

void ProgressBar::setBarColor ( int  r,
int  g,
int  b 
)
void ProgressBar::setProgress ( double  progress  ) 

Sets/updates the progress value.

Note:
Needs to be a double.
void ProgressBar::showPercent ( bool  toggle  ) 

Sets the ProgressBar to display a percentage text.

Parameters:
Can be true or false.

Member Data Documentation

int ProgressBar::mBarBlue [private]
int ProgressBar::mBarGreen [private]
int ProgressBar::mBarRed [private]
int ProgressBar::mBarWidth [private]

Width of the progress bar.

double ProgressBar::mProgress [private]

Current progress.

bool ProgressBar::mShowPercent [private]

Toggle showing percent.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines