Gnash
0.8.11dev
|
A class for parsing ButtonRecord, used by DefineButton and DefineButton2. More...
#include <DefineButtonTag.h>
Public Member Functions | |
ButtonRecord () | |
ButtonRecord (ButtonRecord &&)=default | |
DisplayObject * | instantiate (Button *button, bool name=true) const |
Create a DisplayObject from a ButtonRecord. More... | |
bool | hasState (Button::MouseState st) const |
Check if this ButtonRecord has a DisplayObject for a particular state. More... | |
void | readRGBTransform (SWFStream &in) |
Read an RGB SWFCxForm for this record. More... | |
bool | read (SWFStream &in, TagType t, movie_definition &m, unsigned long endPos) |
Read a ButtonRecord from the SWF stream. More... | |
bool | valid () const |
Return true if the ButtonRecord is valid. More... | |
A class for parsing ButtonRecord, used by DefineButton and DefineButton2.
|
inline |
References hasState(), instantiate(), and name.
|
default |
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. |
References gnash::Button::MOUSESTATE_DOWN, gnash::Button::MOUSESTATE_HIT, gnash::Button::MOUSESTATE_OVER, and gnash::Button::MOUSESTATE_UP.
Referenced by ButtonRecord().
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 gnash::getGlobal(), gnash::DisplayObject::getNextUnnamedInstanceName(), gnash::getObject(), gnash::isReferenceable(), gnash::key::o, gnash::DisplayObject::set_depth(), gnash::DisplayObject::set_name(), gnash::DisplayObject::setCxForm(), gnash::DisplayObject::setMatrix(), and gnash::DisplayObject::staticDepthOffset.
Referenced by ButtonRecord(), gnash::Button::construct(), and gnash::Button::set_current_state().
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 |
Referenced by gnash::SWF::DefineButton2Tag::loader(), and readRGBTransform().
|
inline |
Read an RGB SWFCxForm for this record.
Cxform is stored in a different tag for SWF2 Buttons (DEFINEBUTTON tag)
References gnash::key::m, read(), gnash::readCxFormRGB(), and gnash::key::t.
|
inline |
Return true if the ButtonRecord is valid.
A ButtonRecord is invalid if it refers to a DisplayObject which has not been defined.
Referenced by gnash::SWF::DefineButton2Tag::loader().