- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

VSDStencils.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* libvisio
3 * Version: MPL 1.1 / GPLv2+ / LGPLv2+
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License or as specified alternatively below. You may obtain a copy of
8 * the License at http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * Major Contributor(s):
16 * Copyright (C) 2011 Fridrich Strba <fridrich.strba@bluewin.ch>
17 * Copyright (C) 2011 Eilidh McAdam <tibbylickle@gmail.com>
18 *
19 *
20 * All Rights Reserved.
21 *
22 * For minor contributions see the git repository.
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
26 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
27 * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
28 * instead of those above.
29 */
30
31 #ifndef __VSDSTENCILS_H__
32 #define __VSDSTENCILS_H__
33
34 #include <map>
35 #include <vector>
36 #include "VSDStyles.h"
37 #include "VSDGeometryList.h"
38 #include "VSDFieldList.h"
39 #include "VSDTypes.h"
40 #include "VSDParagraphList.h"
41 #include "VSDCharacterList.h"
42 #include "VSDShapeList.h"
43
44 namespace libvisio
45 {
46
47 class VSDShape
48 {
49 public:
50 VSDShape();
51 VSDShape(const VSDShape &shape);
52 ~VSDShape();
53 VSDShape &operator=(const VSDShape &shape);
54 void clear();
55
56 std::map<unsigned, VSDGeometryList> m_geometries;
57 VSDShapeList m_shapeList;
58 VSDFieldList m_fields;
59 ForeignData *m_foreign;
60 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
61 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
62 VSDOptionalLineStyle m_lineStyle;
63 VSDOptionalFillStyle m_fillStyle;
64 VSDOptionalTextBlockStyle m_textBlockStyle;
65 VSDOptionalCharStyle m_charStyle;
66 VSDCharacterList m_charList;
67 VSDOptionalParaStyle m_paraStyle;
68 VSDParagraphList m_paraList;
69 WPXBinaryData m_text;
70 std::map< unsigned, VSDName > m_names;
71 TextFormat m_textFormat;
72 std::map<unsigned, NURBSData> m_nurbsData;
73 std::map<unsigned, PolylineData> m_polylineData;
74 XForm m_xform;
75 XForm *m_txtxform;
76 VSDMisc m_misc;
77 };
78
79 class VSDStencil
80 {
81 public:
82 VSDStencil();
83 VSDStencil(const VSDStencil &stencil);
84 ~VSDStencil();
85 VSDStencil &operator=(const VSDStencil &stencil);
86 void addStencilShape(unsigned id, const VSDShape &shape);
87 void setFirstShape(unsigned id);
88 const VSDShape *getStencilShape(unsigned id) const;
89 std::map<unsigned, VSDShape> m_shapes;
90 double m_shadowOffsetX;
91 double m_shadowOffsetY;
92 unsigned m_firstShapeId;
93 };
94
95 class VSDStencils
96 {
97 public:
98 VSDStencils();
99 ~VSDStencils();
100 void addStencil(unsigned idx, const VSDStencil &stencil);
101 const VSDStencil *getStencil(unsigned idx) const;
102 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
103 unsigned count() const
104 {
105 return m_stencils.size();
106 }
107 void clear();
108 private:
109 std::map<unsigned, VSDStencil> m_stencils;
110 };
111
112
113 } // namespace libvisio
114
115 #endif // __VSDSTENCILS_H__
116 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDStencil::m_firstShapeId
unsigned m_firstShapeId
Definition: VSDStencils.h:92
libvisio::VSDShape
Definition: VSDStencils.h:47
libvisio::VSDOptionalFillStyle
Definition: VSDStyles.h:102
libvisio::VSDShape::m_charList
VSDCharacterList m_charList
Definition: VSDStencils.h:66
libvisio::VSDStencil::m_shadowOffsetX
double m_shadowOffsetX
Definition: VSDStencils.h:90
libvisio::VSDShape::m_masterPage
unsigned m_masterPage
Definition: VSDStencils.h:60
libvisio::VSDShape::VSDShape
VSDShape()
Definition: VSDStencils.cpp:34
libvisio::VSDShape::m_paraList
VSDParagraphList m_paraList
Definition: VSDStencils.h:68
libvisio::VSDStencils::getStencilShape
const VSDShape * getStencilShape(unsigned pageId, unsigned shapeId) const
Definition: VSDStencils.cpp:206
libvisio::VSDShape::m_fields
VSDFieldList m_fields
Definition: VSDStencils.h:58
libvisio::VSDOptionalTextBlockStyle
Definition: VSDStyles.h:357
libvisio::VSDStencil::setFirstShape
void setFirstShape(unsigned id)
Definition: VSDStencils.cpp:166
libvisio::VSDShape::m_textFormat
TextFormat m_textFormat
Definition: VSDStencils.h:71
libvisio::VSDStencil::m_shadowOffsetY
double m_shadowOffsetY
Definition: VSDStencils.h:91
libvisio::VSDStencil::operator=
VSDStencil & operator=(const VSDStencil &stencil)
Definition: VSDStencils.cpp:149
VSDParagraphList.h
libvisio::VSDOptionalLineStyle
Definition: VSDStyles.h:43
libvisio::VSDMisc
Definition: VSDTypes.h:211
VSDCharacterList.h
libvisio::VSDShape::m_lineStyle
VSDOptionalLineStyle m_lineStyle
Definition: VSDStencils.h:62
VSDGeometryList.h
libvisio::VSDStencil::~VSDStencil
~VSDStencil()
Definition: VSDStencils.cpp:145
libvisio::VSDStencils
Definition: VSDStencils.h:95
libvisio::VSDShape::m_foreign
ForeignData * m_foreign
Definition: VSDStencils.h:59
libvisio::VSDOptionalParaStyle
Definition: VSDStyles.h:288
libvisio::VSDFieldList
Definition: VSDFieldList.h:102
libvisio::VSDShape::m_paraStyle
VSDOptionalParaStyle m_paraStyle
Definition: VSDStencils.h:67
libvisio::VSDParagraphList
Definition: VSDParagraphList.h:44
libvisio::VSDShape::m_fillStyle
VSDOptionalFillStyle m_fillStyle
Definition: VSDStencils.h:63
VSDTypes.h
libvisio::VSDShape::m_nurbsData
std::map< unsigned, NURBSData > m_nurbsData
Definition: VSDStencils.h:72
libvisio::VSDShape::m_shapeId
unsigned m_shapeId
Definition: VSDStencils.h:60
libvisio::VSDShape::m_xform
XForm m_xform
Definition: VSDStencils.h:74
libvisio::VSDStencils::addStencil
void addStencil(unsigned idx, const VSDStencil &stencil)
Definition: VSDStencils.cpp:192
libvisio::VSDShape::m_masterShape
unsigned m_masterShape
Definition: VSDStencils.h:60
VSDFieldList.h
libvisio::TextFormat
TextFormat
Definition: VSDTypes.h:163
libvisio::VSDShape::~VSDShape
~VSDShape()
Definition: VSDStencils.cpp:56
libvisio::VSDStencils::clear
void clear()
Definition: VSDStencils.cpp:218
libvisio::VSDShape::m_txtxform
XForm * m_txtxform
Definition: VSDStencils.h:75
VSDShapeList.h
libvisio::VSDShape::m_misc
VSDMisc m_misc
Definition: VSDStencils.h:76
libvisio::ForeignData
Definition: VSDTypes.h:140
libvisio::VSDStencil
Definition: VSDStencils.h:79
libvisio::VSDStencils::m_stencils
std::map< unsigned, VSDStencil > m_stencils
Definition: VSDStencils.h:109
libvisio::VSDOptionalCharStyle
Definition: VSDStyles.h:181
libvisio::VSDStencil::m_shapes
std::map< unsigned, VSDShape > m_shapes
Definition: VSDStencils.h:89
libvisio::VSDShape::m_fillStyleId
unsigned m_fillStyleId
Definition: VSDStencils.h:61
libvisio::VSDShape::m_textBlockStyle
VSDOptionalTextBlockStyle m_textBlockStyle
Definition: VSDStencils.h:64
VSDStyles.h
libvisio::VSDShape::m_lineStyleId
unsigned m_lineStyleId
Definition: VSDStencils.h:61
libvisio::VSDShapeList
Definition: VSDShapeList.h:40
libvisio::VSDStencil::addStencilShape
void addStencilShape(unsigned id, const VSDShape &shape)
Definition: VSDStencils.cpp:161
libvisio::VSDShape::m_parent
unsigned m_parent
Definition: VSDStencils.h:60
libvisio::VSDShape::operator=
VSDShape & operator=(const VSDShape &shape)
Definition: VSDStencils.cpp:61
libvisio::VSDShape::m_charStyle
VSDOptionalCharStyle m_charStyle
Definition: VSDStencils.h:65
libvisio::VSDShape::m_names
std::map< unsigned, VSDName > m_names
Definition: VSDStencils.h:70
libvisio::XForm
Definition: VSDTypes.h:43
libvisio::VSDStencils::getStencil
const VSDStencil * getStencil(unsigned idx) const
Definition: VSDStencils.cpp:197
libvisio::VSDStencil::VSDStencil
VSDStencil()
Definition: VSDStencils.cpp:134
libvisio::VSDCharacterList
Definition: VSDCharacterList.h:45
libvisio::VSDStencils::VSDStencils
VSDStencils()
Definition: VSDStencils.cpp:183
libvisio::VSDStencils::count
unsigned count() const
Definition: VSDStencils.h:103
libvisio::VSDShape::clear
void clear()
Definition: VSDStencils.cpp:99
libvisio::VSDStencils::~VSDStencils
~VSDStencils()
Definition: VSDStencils.cpp:188
libvisio::VSDStencil::getStencilShape
const VSDShape * getStencilShape(unsigned id) const
Definition: VSDStencils.cpp:172
libvisio::VSDShape::m_shapeList
VSDShapeList m_shapeList
Definition: VSDStencils.h:57
libvisio::VSDShape::m_text
WPXBinaryData m_text
Definition: VSDStencils.h:69
libvisio::VSDShape::m_polylineData
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDStencils.h:73
libvisio::VSDShape::m_textStyleId
unsigned m_textStyleId
Definition: VSDStencils.h:61
libvisio::VSDShape::m_geometries
std::map< unsigned, VSDGeometryList > m_geometries
Definition: VSDStencils.h:56