Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

DemoActionEngine Class Reference

DemoActionEngine demonstrates the implementation of a customized ActionEngine. More...

#include <DemoActionEngine.h>

Inheritance diagram for DemoActionEngine

Inheritance graph

[legend]
Collaboration diagram for DemoActionEngine:

Collaboration graph

[legend]
List of all members.

Public Methods

 DemoActionEngine ()
 ~DemoActionEngine ()
void restart ()
 Reset the ActionEngine. More...

void nextPeriod ()
 Progress to the next period. More...

WinLockInitType getWinLockMode () const
 This method is invoked before the draw() method in order to find out, whether the background of the drawing canvas shall be left untouched since the last draw, erased to white, or you don't care. More...

void draw (RectangleType *bounds) const
 Draw the visual appearance of the action onto the canvas. More...

void receiveEvent (const EventType* evtPtr)
 Receive an input event. More...

void* getRestoreStateBuffer ()
 Get the restore buffer. More...

void releaseRestoreStateBuffer (void* ) const
 Release the restore buffer. More...

void* getSaveStateBuffer ()
 Get the save buffer. More...

void releaseSaveStateBuffer (void* ) const
 Release the save buffer. More...

Int16 getStateBufferSize () const
 Return the size of the buffer which contains the state. More...

void restoreState (void *stateBuffer)
 Set the current state from the restore buffer. More...


Detailed Description

DemoActionEngine demonstrates the implementation of a customized ActionEngine.

Definition at line 28 of file DemoActionEngine.h.


Constructor & Destructor Documentation

DemoActionEngine::DemoActionEngine ( )
 

Definition at line 32 of file DemoActionEngine.h.

DemoActionEngine::~DemoActionEngine ( ) [inline]
 

Definition at line 43 of file DemoActionEngine.h.


Member Function Documentation

void DemoActionEngine::draw ( RectangleType * bounds ) const [inline, virtual]
 

Draw the visual appearance of the action onto the canvas.

Parameters:
bounds   this needs to be filled in with the coordinates of the area that was modified by the paint operations.

Reimplemented from ActionEngine.

Definition at line 124 of file DemoActionEngine.h.

void * DemoActionEngine::getRestoreStateBuffer ( ) [inline, virtual]
 

Get the restore buffer.

This buffer will be filled in with the stored state of the ActionEngine and then presented to restoreState.

Reimplemented from ActionEngine.

Definition at line 143 of file DemoActionEngine.h.

void * DemoActionEngine::getSaveStateBuffer ( ) [inline, virtual]
 

Get the save buffer.

The contents of this buffer will be saved away for later restoration.

Reimplemented from ActionEngine.

Definition at line 153 of file DemoActionEngine.h.

Int16 DemoActionEngine::getStateBufferSize ( ) const [inline, virtual]
 

Return the size of the buffer which contains the state.

This size is assumed to be the size of the save state buffer and of the restore state buffer.

Reimplemented from ActionEngine.

Definition at line 163 of file DemoActionEngine.h.

WinLockInitType DemoActionEngine::getWinLockMode ( ) const [inline, virtual]
 

This method is invoked before the draw() method in order to find out, whether the background of the drawing canvas shall be left untouched since the last draw, erased to white, or you don't care.

Don't cache this value, since it might change during each period!

Returns:
Same semantics as initMode parameter of WinScreenLock function of PalmOS 3.5:
  • winLockCopy - Provide the same screen contents as drawn by the last invocation of draw()
  • winLockErase - Erase to white,
  • winLockDontCare - Don't care.

Reimplemented from ActionEngine.

Definition at line 118 of file DemoActionEngine.h.

void DemoActionEngine::nextPeriod ( ) [inline, virtual]
 

Progress to the next period.

Update the internal state of your ActionEngine, but DO NOT DRAW ANYTHING!. Only draw in your draw() operation.

Reimplemented from ActionEngine.

Definition at line 59 of file DemoActionEngine.h.

void DemoActionEngine::receiveEvent ( const EventType * evtPtr ) [inline, virtual]
 

Receive an input event.

The ActionEngine can freely decide whether it wants to react to it, or not.

Reimplemented from ActionEngine.

Definition at line 131 of file DemoActionEngine.h.

void DemoActionEngine::releaseRestoreStateBuffer ( void * stateBuffer ) const [inline, virtual]
 

Release the restore buffer.

This is invoked when the restore buffer is no longer needed.

Reimplemented from ActionEngine.

Definition at line 148 of file DemoActionEngine.h.

void DemoActionEngine::releaseSaveStateBuffer ( void * stateBuffer ) const [inline, virtual]
 

Release the save buffer.

This is invoked when the restore buffer is no longer needed.

Reimplemented from ActionEngine.

Definition at line 158 of file DemoActionEngine.h.

void DemoActionEngine::restart ( ) [inline, virtual]
 

Reset the ActionEngine.

Reimplemented from ActionEngine.

Definition at line 48 of file DemoActionEngine.h.

void DemoActionEngine::restoreState ( void * stateBuffer ) [inline, virtual]
 

Set the current state from the restore buffer.

The buffer is guaranteed to be identical to the one which was returned by getRestoreStateBuffer().

Reimplemented from ActionEngine.

Definition at line 168 of file DemoActionEngine.h.


The documentation for this class was generated from the following file:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 4 Nov 2000