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

#include <libwoopsi/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:
minimumValueThe smallest value in the range.
maximumValueThe largest value in the range.
spanThe 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:
scaledValueThe 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:
valueThe 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:
valueThe maximum value of the range.
void WoopsiUI::Range::setMinimumValue ( const s32  value) [inline]

Set the minimum value of the range.

Parameters:
valueThe minimum value of the range.
void WoopsiUI::Range::setSpan ( const s32  span) [inline]

Set the size of the scaled range.

Parameters:
spanThe size of the scaled range.

Member Data Documentation

Maximum value that the range can represent.

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:
 All Classes Functions Variables Enumerations Enumerator