wsp::LayerManager Class Reference

Groups layers into one block in which they can be managed. More...

#include <layermanager.h>

List of all members.

Public Member Functions

 LayerManager (u32 boundary)
virtual ~LayerManager ()
 Destructor.
void Append (Layer *layer)
void Insert (Layer *layer, u32 index)
void Remove (Layer *layer)
LayerGetLayerAt (u32 index) const
u32 GetSize () const
void SetViewWindow (s32 x, s32 y, u32 width, u32 height)
void Draw (s32 x, s32 y) const

Protected Attributes

u32 _width
 The width of the viewwindow.
u32 _height
 The height of the viewwindow.
s32 _x
 The X position of the viewwindow.
s32 _y
 The Y position of the viewwindow.


Detailed Description

Groups layers into one block in which they can be managed.

Constructor & Destructor Documentation

wsp::LayerManager::LayerManager ( u32  boundary  ) 

Constructor.

Parameters:
boundary Specifies how many layers can be grouped into this manager.


Member Function Documentation

void wsp::LayerManager::Append ( Layer layer  ) 

Appends a layer at the end, thus drawing it at last.

Parameters:
layer The layer to append. If it is already in the list, it gets removed first.

void wsp::LayerManager::Insert ( Layer layer,
u32  index 
)

Inserts a layer into the manager.

Parameters:
layer The layer to insert. If it is already in the list, it gets removed first.
index The new index of the layer. Can't be bigger than GetSize().

void wsp::LayerManager::Remove ( Layer layer  ) 

Removes a layer from the list.

Parameters:
layer A layer that is in the list.

Layer* wsp::LayerManager::GetLayerAt ( u32  index  )  const

Returns a layer at a specified index.

Parameters:
index The index from where to poll the layer. Can't be bigger than GetSize().
Returns:
A pointer to the layer at the index. NULL if index is out of bounds.

u32 wsp::LayerManager::GetSize (  )  const

Returns the size of the list of layers.

Returns:
The size of the current layerlist.

void wsp::LayerManager::SetViewWindow ( s32  x,
s32  y,
u32  width,
u32  height 
)

Specifies where to view the current scene.

Parameters:
x The upper left corners X position.
y The upper left corners Y position.
width The width of the window.
height The height of the window.

void wsp::LayerManager::Draw ( s32  x,
s32  y 
) const

Draws all the layers in this LayerManager.

Parameters:
x The X offset for drawing.
y The Y offset for drawing.


The documentation for this class was generated from the following file:

Generated on Sat Jun 14 01:36:15 2008 for libwiisprite by  doxygen 1.5.5