WoopsiUI::ScrollbarHorizontal Class Reference

#include <scrollbarhorizontal.h>

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

List of all members.

Public Member Functions

 ScrollbarHorizontal (s16 x, s16 y, u16 width, u16 height, FontBase *font=NULL)
const s16 getMinimumValue () const
const s16 getMaximumValue () const
const s16 getValue () const
const s16 getPageSize () const
void setMinimumValue (const s16 value)
void setMaximumValue (const s16 value)
void setValue (const s16 value)
void setPageSize (const s16 pageSize)
void setButtonScrollAmount (const u16 buttonScrollAmount)
void jumpGrip (u8 direction)
virtual void draw (Rect clipRect)
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)
virtual bool resize (u16 width, u16 height)

Protected Member Functions

virtual ~ScrollbarHorizontal ()
 ScrollbarHorizontal (const ScrollbarHorizontal &scrollbarHorizontal)

Protected Attributes

SliderHorizontal_slider
Button_leftButton
Button_rightButton
u8 _buttonWidth
u16 _buttonScrollAmount
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,
FontBase font = NULL 
)

Constructor.

Parameters:
x The x co-ord of the slider, relative to its parent.
y The y co-ord of the slider, relative to its parent.
width The width of the slider.
height The height of the slider.
font The font to use for this gadget.
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

virtual void WoopsiUI::ScrollbarHorizontal::draw ( Rect  clipRect  )  [virtual]

Draw the region of the slider that falls within the clipping rect. Use draw() instead in most circumstances.

Parameters:
clipRect The clipping region.

Reimplemented from WoopsiUI::Gadget.

const s16 WoopsiUI::ScrollbarHorizontal::getMaximumValue (  )  const

Get the largest value that the slider can represent.

Returns:
The largest value.
const s16 WoopsiUI::ScrollbarHorizontal::getMinimumValue (  )  const

Get the smallest value that the slider can represent.

Returns:
The smallest value.
const s16 WoopsiUI::ScrollbarHorizontal::getPageSize (  )  const

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.
const s16 WoopsiUI::ScrollbarHorizontal::getValue (  )  const

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

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

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

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

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

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

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

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

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

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

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void WoopsiUI::ScrollbarHorizontal::jumpGrip ( u8  direction  ) 

Make the grip jump up or down the gutter.

Parameters:
direction 0 to jump left, 1 to jump right.
virtual bool WoopsiUI::ScrollbarHorizontal::resize ( u16  width,
u16  height 
) [virtual]

Resize the scrollbar to the new dimensions.

Parameters:
width The new width.
height The new height.
Returns:
True if the resize was successful.

Reimplemented from WoopsiUI::Gadget.

void WoopsiUI::ScrollbarHorizontal::setButtonScrollAmount ( const u16  buttonScrollAmount  ) 

Set the amount scrolled by the arrow buttons

Parameters:
buttonScrollAmount The amount to scroll.
void WoopsiUI::ScrollbarHorizontal::setMaximumValue ( const s16  value  ) 

Set the largest value that the slider can represent.

Parameters:
value The largest value.
void WoopsiUI::ScrollbarHorizontal::setMinimumValue ( const s16  value  ) 

Set the smallest value that the slider can represent.

Parameters:
value The smallest value.
void WoopsiUI::ScrollbarHorizontal::setPageSize ( const s16  pageSize  ) 

Set the page size represented by the grip.

Parameters:
pageSize The page size.
See also:
getPageSize().
void WoopsiUI::ScrollbarHorizontal::setValue ( const s16  value  ) 

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

Parameters:
value The new value.

Member Data Documentation

Amount that the grip moves when a button is clicked

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:

Generated on Sun Nov 15 11:35:37 2009 for Woopsi by  doxygen 1.6.1