Gnash  0.8.10
Public Member Functions | Protected Member Functions
gnash::SWF::DefinitionTag Class Reference

Immutable data representing the definition of a movie display element. More...

#include <DefinitionTag.h>

Inheritance diagram for gnash::SWF::DefinitionTag:
gnash::SWF::ControlTag gnash::ref_counted gnash::movie_definition gnash::SWF::DefineButtonTag gnash::SWF::DefineEditTextTag gnash::SWF::DefineMorphShapeTag gnash::SWF::DefineShapeTag gnash::SWF::DefineTextTag gnash::SWF::DefineVideoStreamTag gnash::BitmapMovieDefinition gnash::sprite_definition gnash::SWFMovieDefinition

List of all members.

Public Member Functions

virtual ~DefinitionTag ()
virtual DisplayObjectcreateDisplayObject (Global_as &gl, DisplayObject *parent) const =0
 Create a DisplayObject with the given parent.
virtual void executeState (MovieClip *m, DisplayList &) const
 Executing a DefinitionTag adds its id to list of known characters.
boost::uint16_t id () const
 The immutable id of the DefinitionTag.

Protected Member Functions

 DefinitionTag (boost::uint16_t id)

Detailed Description

Immutable data representing the definition of a movie display element.

TODO: rename this class so it's not the same as the SWF spec. It doesn't exactly correspond to the DefinitionTag defined there.


Constructor & Destructor Documentation

virtual gnash::SWF::DefinitionTag::~DefinitionTag ( ) [inline, virtual]
gnash::SWF::DefinitionTag::DefinitionTag ( boost::uint16_t  id) [inline, protected]

Member Function Documentation

virtual DisplayObject* gnash::SWF::DefinitionTag::createDisplayObject ( Global_as gl,
DisplayObject parent 
) const [pure virtual]

Create a DisplayObject with the given parent.

This function will determine the correct prototype and associated object using the passed global.

Parameters:
glThe global object used to set prototype and associated object. Calling this function creates a new DisplayObject from the DefinitionTag and adds it as a child of the specified parent DisplayObject.

Implemented in gnash::SWFMovieDefinition, gnash::sprite_definition, gnash::SWF::DefineButtonTag, gnash::SWF::DefineVideoStreamTag, gnash::SWF::DefineEditTextTag, gnash::SWF::DefineTextTag, gnash::BitmapMovieDefinition, gnash::SWF::DefineMorphShapeTag, and gnash::SWF::DefineShapeTag.

Referenced by gnash::MovieClip::add_display_object(), and gnash::MovieClip::replace_display_object().

void gnash::SWF::DefinitionTag::executeState ( MovieClip m,
DisplayList  
) const [virtual]

Executing a DefinitionTag adds its id to list of known characters.

The process is different for imported DefinitionTags, which are added with a new id.

Reimplemented from gnash::SWF::ControlTag.

References gnash::MovieClip::get_root(), and gnash::Movie::addCharacter().

boost::uint16_t gnash::SWF::DefinitionTag::id ( ) const [inline]

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