Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::SWF::ButtonRecord Class Reference

A class for parsing ButtonRecord, used by DefineButton and DefineButton2. More...

#include <DefineButtonTag.h>

Public Member Functions

 ButtonRecord ()
 
 ButtonRecord (ButtonRecord &&)=default
 
DisplayObjectinstantiate (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...
 

Detailed Description

A class for parsing ButtonRecord, used by DefineButton and DefineButton2.

Constructor & Destructor Documentation

§ ButtonRecord() [1/2]

gnash::SWF::ButtonRecord::ButtonRecord ( )
inline

References hasState(), instantiate(), and name.

§ ButtonRecord() [2/2]

gnash::SWF::ButtonRecord::ButtonRecord ( ButtonRecord &&  )
default

Member Function Documentation

§ hasState()

bool gnash::SWF::ButtonRecord::hasState ( Button::MouseState  st) const

Check if this ButtonRecord has a DisplayObject for a particular state.

Parameters
stateThe Button::MouseState to test for.
Returns
Whether the ButtonRecord should be used for that Button::MouseState.

References gnash::Button::MOUSESTATE_DOWN, gnash::Button::MOUSESTATE_HIT, gnash::Button::MOUSESTATE_OVER, and gnash::Button::MOUSESTATE_UP.

Referenced by ButtonRecord().

§ instantiate()

DisplayObject * gnash::SWF::ButtonRecord::instantiate ( Button button,
bool  name = true 
) const

§ read()

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

Parameters
endPosLast stream offset available for a valid read

Referenced by gnash::SWF::DefineButton2Tag::loader(), and readRGBTransform().

§ readRGBTransform()

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::key::m, read(), gnash::readCxFormRGB(), and gnash::key::t.

§ valid()

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.

Referenced by gnash::SWF::DefineButton2Tag::loader().


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