# WoopsiUI::ProgressBar Class Reference

`#include <progressbar.h>`

Inheritance diagram for WoopsiUI::ProgressBar:

List of all members.

## Public Member Functions
| ProgressBar (s16 x, s16 y, u16 width, u16 height)
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 |
| ) |  |  |

Constructor.

Parameters:

  | x | The x co-ord of the progress bar, relative to its parent.
  | y | The y co-ord of the progress bar, relative to its parent.
  | width | The width of the progress bar.
  | height | The height of the progress bar.

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:

  | port | The 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:

  | port | The 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:

  | value | The largest value.

void WoopsiUI::ProgressBar::setMinimumValue | ( | const s16 | value | ) | `[inline]`

Set the smallest value that the progress bar can represent.

Parameters:

  | value | The smallest value.

void WoopsiUI::ProgressBar::setValue | ( | const s16 | value | ) |

Set the value that of the progress bar.

Parameters:

  | value | The new value.

void WoopsiUI::ProgressBar::showPercentageText | ( |  | ) | `[inline]`

Shows the percentage text over the bar.

## Member Data Documentation

s16 WoopsiUI::ProgressBar::_maximumValue`[protected]`

Maximum value that the grip can represent.

s16 WoopsiUI::ProgressBar::_minimumValue`[protected]`

Minimum value that the grip can represent.

bool WoopsiUI::ProgressBar::_showPercentageText`[protected]`

If true, completion percentage is drawn over the bar.

s16 WoopsiUI::ProgressBar::_value`[protected]`

Value of the progress bar.

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

- progressbar.h