gnash::DisplayList Class Reference

A list of on-stage characters, ordered by depth. More...

#include <dlist.h>

List of all members.

Public Member Functions

void place_character (character *ch, uint16_t depth, const cxform &color_xform, const matrix &mat, float ratio, uint16_t clip_depth)
 Place a new character in this display list replacing any other char at the same depth.
void replace_character (character *ch, uint16_t depth, bool use_cxform, const cxform &color_xform, bool use_matrix, const matrix &mat, float ratio, uint16_t clip_depth)
 Puts a new character at the specified depth, replacing any existing character.
void swap_characters (character *ch, character *ch2)
void move_display_object (uint16_t depth, bool use_cxform, const cxform &color_xform, bool use_matrix, const matrix &mat, float ratio, uint16_t clip_depth)
void remove_display_object (uint16_t depth)
 Removes the object at the specified depth.
void clear ()
 Clear the display list, calling the UNLOAD event on each item still present.
void clear_unaffected (std::vector< uint16 > &affected_depths)
void reset ()
 Clear the display list, w/out calling the UNLOAD event on the items.
void advance (float delta_time)
 advance referenced characters.
void display ()
 Display the referenced characters. Lower depths are obscured by higher depths.
characterget_character_at_depth (int depth)
 May return NULL.
const characterget_character_at_depth (int depth) const
characterget_character_by_name (const std::string &name)
 May return NULL. If there are multiples, returns the *first* match only!
const characterget_character_by_name (const std::string &name) const
characterget_character_by_name_i (const std::string &name)
 May return NULL. If there are multiples, returns the *first* match only!
template<class V>
void visitForward (V &visitor)
 Visit each character in the list in depth order (lower depth first).
template<class V>
void visitBackward (V &visitor)
 Visit each character in the list in reverse depth order (higher depth first).
void dump (std::ostream &os) const
 dump list to given output stream (debugging)
void get_invalidated_bounds (rect *bounds, bool force)
size_t size () const
 Return number of elements in the list.
int getNextHighestDepth () const
 Return the next highest available depth.


Detailed Description

A list of on-stage characters, ordered by depth.

Any sprite_instance has an associated DisplayList that may change from frame to frame due to control tags instructing when to add or remove characthers from the stage.


Member Function Documentation

void gnash::DisplayList::advance float  delta_time  ) 
 

advance referenced characters.

void gnash::DisplayList::clear  ) 
 

Clear the display list, calling the UNLOAD event on each item still present.

void gnash::DisplayList::clear_unaffected std::vector< uint16 > &  affected_depths  ) 
 

void gnash::DisplayList::display  ) 
 

Display the referenced characters. Lower depths are obscured by higher depths.

void gnash::DisplayList::dump std::ostream &  os  )  const
 

dump list to given output stream (debugging)

const character* gnash::DisplayList::get_character_at_depth int  depth  )  const [inline]
 

character * gnash::DisplayList::get_character_at_depth int  depth  ) 
 

May return NULL.

const character* gnash::DisplayList::get_character_by_name const std::string &  name  )  const [inline]
 

character * gnash::DisplayList::get_character_by_name const std::string &  name  ) 
 

May return NULL. If there are multiples, returns the *first* match only!

character * gnash::DisplayList::get_character_by_name_i const std::string &  name  ) 
 

May return NULL. If there are multiples, returns the *first* match only!

void gnash::DisplayList::get_invalidated_bounds rect bounds,
bool  force
 

Like character_instance::get_invalidated_bounds() this method calls the method with the same name of all childs.

int gnash::DisplayList::getNextHighestDepth  )  const
 

Return the next highest available depth.

Placing an object at the depth returned by this function should result in a character that is displayd above all others

void gnash::DisplayList::move_display_object uint16_t  depth,
bool  use_cxform,
const cxform color_xform,
bool  use_matrix,
const matrix mat,
float  ratio,
uint16_t  clip_depth
 

Updates the transform properties of the object at the specified depth.

void gnash::DisplayList::place_character character ch,
uint16_t  depth,
const cxform color_xform,
const matrix mat,
float  ratio,
uint16_t  clip_depth
 

Place a new character in this display list replacing any other char at the same depth.

If applicable, the event_id::LOAD event associated with the given character is called as last step of addition.

Parameters:
ch the character to be added into the list
depth depth to be assign to the character using character::set_depth
color_xform Color transform to be applied to the character using character::set_cxform
mat matrix to be assigned to the character using character::set_matrix
ratio ratio (scale?) to be assigned to the character using character::set_ratio
clip_depth clip_depth (?) to be assigned to the character using character::set_clip_depth

void gnash::DisplayList::remove_display_object uint16_t  depth  ) 
 

Removes the object at the specified depth.

void gnash::DisplayList::replace_character character ch,
uint16_t  depth,
bool  use_cxform,
const cxform color_xform,
bool  use_matrix,
const matrix mat,
float  ratio,
uint16_t  clip_depth
 

Puts a new character at the specified depth, replacing any existing character.

If use_cxform or use_matrix are false, and a character is present at the given depth, then keep those respective properties from the existing character.

TODO: use pointers for matrix and cxform, and use NULL instead of the two bool arguments

void gnash::DisplayList::reset  ) 
 

Clear the display list, w/out calling the UNLOAD event on the items.

size_t gnash::DisplayList::size  )  const [inline]
 

Return number of elements in the list.

void gnash::DisplayList::swap_characters character ch,
character ch2
 

template<class V>
void gnash::DisplayList::visitBackward V &  visitor  )  [inline]
 

Visit each character in the list in reverse depth order (higher depth first).

The visitor functor will receive a character pointer; must return true if it wants next item or false to exit the loop.

template<class V>
void gnash::DisplayList::visitForward V &  visitor  )  [inline]
 

Visit each character in the list in depth order (lower depth first).

The visitor functor will receive a character pointer; must return true if it wants next item or false to exit the loop.


The documentation for this class was generated from the following files:
Generated on Thu Nov 23 22:31:34 2006 for Gnash by  doxygen 1.4.6