Gnash  0.8.11dev
Public Member Functions | Protected Member Functions | List of all members
gnash::SWF::DefinitionTag Class Referenceabstract

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

Public Member Functions

virtual ~DefinitionTag ()
 
virtual DisplayObjectcreateDisplayObject (Global_as &gl, DisplayObject *parent) const =0
 Create a DisplayObject with the given parent. More...
 
virtual DSOTEXPORT void executeState (MovieClip *m, DisplayList &) const
 Executing a DefinitionTag adds its id to list of known characters. More...
 
boost::uint16_t id () const
 The immutable id of the DefinitionTag. More...
 
- Public Member Functions inherited from gnash::SWF::ControlTag
virtual ~ControlTag ()
 
virtual void executeActions (MovieClip *, DisplayList &) const
 Execute Action tags. More...
 
- Public Member Functions inherited from gnash::ref_counted
 ref_counted ()
 
 ref_counted (const ref_counted &)
 
void add_ref () const
 
void drop_ref () const
 
long get_ref_count () const
 

Protected Member Functions

 DefinitionTag (boost::uint16_t id)
 
- Protected Member Functions inherited from gnash::ref_counted
virtual ~ref_counted ()
 

Additional Inherited Members

- Public Types inherited from gnash::SWF::ControlTag
enum  Type { TAG_ACTION = 1 << 0, TAG_DLIST = 1 << 1 }
 Type of ControlTag. More...
 

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 ( )
inlinevirtual
gnash::SWF::DefinitionTag::DefinitionTag ( boost::uint16_t  id)
inlineprotected

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::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.

Referenced by gnash::SWFMovieDefinition::registerExport(), and gnash::sprite_definition::set_loading_sound_stream_id().


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