Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes

# WoopsiUI::Range Class Reference

`#include <range.h>`

List of all members.

## Public Member Functions
| Range (s32 minimumValue, s32 maximumValue, s32 span)
| ~Range ()
const s32 | getMinimumValue () const
const s32 | getMaximumValue () const
const s32 | getSpan () const
void | setMinimumValue (const s32 value)
void | setMaximumValue (const s32 value)
void | setSpan (const s32 span)
const s32 | convertValueToScaled (s32 value) const
const s32 | convertScaledToValue (s32 scaledValue) const
## Protected Attributes
s32 | _minimumValue
s32 | _maximumValue
s32 | _span

## Detailed Description

Can scale values to fit within a given range. Used by the slider gadgets to convert from logical values to pixels.

## Constructor & Destructor Documentation

WoopsiUI::Range::Range | ( | s32 | minimumValue,
|  | s32 | maximumValue,
|  | s32 | span
| ) |  |

Constructor.

Parameters:

  minimumValue | The smallest value in the range.
  maximumValue | The largest value in the range.
  span | The size of the scaled range.

WoopsiUI::Range::~Range | ( |  | ) | `[inline]`

Destructor.

## Member Function Documentation

const s32 WoopsiUI::Range::convertScaledToValue | ( | s32 | scaledValue | ) | const

Convert the scaled value back to an unscaled value.

Parameters:

  scaledValue | The scaled value to convert.

Returns:
  The unscaled value.

const s32 WoopsiUI::Range::convertValueToScaled | ( | s32 | value | ) | const

Scale the value to fit within the current range.

Parameters:

  value | The value to scale.

Returns:
  The scaled value.

const s32 WoopsiUI::Range::getMaximumValue | ( |  | ) | const`[inline]`

Get the maximum value in the range.

Returns:
  The maximum value in the range.

const s32 WoopsiUI::Range::getMinimumValue | ( |  | ) | const`[inline]`

Get the minimum value in the range.

Returns:
  The minimum value in the range.

const s32 WoopsiUI::Range::getSpan | ( |  | ) | const`[inline]`

Get the size of the scaled range.

Returns:
  The size of the scaled range.

void WoopsiUI::Range::setMaximumValue | ( | const s32 | value | ) | `[inline]`

Set the maximum value of the range.

Parameters:

  value | The maximum value of the range.

void WoopsiUI::Range::setMinimumValue | ( | const s32 | value | ) | `[inline]`

Set the minimum value of the range.

Parameters:

  value | The minimum value of the range.

void WoopsiUI::Range::setSpan | ( | const s32 | span | ) | `[inline]`

Set the size of the scaled range.

Parameters:

  span | The size of the scaled range.

## Member Data Documentation

s32 WoopsiUI::Range::_maximumValue`[protected]`

Maximum value that the range can represent.

s32 WoopsiUI::Range::_minimumValue`[protected]`

Minimum value that the range can represent.

s32 WoopsiUI::Range::_span`[protected]`

Size of the area representing the range.

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

- range.h