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

ActionEngine Class Reference

ActionEngine defines the interface for the application-specific behavior. More...

#include <ActionEngine.h>

Inheritance diagram for ActionEngine

Inheritance graph

[legend]
List of all members.

Public Methods

 ActionEngine ()
 Construct a new ActionEngine. More...

virtual ~ActionEngine ()
 Destroy the ActionEngine. More...

virtual void restart () = 0
 Reset the ActionEngine. More...

virtual void nextPeriod () = 0
 Progress to the next period. More...

virtual WinLockInitType getWinLockMode () const = 0
 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...

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

Input management
virtual void receiveEvent (const EventType* evtPtr) = 0
 Receive an input event. More...

Save & Restore
virtual void* getSaveStateBuffer () = 0
 Get the save buffer. More...

virtual void releaseSaveStateBuffer (void *stateBuffer) const = 0
 Release the save buffer. More...

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

virtual void* getRestoreStateBuffer () = 0
 Get the restore buffer. More...

virtual void releaseRestoreStateBuffer (void *stateBuffer) const = 0
 Release the restore buffer. More...

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


Detailed Description

ActionEngine defines the interface for the application-specific behavior.

It is triggered in regular intervals and has to react by providing a visual representation of the current state.

Definition at line 39 of file ActionEngine.h.


Constructor & Destructor Documentation

ActionEngine::ActionEngine ( ) [inline]
 

Construct a new ActionEngine.

Definition at line 45 of file ActionEngine.h.

ActionEngine::~ActionEngine ( ) [inline, virtual]
 

Destroy the ActionEngine.

Definition at line 53 of file ActionEngine.h.


Member Function Documentation

void ActionEngine::draw ( RectangleType * bounds ) const [pure 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 in DemoActionEngine.

void * ActionEngine::getRestoreStateBuffer ( ) [pure virtual]
 

Get the restore buffer.

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

Reimplemented in DemoActionEngine.

void * ActionEngine::getSaveStateBuffer ( ) [pure virtual]
 

Get the save buffer.

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

Reimplemented in DemoActionEngine.

Referenced by Presentation::~Presentation().

Int16 ActionEngine::getStateBufferSize ( ) const [pure 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 in DemoActionEngine.

Referenced by Presentation::~Presentation().

WinLockInitType ActionEngine::getWinLockMode ( ) const [pure 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 in DemoActionEngine.

void ActionEngine::nextPeriod ( ) [pure 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 in DemoActionEngine.

Referenced by Presentation::nextPeriod().

void ActionEngine::receiveEvent ( const EventType * evtPtr ) [pure virtual]
 

Receive an input event.

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

Reimplemented in DemoActionEngine.

Referenced by Presentation::receiveEvent().

void ActionEngine::releaseRestoreStateBuffer ( void * stateBuffer ) const [pure virtual]
 

Release the restore buffer.

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

Reimplemented in DemoActionEngine.

void ActionEngine::releaseSaveStateBuffer ( void * stateBuffer ) const [pure virtual]
 

Release the save buffer.

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

Reimplemented in DemoActionEngine.

Referenced by Presentation::~Presentation().

void ActionEngine::restart ( ) [pure virtual]
 

Reset the ActionEngine.

Reimplemented in DemoActionEngine.

void ActionEngine::restoreState ( void * stateBuffer ) [pure 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 in DemoActionEngine.


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