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
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __VSDSTENCILS_H__
00032 #define __VSDSTENCILS_H__
00033
00034 #include <map>
00035 #include <vector>
00036 #include "VSDStyles.h"
00037 #include "VSDGeometryList.h"
00038 #include "VSDFieldList.h"
00039 #include "VSDTypes.h"
00040 #include "VSDParagraphList.h"
00041 #include "VSDCharacterList.h"
00042 #include "VSDShapeList.h"
00043
00044 namespace libvisio
00045 {
00046
00047 class VSDShape
00048 {
00049 public:
00050 VSDShape();
00051 VSDShape(const VSDShape &shape);
00052 ~VSDShape();
00053 VSDShape &operator=(const VSDShape &shape);
00054 void clear();
00055
00056 std::map<unsigned, VSDGeometryList> m_geometries;
00057 VSDShapeList m_shapeList;
00058 VSDFieldList m_fields;
00059 ForeignData *m_foreign;
00060 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
00061 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
00062 VSDOptionalLineStyle m_lineStyle;
00063 VSDOptionalFillStyle m_fillStyle;
00064 VSDOptionalTextBlockStyle m_textBlockStyle;
00065 VSDOptionalCharStyle m_charStyle;
00066 VSDCharacterList m_charList;
00067 VSDOptionalParaStyle m_paraStyle;
00068 VSDParagraphList m_paraList;
00069 WPXBinaryData m_text;
00070 std::map< unsigned, VSDName > m_names;
00071 TextFormat m_textFormat;
00072 std::map<unsigned, NURBSData> m_nurbsData;
00073 std::map<unsigned, PolylineData> m_polylineData;
00074 XForm m_xform;
00075 XForm *m_txtxform;
00076 VSDMisc m_misc;
00077 };
00078
00079 class VSDStencil
00080 {
00081 public:
00082 VSDStencil();
00083 VSDStencil(const VSDStencil &stencil);
00084 ~VSDStencil();
00085 VSDStencil &operator=(const VSDStencil &stencil);
00086 void addStencilShape(unsigned id, const VSDShape &shape);
00087 void setFirstShape(unsigned id);
00088 const VSDShape *getStencilShape(unsigned id) const;
00089 std::map<unsigned, VSDShape> m_shapes;
00090 double m_shadowOffsetX;
00091 double m_shadowOffsetY;
00092 unsigned m_firstShapeId;
00093 };
00094
00095 class VSDStencils
00096 {
00097 public:
00098 VSDStencils();
00099 ~VSDStencils();
00100 void addStencil(unsigned idx, const VSDStencil &stencil);
00101 const VSDStencil *getStencil(unsigned idx) const;
00102 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
00103 unsigned count() const
00104 {
00105 return m_stencils.size();
00106 }
00107 void clear();
00108 private:
00109 std::map<unsigned, VSDStencil> m_stencils;
00110 };
00111
00112
00113 }
00114
00115 #endif // __VSDSTENCILS_H__
00116