Woopsi 1.3
Nintendo DS Gui Framework
Public Member Functions | Protected Member Functions | Protected Attributes
WoopsiUI::ProgressBar Class Reference

#include <libwoopsi/include/progressbar.h>

Inheritance diagram for WoopsiUI::ProgressBar:
WoopsiUI::Gadget

List of all members.

Public Member Functions

 ProgressBar (s16 x, s16 y, u16 width, u16 height, GadgetStyle *style=NULL)
const s16 getMinimumValue () const
const s16 getMaximumValue () const
const s16 getValue () const
void setMinimumValue (const s16 value)
void setMaximumValue (const s16 value)
void setValue (const s16 value)
void showPercentageText ()
void hidePercentageText ()

Protected Member Functions

virtual void drawContents (GraphicsPort *port)
virtual void drawBorder (GraphicsPort *port)
virtual ~ProgressBar ()
 ProgressBar (const ProgressBar &progressBar)

Protected Attributes

s16 _minimumValue
s16 _maximumValue
s16 _value
bool _showPercentageText

Detailed Description

Gadget providing a horizontal progress bar.


Constructor & Destructor Documentation

WoopsiUI::ProgressBar::ProgressBar ( s16  x,
s16  y,
u16  width,
u16  height,
GadgetStyle style = NULL 
)

Constructor.

Parameters:
xThe x co-ord of the progress bar, relative to its parent.
yThe y co-ord of the progress bar, relative to its parent.
widthThe width of the progress bar.
heightThe height of the progress bar.
styleThe style that the gadget should use. If this is not specified, the gadget will use the values stored in the global defaultGadgetStyle object. The gadget will copy the properties of the style into its own internal style object.
virtual WoopsiUI::ProgressBar::~ProgressBar ( ) [inline, protected, virtual]

Destructor.

WoopsiUI::ProgressBar::ProgressBar ( const ProgressBar progressBar) [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

virtual void WoopsiUI::ProgressBar::drawBorder ( GraphicsPort port) [protected, virtual]

Draw the area of this gadget that falls within the clipping region. Called by the redraw() function to draw all visible regions.

Parameters:
portThe GraphicsPort to draw to.
See also:
redraw()

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::ProgressBar::drawContents ( GraphicsPort port) [protected, virtual]

Draw the area of this gadget that falls within the clipping region. Called by the redraw() function to draw all visible regions.

Parameters:
portThe GraphicsPort to draw to.
See also:
redraw()

Reimplemented from WoopsiUI::Gadget.

const s16 WoopsiUI::ProgressBar::getMaximumValue ( ) const [inline]

Get the largest value that the progress bar can represent.

Returns:
The largest value.
const s16 WoopsiUI::ProgressBar::getMinimumValue ( ) const [inline]

Get the smallest value that the progress bar can represent.

Returns:
The smallest value.
const s16 WoopsiUI::ProgressBar::getValue ( ) const [inline]

Get the current value of the progress bar. return The current progress bar value.

void WoopsiUI::ProgressBar::hidePercentageText ( ) [inline]

Hides the percentage text over the bar.

void WoopsiUI::ProgressBar::setMaximumValue ( const s16  value) [inline]

Set the largest value that the progress bar can represent.

Parameters:
valueThe largest value.
void WoopsiUI::ProgressBar::setMinimumValue ( const s16  value) [inline]

Set the smallest value that the progress bar can represent.

Parameters:
valueThe smallest value.
void WoopsiUI::ProgressBar::setValue ( const s16  value)

Set the value that of the progress bar.

Parameters:
valueThe new value.
void WoopsiUI::ProgressBar::showPercentageText ( ) [inline]

Shows the percentage text over the bar.


Member Data Documentation

Maximum value that the grip can represent.

Minimum value that the grip can represent.

If true, completion percentage is drawn over the bar.

Value of the progress bar.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator