Go to the documentation of this file.
20 #ifndef GNASH_SWF_DEFINEBUTTONTAG_H
21 #define GNASH_SWF_DEFINEBUTTONTAG_H
24 #include <boost/ptr_container/ptr_vector.hpp>
42 class movie_definition;
65 _definitionTag(nullptr),
103 unsigned long endPos);
110 return _definitionTag.get();
125 std::uint8_t _blendMode;
133 boost::intrusive_ptr<const DefinitionTag> _definitionTag;
166 return (_conditions & KEYPRESS);
173 return (_conditions & KEYPRESS) >> 9;
180 IDLE_TO_OVER_UP = 1 << 0,
181 OVER_UP_TO_IDLE = 1 << 1,
182 OVER_UP_TO_OVER_DOWN = 1 << 2,
183 OVER_DOWN_TO_OVER_UP = 1 << 3,
184 OVER_DOWN_TO_OUT_DOWN = 1 << 4,
185 OUT_DOWN_TO_OVER_DOWN = 1 << 5,
186 OUT_DOWN_TO_IDLE = 1 << 6,
187 IDLE_TO_OVER_DOWN = 1 << 7,
188 OVER_DOWN_TO_IDLE = 1 << 8,
192 std::uint16_t _conditions;
222 bool hasSound()
const {
return (_soundTag.get()); }
226 void addSoundTag(std::unique_ptr<SWF::DefineButtonSoundTag> soundTag) {
228 assert(!_soundTag.get());
229 _soundTag.reset(soundTag.release());
237 assert(_soundTag.get());
238 return _soundTag->getSound(index);
257 for (
size_t i = 0,
e = _buttonActions.size();
i <
e; ++
i) {
270 std::bind(
f, std::bind(
291 std::unique_ptr<SWF::DefineButtonSoundTag> _soundTag;
320 #endif // GNASH_BUTTON_CHARACTER_DEF_H
SWFMatrix readSWFMatrix(SWFStream &in)
Read a SWFMatrix from input stream.
Definition: TypesParser.cpp:49
@ DEFINEBUTTON
Definition: SWF.h:39
std::string name
Definition: LocalConnection_as.cpp:149
void log_swferror(StringType msg, Args... args)
Definition: log.h:325
The base class for all ActionScript objects.
Definition: as_object.h:162
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:31
static const int staticDepthOffset
Definition: DisplayObject.h:205
Immutable data representing the definition of a movie display element.
Definition: DefinitionTag.h:48
@ i
Definition: GnashKey.h:155
#define LOG_ONCE(x)
Definition: log.h:49
std::string typeName(const T &inst)
Definition: utility.h:93
#define _(String)
Definition: log.h:44
A class to identify 'static' SWF events (system events).
Definition: event_id.h:53
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
EventCode id() const
Return the identifier for this event type.
Definition: event_id.h:141
@ ROLL_OVER
Definition: event_id.h:65
ObjectURI getNextUnnamedInstanceName()
Used to assign a name to unnamed instances.
Definition: DisplayObject.cpp:134
@ m
Definition: GnashKey.h:159
static int read(SWFStream &in, bool read_multiple, Filters *store)
Read one, possibly multiple filters from the stream, and push them into the vector store....
Definition: filter_factory.cpp:41
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
virtual int get_version() const =0
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
#define IF_VERBOSE_MALFORMED_SWF(x)
Definition: log.h:404
@ t
Definition: GnashKey.h:166
@ DRAG_OVER
Definition: event_id.h:67
@ r
Definition: GnashKey.h:164
@ ROLL_OUT
Definition: event_id.h:66
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
@ RELEASE
Definition: event_id.h:63
const unsigned char codeMap[KEYCOUNT][TYPES]
Definition: GnashKey.h:337
@ DEFINEBUTTON2
Definition: SWF.h:64
unsigned long tell()
Return our current (byte) position in the input stream.
Definition: SWFStream.cpp:447
void read(SWFStream &in, unsigned long endPos)
Read action bytes from input stream up to but not including endPos.
Definition: action_buffer.cpp:48
std::vector< std::unique_ptr< BitmapFilter > > Filters
Definition: filter_factory.h:32
@ _1
Definition: GnashKey.h:95
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
@ PRESS
Definition: event_id.h:62
Definition: SWFMatrix.h:54
SWFCxForm readCxFormRGBA(SWFStream &in)
Read a CxForm with alpha from the input stream.
Definition: TypesParser.cpp:354
unsigned long get_tag_end_position()
Return the file position of the end of the current tag.
Definition: SWFStream.cpp:497
#define IF_VERBOSE_PARSE(x)
Definition: log.h:378
void log_parse(StringType msg, Args... args)
Definition: log.h:313
as_object * getObject(const DisplayObject *d)
Return the as_object associated with a DisplayObject if it exists.
Definition: DisplayObject.h:1160
@ f
Definition: GnashKey.h:152
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
std::uint16_t read_u16()
Read a aligned unsigned 16-bit value from the stream.
Definition: SWFStream.cpp:332
as_object * getObjectWithPrototype(Global_as &gl, const ObjectURI &c)
Definition: as_object.cpp:1109
SWFCxForm readCxFormRGB(SWFStream &in)
Read a RGB CxForm from the input stream.
Definition: TypesParser.cpp:322
std::uint8_t read_u8()
Read a aligned unsigned 8-bit value from the stream.
Definition: SWFStream.cpp:319
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
A code segment.
Definition: action_buffer.h:50
@ CLASS_BUTTON
Definition: namedStrings.h:202
SWF stream wrapper class.
Definition: SWFStream.h:59
@ RELEASE_OUTSIDE
Definition: event_id.h:64
@ E
Definition: GnashKey.h:117
void ensureBytes(unsigned long needed)
Ensure the requested number of bytes are available for an aligned read in the currently opened tag.
Definition: SWFStream.cpp:50
@ o
Definition: GnashKey.h:161
@ SWF
Definition: GnashKey.h:331
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
bool isReferenceable(const DisplayObject &d)
Returns true if the DisplayObject is referenceable in ActionScript.
Definition: DisplayObject.h:1149
@ e
Definition: GnashKey.h:151
@ KEY_PRESS
Definition: event_id.h:69
key::code keyCode() const
Return the keycode associated with this event_id.
Definition: event_id.h:138
@ DRAG_OUT
Definition: event_id.h:68