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

#include <libwoopsi/include/scrollbarpanel.h>

Inheritance diagram for WoopsiUI::ScrollbarPanel:
WoopsiUI::Gadget WoopsiUI::ScrollableBase WoopsiUI::GadgetEventHandler

List of all members.

Public Member Functions

 ScrollbarPanel (s16 x, s16 y, u16 width, u16 height, GadgetStyle *style=NULL)
virtual void scroll (s32 dx, s32 dy)
virtual void jump (s32 x, s32 y)
virtual void setAllowsVerticalScroll (bool allow)
virtual void setAllowsHorizontalScroll (bool allow)
virtual void setCanvasWidth (const s32 width)
virtual void setCanvasHeight (const s32 height)
virtual bool allowsVerticalScroll () const
virtual bool allowsHorizontalScroll () const
virtual const s32 getCanvasX () const
virtual const s32 getCanvasY () const
virtual const s32 getCanvasWidth () const
virtual const s32 getCanvasHeight () const
void handleScrollEvent (const GadgetEventArgs &e)
void handleValueChangeEvent (const GadgetEventArgs &e)
ScrollingPanelgetPanel ()

Protected Member Functions

void buildUI ()
virtual void drawContents (GraphicsPort *port)
virtual ~ScrollbarPanel ()
 ScrollbarPanel (const ScrollbarPanel &scrollbarPanel)

Protected Attributes

ScrollingPanel_panel
ScrollbarHorizontal_scrollbarHorizontal
ScrollbarVertical_scrollbarVertical
u8 _scrollbarWidth
u8 _scrollbarHeight
bool _hasVerticalScrollbar
bool _hasHorizontalScrollbar

Detailed Description

Class containing a scrolling panel bordered by scrollbars.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
xThe x co-ordinate of the gadget.
yThe y co-ordinate of the gadget.
widthThe width of the gadget.
heightThe height of the gadget.
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::ScrollbarPanel::~ScrollbarPanel ( ) [inline, protected, virtual]

Destructor.

WoopsiUI::ScrollbarPanel::ScrollbarPanel ( const ScrollbarPanel scrollbarPanel) [inline, protected]

Copy constructor is protected to prevent usage.


Member Function Documentation

virtual bool WoopsiUI::ScrollbarPanel::allowsHorizontalScroll ( ) const [virtual]

Returns true if horizontal scrolling is allowed.

Returns:
True if horizontal scrolling is allowed.

Implements WoopsiUI::ScrollableBase.

virtual bool WoopsiUI::ScrollbarPanel::allowsVerticalScroll ( ) const [virtual]

Returns true if vertical scrolling is allowed.

Returns:
True if vertical scrolling is allowed.

Implements WoopsiUI::ScrollableBase.

void WoopsiUI::ScrollbarPanel::buildUI ( ) [protected]

Creates the child gadgets.

virtual void WoopsiUI::ScrollbarPanel::drawContents ( GraphicsPort port) [protected, virtual]

Draw the area of this gadget that falls within the clipping region. Called by the redraw() function to draw all visible regions.

Parameters:
portThe GraphicsPort to draw to.
See also:
redraw()

Reimplemented from WoopsiUI::Gadget.

virtual const s32 WoopsiUI::ScrollbarPanel::getCanvasHeight ( ) const [virtual]

Gets the height of the virtual canvas.

Returns:
The height of the virtual canvas.

Implements WoopsiUI::ScrollableBase.

virtual const s32 WoopsiUI::ScrollbarPanel::getCanvasWidth ( ) const [virtual]

Gets the width of the virtual canvas.

Returns:
The width of the virtual canvas.

Implements WoopsiUI::ScrollableBase.

virtual const s32 WoopsiUI::ScrollbarPanel::getCanvasX ( ) const [virtual]

Gets the x co-ordinate of the virtual canvas.

Returns:
The x co-ordinate of the virtual canvas.

Implements WoopsiUI::ScrollableBase.

virtual const s32 WoopsiUI::ScrollbarPanel::getCanvasY ( ) const [virtual]

Gets the y co-ordinate of the virtual canvas.

Returns:
The y co-ordinate of the virtual canvas.

Implements WoopsiUI::ScrollableBase.

ScrollingPanel* WoopsiUI::ScrollbarPanel::getPanel ( ) [inline]

Gets a pointer to the ScrollingPanel gadget contained within this gadget.

Returns:
A pointer to the ScrollingPanel gadget.
void WoopsiUI::ScrollbarPanel::handleScrollEvent ( const GadgetEventArgs e) [virtual]

Handle a gadget scroll event.

Parameters:
eThe event data.

Reimplemented from WoopsiUI::GadgetEventHandler.

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

Handle a gadget value change event.

Parameters:
eThe event data.

Reimplemented from WoopsiUI::GadgetEventHandler.

virtual void WoopsiUI::ScrollbarPanel::jump ( s32  x,
s32  y 
) [virtual]

Reposition the panel's scrolling region to the specified co-ordinates.

Parameters:
xThe new x co-ordinate of the scrolling region.
yThe new y co-ordinate of the scrolling region.

Implements WoopsiUI::ScrollableBase.

virtual void WoopsiUI::ScrollbarPanel::scroll ( s32  dx,
s32  dy 
) [virtual]

Scroll the panel by the specified amounts.

Parameters:
dxThe horizontal distance to scroll.
dyThe vertical distance to scroll.

Implements WoopsiUI::ScrollableBase.

virtual void WoopsiUI::ScrollbarPanel::setAllowsHorizontalScroll ( bool  allow) [virtual]

Set whether or not horizontal scrolling is allowed.

Parameters:
allowTrue to allow horizontal scrolling; false to deny it.

Implements WoopsiUI::ScrollableBase.

virtual void WoopsiUI::ScrollbarPanel::setAllowsVerticalScroll ( bool  allow) [virtual]

Set whether or not horizontal scrolling is allowed.

Parameters:
allowTrue to allow horizontal scrolling; false to deny it.

Implements WoopsiUI::ScrollableBase.

virtual void WoopsiUI::ScrollbarPanel::setCanvasHeight ( const s32  height) [virtual]

Sets the height of the virtual canvas.

Parameters:
heightThe height of the virtual canvas.

Implements WoopsiUI::ScrollableBase.

virtual void WoopsiUI::ScrollbarPanel::setCanvasWidth ( const s32  width) [virtual]

Sets the width of the virtual canvas.

Parameters:
widthThe width of the virtual canvas.

Implements WoopsiUI::ScrollableBase.


Member Data Documentation

Indicates the presence of a horizontal scrollbar.

Indicates the presence of a vertical scrollbar.

Internal panel that contains children.

Height of the horizontal scrollbar.

Horizontal scrollbar.

Vertical scrollbar.

Width of the vertical scrollbar.


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