WoopsiUI::ScrollingPanel Class Reference
#include <scrollingpanel.h>
List of all members.
Public Member Functions |
| ScrollingPanel (s16 x, s16 y, u16 width, u16 height, u32 flags, FontBase *font=NULL) |
virtual void | draw (Rect clipRect) |
virtual bool | drag (s16 x, s16 y, s16 vX, s16 vY) |
virtual void | scroll (s32 dx, s32 dy) |
virtual void | jump (s32 x, s32 y) |
Protected Member Functions |
void | scrollChildren (s32 dx, s32 dy) |
void | drawChildren (Rect clipRect) |
bool | clipToClientRect (Rect &clipRect) |
void | raiseScrollEvent () |
virtual | ~ScrollingPanel () |
| ScrollingPanel (const ScrollingPanel &scrollingPanel) |
Detailed Description
Class containing a scrollable region. Responds to stylus movement. Uses hardware- accelerated copying to reduce the amount of drawing required, where possible. Can contain sub-gadgets which will also be scrolled.
Constructor & Destructor Documentation
ScrollingPanel::ScrollingPanel |
( |
s16 |
x, |
|
|
s16 |
y, |
|
|
u16 |
width, |
|
|
u16 |
height, |
|
|
u32 |
flags, |
|
|
FontBase * |
font = NULL | |
|
) |
| | |
Constructor.
- Parameters:
-
| x | The x co-ordinate of the gadget. |
| y | The y co-ordinate of the gadget. |
| width | The width of the gadget. |
| height | The height of the gadget. |
| flags | The usual gadget flags. |
| font | Pointer to a font object to use for text output. |
virtual WoopsiUI::ScrollingPanel::~ScrollingPanel |
( |
|
) |
[inline, protected, virtual] |
WoopsiUI::ScrollingPanel::ScrollingPanel |
( |
const ScrollingPanel & |
scrollingPanel |
) |
[inline, protected] |
Copy constructor is protected to prevent usage.
Member Function Documentation
bool ScrollingPanel::clipToClientRect |
( |
Rect & |
clipRect |
) |
[protected] |
Clips the properties of the supplied rect so that it fits within the panel's client region.
- Parameters:
-
| clipRect | The rect to clip. |
bool ScrollingPanel::drag |
( |
s16 |
x, |
|
|
s16 |
y, |
|
|
s16 |
vX, |
|
|
s16 |
vY | |
|
) |
| | [virtual] |
Drag the gadget at the specified co-ordinates.
- Parameters:
-
| x | The x co-ordinate of the drag. |
| y | The y co-ordinate of the drag. |
| vX | The horizontal distance that the gadget was dragged. |
| vY | The vertical distance that the gadget was dragged. |
- Returns:
- True if the drag was successful.
Reimplemented from WoopsiUI::Gadget.
void ScrollingPanel::draw |
( |
Rect |
clipRect |
) |
[virtual] |
void WoopsiUI::ScrollingPanel::drawChildren |
( |
Rect |
clipRect |
) |
[protected] |
Draws all child gadgets within the supplied clipping region.
- Parameters:
-
| clipRect | The clipping region to draw within. |
void ScrollingPanel::jump |
( |
s32 |
x, |
|
|
s32 |
y | |
|
) |
| | [virtual] |
Reposition the panel's scrolling region to the specified co-ordinates.
- Parameters:
-
| x | The new x co-ordinate of the scrolling region. |
| y | The new y co-ordinate of the scrolling region. |
Implements WoopsiUI::ScrollableBase.
void ScrollingPanel::raiseScrollEvent |
( |
|
) |
[protected] |
Raises a scroll event. Fired when the panel scrolls.
void ScrollingPanel::scroll |
( |
s32 |
dx, |
|
|
s32 |
dy | |
|
) |
| | [virtual] |
Scroll the panel by the specified amounts.
- Parameters:
-
| dx | The horizontal distance to scroll. |
| dy | The vertical distance to scroll. |
Implements WoopsiUI::ScrollableBase.
void ScrollingPanel::scrollChildren |
( |
s32 |
dx, |
|
|
s32 |
dy | |
|
) |
| | [protected] |
Scroll all child gadgets by the specified amounts. Actually uses the gadget's moveTo() function to reposition them.
- Parameters:
-
| dx | The horizontal distance to scroll. |
| dy | The vertical distance to scroll. |
The documentation for this class was generated from the following files:
- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/scrollingpanel.h
- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.39/Woopsi/woopsi/scrollingpanel.cpp