Gnash
0.8.10
|
A class for parsing ButtonRecord, used by DefineButton and DefineButton2. More...
#include <DefineButtonTag.h>
Public Member Functions | |
ButtonRecord () | |
DisplayObject * | instantiate (Button *button, bool name=true) const |
Create a DisplayObject from a ButtonRecord. | |
bool | hasState (Button::MouseState st) const |
Check if this ButtonRecord has a DisplayObject for a particular state. | |
void | readRGBTransform (SWFStream &in) |
Read an RGB SWFCxForm for this record. | |
bool | read (SWFStream &in, TagType t, movie_definition &m, unsigned long endPos) |
Read a ButtonRecord from the SWF stream. | |
bool | valid () const |
Return true if the ButtonRecord is valid. |
A class for parsing ButtonRecord, used by DefineButton and DefineButton2.
gnash::SWF::ButtonRecord::ButtonRecord | ( | ) | [inline] |
bool gnash::SWF::ButtonRecord::hasState | ( | Button::MouseState | st | ) | const |
Check if this ButtonRecord has a DisplayObject for a particular state.
state | The Button::MouseState to test for. |
DisplayObject * gnash::SWF::ButtonRecord::instantiate | ( | Button * | button, |
bool | name = true |
||
) | const |
Create a DisplayObject from a ButtonRecord.
name | Whether the created DisplayObject requires its own instance name. |
button | The button to which the DisplayObject will belong. |
References assert, gnash::getGlobal(), gnash::getObject(), gnash::key::o, gnash::DisplayObject::setMatrix(), gnash::DisplayObject::setCxForm(), gnash::DisplayObject::set_depth(), gnash::DisplayObject::staticDepthOffset, gnash::isReferenceable(), gnash::DisplayObject::set_name(), and gnash::DisplayObject::getNextUnnamedInstanceName().
Referenced by gnash::Button::set_current_state(), and gnash::Button::construct().
bool gnash::SWF::ButtonRecord::read | ( | SWFStream & | in, |
TagType | t, | ||
movie_definition & | m, | ||
unsigned long | endPos | ||
) |
Read a ButtonRecord from the SWF stream.
Return true if we read a record; false if this is a null
endPos | Last stream offset available for a valid read |
References gnash::SWFStream::tell(), endPos, IF_VERBOSE_MALFORMED_SWF, _, gnash::SWFStream::ensureBytes(), gnash::SWFStream::read_u8(), gnash::SWFStream::read_u16(), gnash::movie_definition::getDefinitionTag(), IF_VERBOSE_PARSE, gnash::typeName(), gnash::readSWFMatrix(), gnash::SWF::DEFINEBUTTON2, gnash::readCxFormRGBA(), and LOG_ONCE.
void gnash::SWF::ButtonRecord::readRGBTransform | ( | SWFStream & | in | ) | [inline] |
Read an RGB SWFCxForm for this record.
Cxform is stored in a different tag for SWF2 Buttons (DEFINEBUTTON tag)
References gnash::readCxFormRGB().
bool gnash::SWF::ButtonRecord::valid | ( | ) | const [inline] |
Return true if the ButtonRecord is valid.
A ButtonRecord is invalid if it refers to a DisplayObject which has not been defined.