VSDStencils.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libvisio project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef __VSDSTENCILS_H__
11 #define __VSDSTENCILS_H__
12
13 #include <map>
14 #include <vector>
15 #include "VSDStyles.h"
16 #include "VSDGeometryList.h"
17 #include "VSDFieldList.h"
18 #include "VSDTypes.h"
19 #include "VSDParagraphList.h"
20 #include "VSDCharacterList.h"
21 #include "VSDShapeList.h"
22
23 namespace libvisio
24 {
25
26 class VSDShape
27 {
28 public:
29 VSDShape();
30 VSDShape(const VSDShape &shape);
31 ~VSDShape();
32 VSDShape &operator=(const VSDShape &shape);
33 void clear();
34
35 std::map<unsigned, VSDGeometryList> m_geometries;
36 VSDShapeList m_shapeList;
37 VSDFieldList m_fields;
38 ForeignData *m_foreign;
39 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
40 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
41 VSDOptionalLineStyle m_lineStyle;
42 VSDOptionalFillStyle m_fillStyle;
43 VSDOptionalTextBlockStyle m_textBlockStyle;
44 VSDOptionalCharStyle m_charStyle;
45 VSDCharacterList m_charList;
46 VSDOptionalParaStyle m_paraStyle;
47 VSDParagraphList m_paraList;
48 std::map<unsigned, VSDTabSet> m_tabSets;
49 librevenge::RVNGBinaryData m_text;
50 std::map<unsigned, VSDName> m_names;
51 TextFormat m_textFormat;
52 std::map<unsigned, NURBSData> m_nurbsData;
53 std::map<unsigned, PolylineData> m_polylineData;
54 XForm m_xform;
55 XForm *m_txtxform;
56 XForm1D *m_xform1d;
57 VSDMisc m_misc;
58 VSDName m_layerMem;
59 };
60
61 class VSDStencil
62 {
63 public:
64 VSDStencil();
65 VSDStencil(const VSDStencil &stencil);
66 ~VSDStencil();
67 VSDStencil &operator=(const VSDStencil &stencil);
68 void addStencilShape(unsigned id, const VSDShape &shape);
69 void setFirstShape(unsigned id);
70 const VSDShape *getStencilShape(unsigned id) const;
71 std::map<unsigned, VSDShape> m_shapes;
72 double m_shadowOffsetX;
73 double m_shadowOffsetY;
74 unsigned m_firstShapeId;
75 };
76
77 class VSDStencils
78 {
79 public:
80 VSDStencils();
81 ~VSDStencils();
82 void addStencil(unsigned idx, const VSDStencil &stencil);
83 const VSDStencil *getStencil(unsigned idx) const;
84 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
85 unsigned count() const
86 {
87 return m_stencils.size();
88 }
89 private:
90 std::map<unsigned, VSDStencil> m_stencils;
91 };
92
93
94 } // namespace libvisio
95
96 #endif // __VSDSTENCILS_H__
97 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDStencil::m_firstShapeId
unsigned m_firstShapeId
Definition: VSDStencils.h:74
libvisio::VSDShape
Definition: VSDStencils.h:26
libvisio::VSDOptionalFillStyle
Definition: VSDStyles.h:108
libvisio::VSDStencils::getStencilShape
const VSDShape * getStencilShape(unsigned pageId, unsigned shapeId) const
Definition: VSDStencils.cpp:198
libvisio::VSDShape::m_charList
VSDCharacterList m_charList
Definition: VSDStencils.h:45
libvisio::VSDStencil::m_shadowOffsetX
double m_shadowOffsetX
Definition: VSDStencils.h:72
libvisio::VSDShape::m_masterPage
unsigned m_masterPage
Definition: VSDStencils.h:39
libvisio::VSDShape::VSDShape
VSDShape()
Definition: VSDStencils.cpp:13
libvisio::VSDShape::m_paraList
VSDParagraphList m_paraList
Definition: VSDStencils.h:47
libvisio::VSDShape::m_fields
VSDFieldList m_fields
Definition: VSDStencils.h:37
libvisio::VSDOptionalTextBlockStyle
Definition: VSDStyles.h:452
libvisio::VSDStencil::setFirstShape
void setFirstShape(unsigned id)
Definition: VSDStencils.cpp:158
libvisio::VSDShape::m_textFormat
TextFormat m_textFormat
Definition: VSDStencils.h:51
libvisio::VSDStencil::m_shadowOffsetY
double m_shadowOffsetY
Definition: VSDStencils.h:73
libvisio::VSDStencil::operator=
VSDStencil & operator=(const VSDStencil &stencil)
Definition: VSDStencils.cpp:141
VSDParagraphList.h
libvisio::VSDShape::m_names
std::map< unsigned, VSDName > m_names
Definition: VSDStencils.h:50
libvisio::VSDStencils::getStencil
const VSDStencil * getStencil(unsigned idx) const
Definition: VSDStencils.cpp:189
libvisio::VSDOptionalLineStyle
Definition: VSDStyles.h:23
libvisio::VSDMisc
Definition: VSDTypes.h:210
VSDCharacterList.h
libvisio::VSDShape::m_lineStyle
VSDOptionalLineStyle m_lineStyle
Definition: VSDStencils.h:41
VSDGeometryList.h
libvisio::VSDShape::m_tabSets
std::map< unsigned, VSDTabSet > m_tabSets
Definition: VSDStencils.h:48
libvisio::VSDStencil::~VSDStencil
~VSDStencil()
Definition: VSDStencils.cpp:137
libvisio::VSDStencils
Definition: VSDStencils.h:77
libvisio::VSDShape::m_foreign
ForeignData * m_foreign
Definition: VSDStencils.h:38
libvisio::VSDOptionalParaStyle
Definition: VSDStyles.h:348
libvisio::VSDFieldList
Definition: VSDFieldList.h:81
libvisio::VSDShape::m_paraStyle
VSDOptionalParaStyle m_paraStyle
Definition: VSDStencils.h:46
libvisio::VSDParagraphList
Definition: VSDParagraphList.h:23
libvisio::VSDShape::m_fillStyle
VSDOptionalFillStyle m_fillStyle
Definition: VSDStencils.h:42
VSDTypes.h
libvisio::VSDShape::m_nurbsData
std::map< unsigned, NURBSData > m_nurbsData
Definition: VSDStencils.h:52
libvisio::VSDShape::m_shapeId
unsigned m_shapeId
Definition: VSDStencils.h:39
libvisio::VSDShape::m_xform
XForm m_xform
Definition: VSDStencils.h:54
libvisio::VSDStencils::addStencil
void addStencil(unsigned idx, const VSDStencil &stencil)
Definition: VSDStencils.cpp:184
libvisio::VSDShape::m_masterShape
unsigned m_masterShape
Definition: VSDStencils.h:39
VSDFieldList.h
libvisio::VSDShape::m_text
librevenge::RVNGBinaryData m_text
Definition: VSDStencils.h:49
libvisio::TextFormat
TextFormat
Definition: VSDTypes.h:157
libvisio::VSDShape::~VSDShape
~VSDShape()
Definition: VSDStencils.cpp:38
libvisio::VSDShape::m_txtxform
XForm * m_txtxform
Definition: VSDStencils.h:55
VSDShapeList.h
libvisio::VSDStencil::getStencilShape
const VSDShape * getStencilShape(unsigned id) const
Definition: VSDStencils.cpp:164
libvisio::VSDShape::m_misc
VSDMisc m_misc
Definition: VSDStencils.h:57
libvisio::ForeignData
Definition: VSDTypes.h:134
libvisio::VSDStencil
Definition: VSDStencils.h:61
libvisio::VSDStencils::m_stencils
std::map< unsigned, VSDStencil > m_stencils
Definition: VSDStencils.h:90
libvisio::VSDOptionalCharStyle
Definition: VSDStyles.h:223
libvisio::VSDStencil::m_shapes
std::map< unsigned, VSDShape > m_shapes
Definition: VSDStencils.h:71
libvisio::VSDShape::m_layerMem
VSDName m_layerMem
Definition: VSDStencils.h:58
libvisio::VSDShape::m_fillStyleId
unsigned m_fillStyleId
Definition: VSDStencils.h:40
libvisio::VSDShape::m_textBlockStyle
VSDOptionalTextBlockStyle m_textBlockStyle
Definition: VSDStencils.h:43
VSDStyles.h
libvisio
Definition: libvisio_utils.h:48
libvisio::VSDShape::m_lineStyleId
unsigned m_lineStyleId
Definition: VSDStencils.h:40
libvisio::VSDStencils::count
unsigned count() const
Definition: VSDStencils.h:85
libvisio::VSDShapeList
Definition: VSDShapeList.h:19
libvisio::VSDStencil::addStencilShape
void addStencilShape(unsigned id, const VSDShape &shape)
Definition: VSDStencils.cpp:153
libvisio::XForm1D
Definition: VSDTypes.h:44
libvisio::VSDShape::m_parent
unsigned m_parent
Definition: VSDStencils.h:39
libvisio::VSDShape::m_xform1d
XForm1D * m_xform1d
Definition: VSDStencils.h:56
libvisio::VSDShape::operator=
VSDShape & operator=(const VSDShape &shape)
Definition: VSDStencils.cpp:43
libvisio::VSDShape::m_charStyle
VSDOptionalCharStyle m_charStyle
Definition: VSDStencils.h:44
libvisio::XForm
Definition: VSDTypes.h:22
libvisio::VSDName
Definition: VSDTypes.h:178
libvisio::VSDStencil::VSDStencil
VSDStencil()
Definition: VSDStencils.cpp:126
libvisio::VSDCharacterList
Definition: VSDCharacterList.h:24
libvisio::VSDStencils::VSDStencils
VSDStencils()
Definition: VSDStencils.cpp:175
libvisio::VSDShape::clear
void clear()
Definition: VSDStencils.cpp:86
libvisio::VSDStencils::~VSDStencils
~VSDStencils()
Definition: VSDStencils.cpp:180
libvisio::VSDShape::m_shapeList
VSDShapeList m_shapeList
Definition: VSDStencils.h:36
libvisio::VSDShape::m_polylineData
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDStencils.h:53
libvisio::VSDShape::m_textStyleId
unsigned m_textStyleId
Definition: VSDStencils.h:40
libvisio::VSDShape::m_geometries
std::map< unsigned, VSDGeometryList > m_geometries
Definition: VSDStencils.h:35