Public Member Functions

gnash::SWF::ButtonRecord Class Reference

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

#include <DefineButtonTag.h>

Collaboration diagram for gnash::SWF::ButtonRecord:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Detailed Description

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


Constructor & Destructor Documentation

gnash::SWF::ButtonRecord::ButtonRecord (  )  [inline]

Member Function Documentation

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

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

Parameters:
state The 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.

DisplayObject * gnash::SWF::ButtonRecord::instantiate ( Button button,
bool  name = true 
) const
bool gnash::SWF::ButtonRecord::read ( SWFStream in,
TagType  t,
movie_definition m,
unsigned long  endPos 
)
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::SWFCxForm::read_rgb().

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.


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