Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_SWF_DEFINETEXTTAG_H
00020 #define GNASH_SWF_DEFINETEXTTAG_H
00021
00022 #include <vector>
00023 #include "DefinitionTag.h"
00024 #include "SWFRect.h"
00025 #include "SWF.h"
00026 #include "SWFMatrix.h"
00027 #include "TextRecord.h"
00028
00029 namespace gnash {
00030 class movie_definition;
00031 class SWFStream;
00032 class RunResources;
00033 class StaticText;
00034 }
00035
00036 namespace gnash {
00037 namespace SWF {
00038
00039
00041
00045 class DefineTextTag : public DefinitionTag
00046 {
00047 public:
00048
00049 static void loader(SWFStream& in, TagType tag, movie_definition& m,
00050 const RunResources& r);
00051
00053 void display(Renderer& renderer, const StaticText& inst) const;
00054
00055 const SWFRect& bounds() const {
00056
00057
00058 return _rect;
00059 }
00060
00062
00067 bool extractStaticText(std::vector<const TextRecord*>& to, size_t& size)
00068 const;
00069
00070 virtual DisplayObject* createDisplayObject(Global_as& gl,
00071 DisplayObject* parent) const;
00072
00073 private:
00074
00076 friend class DefineText2Tag;
00077
00079
00081 DefineTextTag(SWFStream& in, movie_definition& m, TagType tag,
00082 boost::uint16_t id)
00083 :
00084 DefinitionTag(id)
00085 {
00086 read(in, m, tag);
00087 }
00088
00089 SWFRect _rect;
00090
00091 SWFMatrix _matrix;
00092
00093 void read(SWFStream& in, movie_definition& m, TagType tag);
00094
00095 TextRecord::TextRecords _textRecords;
00096 };
00097
00099
00101 class DefineText2Tag
00102 {
00103 public:
00104 static void loader(SWFStream& in, TagType tag, movie_definition& m,
00105 const RunResources& r);
00106 };
00107
00108 }
00109 }
00110
00111 #endif