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 class Transform;
00035 }
00036
00037 namespace gnash {
00038 namespace SWF {
00039
00040
00042 class DefineTextTag : public DefinitionTag
00043 {
00044 public:
00045
00046 static void loader(SWFStream& in, TagType tag, movie_definition& m,
00047 const RunResources& r);
00048
00050 void display(Renderer& renderer, const Transform& xform) const;
00051
00052 const SWFRect& bounds() const {
00053
00054
00055 return _rect;
00056 }
00057
00059
00064 bool extractStaticText(std::vector<const TextRecord*>& to, size_t& size)
00065 const;
00066
00067 virtual DisplayObject* createDisplayObject(Global_as& gl,
00068 DisplayObject* parent) const;
00069
00070 private:
00071
00073 friend class DefineText2Tag;
00074
00076
00078 DefineTextTag(SWFStream& in, movie_definition& m, TagType tag,
00079 boost::uint16_t id)
00080 :
00081 DefinitionTag(id)
00082 {
00083 read(in, m, tag);
00084 }
00085
00086 SWFRect _rect;
00087
00088 SWFMatrix _matrix;
00089
00090 void read(SWFStream& in, movie_definition& m, TagType tag);
00091
00092 TextRecord::TextRecords _textRecords;
00093 };
00094
00096
00098 class DefineText2Tag
00099 {
00100 public:
00101 static void loader(SWFStream& in, TagType tag, movie_definition& m,
00102 const RunResources& r);
00103 };
00104
00105 }
00106 }
00107
00108 #endif