WoopsiUI::ScrollbarVertical Class Reference

#include <scrollbarvertical.h>

Inheritance diagram for WoopsiUI::ScrollbarVertical:
WoopsiUI::Gadget WoopsiUI::GadgetEventHandler

List of all members.

Public Member Functions

 ScrollbarVertical (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 ~ScrollbarVertical ()
 ScrollbarVertical (const ScrollbarVertical &scrollbarVertical)

Protected Attributes

SliderVertical_slider
Button_upButton
Button_downButton
u8 _buttonHeight
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 SliderVertical 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 SliderVertical's.


Constructor & Destructor Documentation

ScrollbarVertical::ScrollbarVertical ( 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::ScrollbarVertical::~ScrollbarVertical (  )  [inline, protected, virtual]

Destructor.

WoopsiUI::ScrollbarVertical::ScrollbarVertical ( const ScrollbarVertical scrollbarVertical  )  [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

void ScrollbarVertical::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 ScrollbarVertical::getMaximumValue (  )  const

Get the largest value that the slider can represent.

Returns:
The largest value.
const s16 ScrollbarVertical::getMinimumValue (  )  const

Get the smallest value that the slider can represent.

Returns:
The smallest value.
const s16 ScrollbarVertical::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 ScrollbarVertical::getValue (  )  const

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

void ScrollbarVertical::handleActionEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void ScrollbarVertical::handleClickEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void ScrollbarVertical::handleReleaseEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void ScrollbarVertical::handleReleaseOutsideEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void ScrollbarVertical::handleValueChangeEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void ScrollbarVertical::jumpGrip ( u8  direction  ) 

Make the grip jump up or down the gutter.

Parameters:
direction 0 to jump up, 1 to jump down.
bool ScrollbarVertical::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 ScrollbarVertical::setButtonScrollAmount ( const u16  buttonScrollAmount  ) 

Set the amount scrolled by the arrow buttons

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

Set the largest value that the slider can represent.

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

Set the smallest value that the slider can represent.

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

Set the page size represented by the grip.

Parameters:
pageSize The page size.
See also:
getPageSize().
void ScrollbarVertical::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

Height of the buttons

Amount that the grip moves when a button is clicked

Pointer to the down button

VBLs needed until a button triggers another grip movement

Pointer to the slider gadget

Controls slider button repeats

Pointer to the up button


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

Generated on Sat Oct 24 14:33:11 2009 for Woopsi by  doxygen 1.6.1