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

Chapter Class Reference

Chapter Class Definition. More...

#include <Chapter.h>

Inheritance diagram for Chapter:

Inheritance graph
[legend]
Collaboration diagram for Chapter:

Collaboration graph
[legend]
List of all members.

Public Methods

 Chapter ()
WDError initRef (void *inNode, IObjectManager *inManager, IObjectEventHandler *inEventHandler)
WDError initRef (Episode *inParent, int inIndex, IObjectEventHandler *inEventHandler)
WDError initNew (Episode *inParent, IObjectEventHandler *inEventHandler)
WDError getSpeed (float *outSpeed)
WDError setSpeed (float inSpeed)
WDError setMusic (Sound *inSound)
WDError getMusic (void **outSoundNode)
WDError setBackground (Image *inBackground)
WDError getBackground (void **outImageNode)
void childChanged (IManagedObject *inTarget, void *inChild)

Private Methods

WDError updateMusicID ()
WDError updateBackgroundID ()

Private Attributes

Image * mImage
Sound * mSound

Detailed Description

Chapter Class Definition.

A Chapter is a part of a Scenario. It has its own background image, its own music and it's own scrolling speed (thus, all those may vary throughout the Scenario).


Constructor & Destructor Documentation

Chapter::Chapter (    ) 
 


Member Function Documentation

void Chapter::childChanged (  IManagedObject *    inTarget,
void *    inChild
)  [virtual]
 

Called when a child of the data node has been modified

Parameters:
inTarget  IManagedObject which was subscribed to the data node
inChild  Data node of the child which has changed

Reimplemented from ManagedObject.

WDError Chapter::getBackground (  void **    outImageNode ) 
 

Returns the Chapter's background Image data node

Parameters:
outImageNode  Chapter's background Image data node

WDError Chapter::getMusic (  void **    outSoundNode ) 
 

Returns the Chapter's music data node

Parameters:
outSoundNode  Chapter's music data node

WDError Chapter::getSpeed (  float *    outSpeed ) 
 

Returns the scrolling speed of the Chapter

Parameters:
outSpeed  scrolling speed

WDError Chapter::initNew (  Episode *    inParent,
IObjectEventHandler *    inEventHandler
) 
 

Creates a new Chapter and adds it to the database

Parameters:
inParent  Formation in which the Chapter is to be added
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError Chapter::initRef (  Episode *    inParent,
int    inIndex,
IObjectEventHandler *    inEventHandler
) 
 

Initializes an existing Chapter based on its parent

Parameters:
inParent  Episode in which the Chapter is
inIndex  Index of the ActorRef in the Episode
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError Chapter::initRef (  void *    inNode,
IObjectManager *    inManager,
IObjectEventHandler *    inEventHandler
) 
 

Initializes an existing Chapter based on data node

Parameters:
inNode  Data node representing the Chapter
inManager  Database from which the data node was taken
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

Reimplemented from ManagedObject.

WDError Chapter::setBackground (  Image *    inBackground ) 
 

Sets the Chapter's background Image

Parameters:
inBackground  Chapter's background Image

WDError Chapter::setMusic (  Sound *    inSound ) 
 

Sets the Chapter's music

Parameters:
inSound  Chapter's music

WDError Chapter::setSpeed (  float    inSpeed ) 
 

Sets the scrolling speed of the Chapter

Parameters:
inSpeed  scrolling speed

WDError Chapter::updateBackgroundID (    )  [private]
 

Updates the background attribute in the database - used when the ID of the referenced Image has changed.

WDError Chapter::updateMusicID (    )  [private]
 

Updates the music attribute in the database - used when the ID of the referenced Music has changed.


Member Data Documentation

Image* Chapter::mImage [private]
 

Image used as the Chapter's background

Sound* Chapter::mSound [private]
 

Sound used as the Chapter's music


The documentation for this class was generated from the following file:
Generated on Mon Apr 15 15:23:12 2002 for WhiteDwarf by doxygen1.2.15