GClasses
GClasses::GWidgetProgressBar Class Reference

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.

#include <GWidgets.h>

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

Public Member Functions

 GWidgetProgressBar (GWidgetGroup *pParent, int x, int y, int w, int h)
 
virtual ~GWidgetProgressBar ()
 
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y) More...
 
float progress ()
 Gets the current position of the progress bar (from 0 to 1) More...
 
void setProgress (float fProgress)
 Sets the current position of the progress bar (from 0 to 1) More...
 
virtual WidgetType type ()
 
- Public Member Functions inherited from GClasses::GWidgetAtomic
 GWidgetAtomic (GWidgetGroup *pParent, int x, int y, int w, int h)
 
virtual ~GWidgetAtomic ()
 
virtual bool isAtomic ()
 
virtual bool isClickable ()
 
virtual void onChar (char c)
 
virtual void onGetFocus ()
 
virtual void onLoseFocus ()
 
virtual void onMouseMove (int dx, int dy)
 
virtual void onSpecialKey (int key)
 
- Public Member Functions inherited from GClasses::GWidget
 GWidget (GWidgetGroup *m_pParent, int x, int y, int w, int h)
 
virtual ~GWidget ()
 
int id ()
 
GWidgetGroupparent ()
 
GRectrect ()
 
void setPos (int x, int y)
 

Protected Attributes

float m_fProgress
 
- Protected Attributes inherited from GClasses::GWidget
GWidgetCommonm_common
 
int m_nID
 
GWidgetGroupm_pParent
 
GRect m_rect
 

Additional Inherited Members

- Public Types inherited from GClasses::GWidget
- Protected Member Functions inherited from GClasses::GWidgetAtomic
virtual void grab (int button, int x, int y)
 
virtual void release (int button)
 

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 ( )
inlinevirtual

Implements GClasses::GWidget.

Member Data Documentation

float GClasses::GWidgetProgressBar::m_fProgress
protected