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:
Inheritance graph
[legend]
Collaboration diagram for gnash::SWF::DefinitionTag:
Collaboration graph
[legend]

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:
gl The 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::BitmapMovieDefinition, gnash::sprite_definition, gnash::SWFMovieDefinition, gnash::SWF::DefineButtonTag, gnash::SWF::DefineEditTextTag, gnash::SWF::DefineMorphShapeTag, gnash::SWF::DefineShapeTag, gnash::SWF::DefineTextTag, and gnash::SWF::DefineVideoStreamTag.

Referenced by gnash::SWF::ButtonRecord::instantiate().

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::Movie::addCharacter(), and gnash::MovieClip::get_root().

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

The immutable id of the DefinitionTag.

Returns:
the id of the DefinitionTag as parsed from a SWF.

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