Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

PG_ProgressBar Class Reference

Inheritance diagram for PG_ProgressBar:

Inheritance graph
[legend]
Collaboration diagram for PG_ProgressBar:

Collaboration graph
[legend]
List of all members.

Detailed Description

A progress bar.

Author:
Alexander Pipelka

Displays progress by taking a percentage and sizing the bar appropriately.

Examples:

paratest.cpp.


Public Member Functions

 PG_ProgressBar (PG_Widget *parent, const PG_Rect &r=PG_Rect::null, const char *style="Progressbar")
 ~PG_ProgressBar ()
void SetProgress (double p)
 Set the progress of the widget.

void LoadThemeStyle (const char *widgettype)
 Load a specific themestyle.

void SetDrawPercentage (bool drawit=true)
 Toggle drawing of the percentage text.


Protected Member Functions

void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 overridable eventhandler to blit the widget contents to the screen


Constructor & Destructor Documentation

PG_ProgressBar::PG_ProgressBar PG_Widget parent,
const PG_Rect r = PG_Rect::null,
const char *  style = "Progressbar"
 

PG_ProgressBar::~PG_ProgressBar  ) 
 


Member Function Documentation

void PG_ProgressBar::eventBlit SDL_Surface *  surface,
const PG_Rect src,
const PG_Rect dst
[protected, virtual]
 

overridable eventhandler to blit the widget contents to the screen

Parameters:
surface pointer to SDL_Surface to be blitted
src source rectangle (client coordinates)
dst destination rectangle (screen coordinates) Override this eventhandler to perform custom blitting behaviour (without drawing onto the widget surface).

Reimplemented from PG_ThemeWidget.

void PG_ProgressBar::LoadThemeStyle const char *  widgettype  ) 
 

Load a specific themestyle.

Parameters:
widgettype name of widget type to load

Reimplemented from PG_ThemeWidget.

void PG_ProgressBar::SetDrawPercentage bool  drawit = true  ) 
 

Toggle drawing of the percentage text.

Parameters:
drawit whether or not to draw the percentage

void PG_ProgressBar::SetProgress double  p  ) 
 

Set the progress of the widget.

Note:
The progress, p, should be a double between 0.0 and 100.0.
Parameters:
p new progress


The ParaGUI Project - Alexander Pipelka