GClasses

GClasses::GWidgetProgressBar Class Reference

Automatically determines wether to be horizontal or vertical based on dimensions. Progress ranges from 0 to 1, or from 0 to -1 if you want it to go the other way. More...

#include <GWidgets.h>

Inheritance diagram for GClasses::GWidgetProgressBar:
GClasses::GWidgetAtomic GClasses::GWidget

List of all members.

Public Member Functions

 GWidgetProgressBar (GWidgetGroup *pParent, int x, int y, int w, int h)
virtual ~GWidgetProgressBar ()
virtual WidgetType type ()
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y)
void setProgress (float fProgress)
 Sets the current position of the progress bar (from 0 to 1)
float progress ()
 Gets the current position of the progress bar (from 0 to 1)

Protected Attributes

float m_fProgress

Detailed Description

Automatically determines wether to be horizontal or vertical based on dimensions. Progress ranges from 0 to 1, or from 0 to -1 if you want it to go the other way.


Constructor & Destructor Documentation

GClasses::GWidgetProgressBar::GWidgetProgressBar ( GWidgetGroup pParent,
int  x,
int  y,
int  w,
int  h 
)
virtual GClasses::GWidgetProgressBar::~GWidgetProgressBar ( ) [virtual]

Member Function Documentation

virtual void GClasses::GWidgetProgressBar::draw ( GImage pCanvas,
int  x,
int  y 
) [virtual]

Draws this widget on pCanvas at (x,y)

Implements GClasses::GWidget.

float GClasses::GWidgetProgressBar::progress ( ) [inline]

Gets the current position of the progress bar (from 0 to 1)

void GClasses::GWidgetProgressBar::setProgress ( float  fProgress)

Sets the current position of the progress bar (from 0 to 1)

virtual WidgetType GClasses::GWidgetProgressBar::type ( ) [inline, virtual]

Implements GClasses::GWidget.


Member Data Documentation