Planeshift
Public Member Functions | Static Public Member Functions

pawsProgressBar Class Reference

#include <pawsprogressbar.h>

List of all members.

Public Member Functions

void Completed ()
virtual void Draw ()
 Draws the widget and all of it's children.
float GetCurrentValue ()
float GetDangerLevel ()
 return the current "Danger" level
float GetFlashLevel ()
 return the current "flash" level
float GetTotalValue () const
float GetWarningLevel ()
 return the current "Warn" level
bool IsDone ()
void OnUpdateData (const char *dataname, PAWSData &value)
 pawsProgressBar (const pawsProgressBar &origin)
 pawsProgressBar ()
virtual void SetColor (int red, int green, int blue)
 set the base color
void SetCurrentValue (float newValue)
virtual void SetDangerColor (int red, int green, int blue)
 Set Danger Color.
virtual void SetDangerLevel (float level, bool low)
 set threshold for danger color
virtual void SetFlashColor (int red, int green, int blue)
 Set flash color.
virtual void SetFlashLevel (float level, bool low)
 Set threshold for flashing numbers outside of min & max = no flash.
virtual void SetFlashRate (int rate)
 Set rate of flash.
void SetOn (bool val)
void SetReversed (bool val)
 increse values from left-to-right, or right-to-left ?
void SetTotalValue (float newValue)
bool Setup (iDocumentNode *node)
 Setup this widget.
virtual void SetWarningColor (int red, int green, int blue)
 Set warn color.
virtual void SetWarningLevel (float level, bool low)
 Set threshold for warn color.
 ~pawsProgressBar ()

Static Public Member Functions

static void DrawProgressBar (const csRect &rect, iGraphics3D *graphics3D, float percent, int start_r, int start_g, int start_b, int diff_r, int diff_g, int diff_b, int alpha=255)

Detailed Description

Definition at line 28 of file pawsprogressbar.h.


Constructor & Destructor Documentation

pawsProgressBar::pawsProgressBar ( )
pawsProgressBar::pawsProgressBar ( const pawsProgressBar origin)
pawsProgressBar::~pawsProgressBar ( )

Member Function Documentation

void pawsProgressBar::Completed ( ) [inline]

Definition at line 109 of file pawsprogressbar.h.

virtual void pawsProgressBar::Draw ( ) [virtual]

Draws the widget and all of it's children.

Remarks:
Uses clipping rect of it's parent to define drawing area. If the drawing area defined is empty it returns.

Reimplemented from pawsWidget.

static void pawsProgressBar::DrawProgressBar ( const csRect &  rect,
iGraphics3D *  graphics3D,
float  percent,
int  start_r,
int  start_g,
int  start_b,
int  diff_r,
int  diff_g,
int  diff_b,
int  alpha = 255 
) [static]
float pawsProgressBar::GetCurrentValue ( ) [inline]

Definition at line 114 of file pawsprogressbar.h.

float pawsProgressBar::GetDangerLevel ( )

return the current "Danger" level

float pawsProgressBar::GetFlashLevel ( )

return the current "flash" level

float pawsProgressBar::GetTotalValue ( ) const [inline]

Definition at line 35 of file pawsprogressbar.h.

float pawsProgressBar::GetWarningLevel ( )

return the current "Warn" level

bool pawsProgressBar::IsDone ( ) [inline]

Definition at line 125 of file pawsprogressbar.h.

void pawsProgressBar::OnUpdateData ( const char *  dataname,
PAWSData value 
) [virtual]

Reimplemented from pawsWidget.

virtual void pawsProgressBar::SetColor ( int  red,
int  green,
int  blue 
) [virtual]

set the base color

Parameters:
redred saturation value
greengreen saturation value
blueblue saturation value
void pawsProgressBar::SetCurrentValue ( float  newValue)
virtual void pawsProgressBar::SetDangerColor ( int  red,
int  green,
int  blue 
) [virtual]

Set Danger Color.

Parameters:
redred saturation value
greengreen saturation value
blueblue saturation value
virtual void pawsProgressBar::SetDangerLevel ( float  level,
bool  low 
) [virtual]

set threshold for danger color

Parameters:
levelthreshold
lowif TRUE then active below this level; if FALSE active above.
virtual void pawsProgressBar::SetFlashColor ( int  red,
int  green,
int  blue 
) [virtual]

Set flash color.

Parameters:
redred saturation value
greengreen saturation value
blueblue saturation value
virtual void pawsProgressBar::SetFlashLevel ( float  level,
bool  low 
) [virtual]

Set threshold for flashing numbers outside of min & max = no flash.

default = no flash.

Parameters:
valuewithin this threshold, flash; outside it, no flash.
lowif TRUE then flash below this level; if FALSE flash above.
virtual void pawsProgressBar::SetFlashRate ( int  rate) [virtual]

Set rate of flash.

Parameters:
rateswitch colors every 'rate' ticks
void pawsProgressBar::SetOn ( bool  val)
void pawsProgressBar::SetReversed ( bool  val)

increse values from left-to-right, or right-to-left ?

Parameters:
leftFALSE = left-to-right (default); TRUE = right-to-left (reversed)
void pawsProgressBar::SetTotalValue ( float  newValue) [inline]

Definition at line 39 of file pawsprogressbar.h.

bool pawsProgressBar::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsWidget.

virtual void pawsProgressBar::SetWarningColor ( int  red,
int  green,
int  blue 
) [virtual]

Set warn color.

Parameters:
redred saturation value
greengreen saturation value
blueblue saturation value
virtual void pawsProgressBar::SetWarningLevel ( float  level,
bool  low 
) [virtual]

Set threshold for warn color.

Parameters:
levelthreshold
lowif TRUE then active below this level; if FALSE active above.

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