#include <libsswf.h>
Public Member Functions | |
virtual ErrorManager::error_code_t | Save (Data &data) |
Save the TagRemove in the specified Data buffer. | |
void | SetDepth (int depth) |
Set the depth at which an object is removed. | |
void | SetObjectID (sswf_id_t id) |
Set the identifier of the object to be removed. | |
TagRemove (TagBase *parent) | |
Initialize the TagRemove with defaults. | |
virtual swf_type_t | TypeFlags (void) const |
Return the type flags of the TagRemove tag. | |
Private Member Functions | |
virtual ErrorManager::error_code_t | ParseTag (swf_tag_t tag, const Data &data) |
Parse data from a file into a Remove tag. | |
virtual ErrorManager::error_code_t | PreSave (void) |
Prepare the movie to save a Remove tag. | |
Private Attributes | |
int | f_depth |
sswf_id_t | f_id |
Since version 3 of SWF, it is possible to remove objects from the list using sswf::TagPlace only.
TagRemove::TagRemove | ( | TagBase * | parent | ) |
By default, a TagRemove tag is set to 'no depth' and 'no identifier'.
You can specify one or both of these parameters.
parent | A object of type sswf::TagHeader or sswf::TagSprite |
References f_depth, f_id, and SSWF_ID_NONE.
ErrorManager::error_code_t TagRemove::ParseTag | ( | swf_tag_t | tag, | |
const Data & | data | |||
) | [private, virtual] |
This function reads the remove tag identifier and depth.
[in] | tag | The tag that generated this call |
[in] | data | The Data buffer from the Flash file being loaded |
Implements sswf::TagBase.
References sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_id, sswf::Data::GetShort(), and sswf::TagBase::SWF_TAG_REMOVE_OBJECT.
ErrorManager::error_code_t TagRemove::PreSave | ( | void | ) | [private, virtual] |
A TagRemove requests at least a version 3 movie when an object identification was specified.
Reimplemented from sswf::TagBase.
References sswf::ErrorManager::ERROR_CODE_NONE, f_id, sswf::TagBase::MinimumVersion(), and SSWF_ID_NONE.
ErrorManager::error_code_t TagRemove::Save | ( | Data & | data | ) | [virtual] |
This function saves the TagRemove information--the depth and eventual object identifier--in the Data buffer.
data | The Data buffer where the tag is saved |
Implements sswf::TagBase.
References sswf::assert(), sswf::ErrorManager::ERROR_CODE_NONE, f_depth, f_id, sswf::Data::PutShort(), sswf::TagBase::SaveTag(), SSWF_ID_NONE, sswf::TagBase::SWF_TAG_REMOVE_OBJECT, and sswf::TagBase::SWF_TAG_REMOVE_OBJECT2.
void sswf::TagRemove::SetDepth | ( | int | depth | ) | [inline] |
This function can be used to remove an object at the specified depth.
It is possible to only define the depth in which case the last object added at this depth is removed from the display list.
depth | The depth where an object is removed |
References f_depth.
void sswf::TagRemove::SetObjectID | ( | sswf_id_t | id | ) | [inline] |
The identification of the object to be removed.
The TagRemove can be used with an object identification in which case only an object with the given identification is removed from the list. If no such object exists, nothing happens.
References f_id.
TagBase::swf_type_t TagRemove::TypeFlags | ( | void | ) | const [virtual] |
A TagRemove is a CONTROL tag: it is used to change the display list.
A TagRemove has a REFERENCE to another object.
Implements sswf::TagBase.
References SWF_TYPE_CONTROL, and SWF_TYPE_REFERENCE.
int sswf::TagRemove::f_depth [private] |
Referenced by ParseTag(), Save(), SetDepth(), and TagRemove().
sswf_id_t sswf::TagRemove::f_id [private] |
Referenced by ParseTag(), PreSave(), Save(), SetObjectID(), and TagRemove().