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

#include <libwoopsi/include/scrollbarhorizontal.h>

Inheritance diagram for WoopsiUI::ScrollbarHorizontal:
WoopsiUI::SliderBase WoopsiUI::Gadget WoopsiUI::GadgetEventHandler

List of all members.

Public Member Functions

 ScrollbarHorizontal (s16 x, s16 y, u16 width, u16 height, GadgetStyle *style=NULL)
const s16 getMinimumValue () const
const s16 getMaximumValue () const
const s32 getValue () const
const s16 getPageSize () const
void setMinimumValue (const s16 value)
void setMaximumValue (const s16 value)
void setValue (const s32 value)
void setPageSize (const s16 pageSize)
virtual void handleActionEvent (const GadgetEventArgs &e)
virtual void handleClickEvent (const GadgetEventArgs &e)
virtual void handleReleaseEvent (const GadgetEventArgs &e)
virtual void handleReleaseOutsideEvent (const GadgetEventArgs &e)
virtual void handleValueChangeEvent (const GadgetEventArgs &e)

Protected Member Functions

virtual void onResize (u16 width, u16 height)
virtual ~ScrollbarHorizontal ()
 ScrollbarHorizontal (const ScrollbarHorizontal &scrollbarHorizontal)

Protected Attributes

SliderHorizontal_slider
Button_leftButton
Button_rightButton
u8 _buttonWidth
u8 _scrollTimeout
WoopsiTimer_timer

Detailed Description

Container class that holds a slider gadget and two arrow buttons. The interface is presents is virtually identical to the SliderHorizontal gadget, which means the two are easily interchangeable. All events raised by the internal slider gadget are re-raised by this gadget to this gadget's event handler, meaning its events are also identical to the SliderHorizontal's.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
xThe x co-ord of the slider, relative to its parent.
yThe y co-ord of the slider, relative to its parent.
widthThe width of the slider.
heightThe height of the slider.
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::ScrollbarHorizontal::~ScrollbarHorizontal ( ) [inline, protected, virtual]

Destructor.

WoopsiUI::ScrollbarHorizontal::ScrollbarHorizontal ( const ScrollbarHorizontal scrollbarHorizontal) [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

const s16 WoopsiUI::ScrollbarHorizontal::getMaximumValue ( ) const [virtual]

Get the largest value that the slider can represent.

Returns:
The largest value.

Implements WoopsiUI::SliderBase.

const s16 WoopsiUI::ScrollbarHorizontal::getMinimumValue ( ) const [virtual]

Get the smallest value that the slider can represent.

Returns:
The smallest value.

Implements WoopsiUI::SliderBase.

const s16 WoopsiUI::ScrollbarHorizontal::getPageSize ( ) const [virtual]

Get the value represented by the height of the grip. For sliders, this would typically be 1 (so each new grip position is worth 1). For scrollbars, this would be the height of the scrolling gadget.

Returns:
The page size.

Implements WoopsiUI::SliderBase.

const s32 WoopsiUI::ScrollbarHorizontal::getValue ( ) const [virtual]

Get the current value of the slider. return The current slider value.

Implements WoopsiUI::SliderBase.

virtual void WoopsiUI::ScrollbarHorizontal::handleActionEvent ( const GadgetEventArgs e) [virtual]

Process events fired by the grip.

Parameters:
eThe event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarHorizontal::handleClickEvent ( const GadgetEventArgs e) [virtual]

Process events fired by the grip.

Parameters:
eThe event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarHorizontal::handleReleaseEvent ( const GadgetEventArgs e) [virtual]

Process events fired by the grip.

Parameters:
eThe event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarHorizontal::handleReleaseOutsideEvent ( const GadgetEventArgs e) [virtual]

Process events fired by the grip.

Parameters:
eThe event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarHorizontal::handleValueChangeEvent ( const GadgetEventArgs e) [virtual]

Process events fired by the grip.

Parameters:
eThe event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarHorizontal::onResize ( u16  width,
u16  height 
) [protected, virtual]

Resize the scrollbar to the new dimensions.

Parameters:
widthThe new width.
heightThe new height.

Reimplemented from WoopsiUI::Gadget.

void WoopsiUI::ScrollbarHorizontal::setMaximumValue ( const s16  value) [virtual]

Set the largest value that the slider can represent.

Parameters:
valueThe largest value.

Implements WoopsiUI::SliderBase.

void WoopsiUI::ScrollbarHorizontal::setMinimumValue ( const s16  value) [virtual]

Set the smallest value that the slider can represent.

Parameters:
valueThe smallest value.

Implements WoopsiUI::SliderBase.

void WoopsiUI::ScrollbarHorizontal::setPageSize ( const s16  pageSize) [virtual]

Set the page size represented by the grip.

Parameters:
pageSizeThe page size.
See also:
getPageSize().

Implements WoopsiUI::SliderBase.

void WoopsiUI::ScrollbarHorizontal::setValue ( const s32  value) [virtual]

Set the value that of the slider. This will reposition and mark grip for redraw.

Parameters:
valueThe new value.

Implements WoopsiUI::SliderBase.


Member Data Documentation

Width of the buttons

Pointer to the left button

Pointer to the right button

VBLs needed until a button triggers another grip movement

Pointer to the slider gadget

Controls slider button repeats


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