WoopsiUI::SliderHorizontal Class Reference

#include <sliderhorizontal.h>

Inheritance diagram for WoopsiUI::SliderHorizontal:
WoopsiUI::Gadget WoopsiUI::GadgetEventHandler

List of all members.

Public Member Functions

 SliderHorizontal (s16 x, s16 y, u16 width, u16 height)
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 jumpGrip (u8 direction)
virtual void draw (Rect clipRect)
virtual bool click (s16 x, s16 y)
virtual void handleDragEvent (const GadgetEventArgs &e)
virtual void handleMoveEvent (const GadgetEventArgs &e)
virtual bool resize (u16 width, u16 height)

Protected Member Functions

virtual ~SliderHorizontal ()
 SliderHorizontal (const SliderHorizontal &sliderHorizontal)
void resizeGrip ()

Protected Attributes

SliderHorizontalGrip_grip
s16 _minimumValue
s16 _maximumValue
s16 _minimumGripWidth
s16 _pageSize

Detailed Description

Gadget providing a sliding "grip" that can be moved left and right in the "gutter". Essentially a scrollbar, but more generic.


Constructor & Destructor Documentation

SliderHorizontal::SliderHorizontal ( s16  x,
s16  y,
u16  width,
u16  height 
)

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

Destructor.

WoopsiUI::SliderHorizontal::SliderHorizontal ( const SliderHorizontal sliderHorizontal  )  [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

bool SliderHorizontal::click ( s16  x,
s16  y 
) [virtual]

Click the slider at the specified co-ordinates.

Parameters:
x The x co-ordinate of the click.
y The y co-ordinate of the click.
Returns:
True if the click was processed by the slider.

Reimplemented from WoopsiUI::Gadget.

void SliderHorizontal::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::SliderHorizontal::getMaximumValue (  )  const [inline]

Get the largest value that the slider can represent.

Returns:
The largest value.
const s16 WoopsiUI::SliderHorizontal::getMinimumValue (  )  const [inline]

Get the smallest value that the slider can represent.

Returns:
The smallest value.
const s16 WoopsiUI::SliderHorizontal::getPageSize (  )  const [inline]

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 SliderHorizontal::getValue (  )  const

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

void SliderHorizontal::handleDragEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void SliderHorizontal::handleMoveEvent ( const GadgetEventArgs e  )  [virtual]

Process events fired by the grip.

Parameters:
e The event details.

Reimplemented from WoopsiUI::GadgetEventHandler.

void SliderHorizontal::jumpGrip ( u8  direction  ) 

Make the grip jump left or right along the gutter.

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

Resize the slider 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 SliderHorizontal::resizeGrip (  )  [protected]

Resize and redraw the grip.

void WoopsiUI::SliderHorizontal::setMaximumValue ( const s16  value  )  [inline]

Set the largest value that the slider can represent.

Parameters:
value The largest value.
void WoopsiUI::SliderHorizontal::setMinimumValue ( const s16  value  )  [inline]

Set the smallest value that the slider can represent.

Parameters:
value The smallest value.
void WoopsiUI::SliderHorizontal::setPageSize ( const s16  pageSize  )  [inline]

Set the page size represented by the grip.

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

Pointer to the grip

Maximum value that the grip can represent

Smallest width that the grip can become

Minimum value that the grip can represent

Value of a page of data, used when clicking the gutter


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

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