VSDStencils.h Source File documentation

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 <memory>
15#include <vector>
16#include "VSDStyles.h"
17#include "VSDGeometryList.h"
18#include "VSDFieldList.h"
19#include "VSDTypes.h"
20#include "VSDParagraphList.h"
21#include "VSDCharacterList.h"
22#include "VSDShapeList.h"
23
24namespace libvisio
25{
26
27 class VSDShape
28{
29public:
30 VSDShape();
31 VSDShape(const VSDShape &shape);
32 ~VSDShape();
33 VSDShape &operator=(const VSDShape &shape);
34 void clear();
35
36 std::map<unsigned, VSDGeometryList> m_geometries;
37 VSDShapeList m_shapeList;
38 VSDFieldList m_fields;
39 std::unique_ptr<ForeignData> m_foreign;
40 unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
41 unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
42 VSDOptionalLineStyle m_lineStyle;
43 VSDOptionalFillStyle m_fillStyle;
44 VSDOptionalTextBlockStyle m_textBlockStyle;
45 VSDOptionalCharStyle m_charStyle;
46 VSDCharacterList m_charList;
47 VSDOptionalParaStyle m_paraStyle;
48 VSDParagraphList m_paraList;
49 std::map<unsigned, VSDTabSet> m_tabSets;
50 librevenge::RVNGBinaryData m_text;
51 std::map<unsigned, VSDName> m_names;
52 TextFormat m_textFormat;
53 std::map<unsigned, NURBSData> m_nurbsData;
54 std::map<unsigned, PolylineData> m_polylineData;
55 XForm m_xform;
56 std::unique_ptr<XForm> m_txtxform;
57 std::unique_ptr<XForm1D> m_xform1d;
58 VSDMisc m_misc;
59 VSDName m_layerMem;
60 VSDName m_aName;
61};
62
63 class VSDStencil
64{
65public:
66 VSDStencil();
67 VSDStencil(const VSDStencil &stencil) = default;
68 ~VSDStencil();
69 VSDStencil &operator=(const VSDStencil &stencil) = default;
70 void addStencilShape(unsigned id, const VSDShape &shape);
71 void setFirstShape(unsigned id);
72 const VSDShape *getStencilShape(unsigned id) const;
73 std::map<unsigned, VSDShape> m_shapes;
74 double m_shadowOffsetX;
75 double m_shadowOffsetY;
76 unsigned m_firstShapeId;
77};
78
79 class VSDStencils
80{
81public:
82 VSDStencils();
83 ~VSDStencils();
84 void addStencil(unsigned idx, const VSDStencil &stencil);
85 const VSDStencil *getStencil(unsigned idx) const;
86 const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
87 unsigned count() const
88 {
89 return m_stencils.size();
90 }
91private:
92 std::map<unsigned, VSDStencil> m_stencils;
93};
94
95
96} // namespace libvisio
97
98#endif // __VSDSTENCILS_H__
99/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDCharacterList.h
VSDFieldList.h
VSDGeometryList.h
VSDParagraphList.h
VSDShapeList.h
VSDStyles.h
VSDTypes.h
libvisio::VSDCharacterList
Definition VSDCharacterList.h:26
libvisio::VSDFieldList
Definition VSDFieldList.h:88
libvisio::VSDName
Definition VSDTypes.h:171
libvisio::VSDParagraphList
Definition VSDParagraphList.h:25
libvisio::VSDShapeList
Definition VSDShapeList.h:20
libvisio::VSDShape
Definition VSDStencils.h:28
libvisio::VSDShape::m_tabSets
std::map< unsigned, VSDTabSet > m_tabSets
Definition VSDStencils.h:49
libvisio::VSDShape::operator=
VSDShape & operator=(const VSDShape &shape)
Definition VSDStencils.cpp:44
libvisio::VSDShape::m_geometries
std::map< unsigned, VSDGeometryList > m_geometries
Definition VSDStencils.h:36
libvisio::VSDShape::m_lineStyle
VSDOptionalLineStyle m_lineStyle
Definition VSDStencils.h:42
libvisio::VSDShape::m_lineStyleId
unsigned m_lineStyleId
Definition VSDStencils.h:41
libvisio::VSDShape::m_misc
VSDMisc m_misc
Definition VSDStencils.h:58
libvisio::VSDShape::m_text
librevenge::RVNGBinaryData m_text
Definition VSDStencils.h:50
libvisio::VSDShape::m_fields
VSDFieldList m_fields
Definition VSDStencils.h:38
libvisio::VSDShape::m_masterShape
unsigned m_masterShape
Definition VSDStencils.h:40
libvisio::VSDShape::m_parent
unsigned m_parent
Definition VSDStencils.h:40
libvisio::VSDShape::m_names
std::map< unsigned, VSDName > m_names
Definition VSDStencils.h:51
libvisio::VSDShape::m_nurbsData
std::map< unsigned, NURBSData > m_nurbsData
Definition VSDStencils.h:53
libvisio::VSDShape::m_paraList
VSDParagraphList m_paraList
Definition VSDStencils.h:48
libvisio::VSDShape::m_shapeList
VSDShapeList m_shapeList
Definition VSDStencils.h:37
libvisio::VSDShape::m_charStyle
VSDOptionalCharStyle m_charStyle
Definition VSDStencils.h:45
libvisio::VSDShape::VSDShape
VSDShape()
Definition VSDStencils.cpp:14
libvisio::VSDShape::m_fillStyleId
unsigned m_fillStyleId
Definition VSDStencils.h:41
libvisio::VSDShape::m_foreign
std::unique_ptr< ForeignData > m_foreign
Definition VSDStencils.h:39
libvisio::VSDShape::m_xform
XForm m_xform
Definition VSDStencils.h:55
libvisio::VSDShape::m_masterPage
unsigned m_masterPage
Definition VSDStencils.h:40
libvisio::VSDShape::m_paraStyle
VSDOptionalParaStyle m_paraStyle
Definition VSDStencils.h:47
libvisio::VSDShape::clear
void clear()
Definition VSDStencils.cpp:82
libvisio::VSDShape::m_textStyleId
unsigned m_textStyleId
Definition VSDStencils.h:41
libvisio::VSDShape::m_shapeId
unsigned m_shapeId
Definition VSDStencils.h:40
libvisio::VSDShape::m_layerMem
VSDName m_layerMem
Definition VSDStencils.h:59
libvisio::VSDShape::m_charList
VSDCharacterList m_charList
Definition VSDStencils.h:46
libvisio::VSDShape::m_fillStyle
VSDOptionalFillStyle m_fillStyle
Definition VSDStencils.h:43
libvisio::VSDShape::m_polylineData
std::map< unsigned, PolylineData > m_polylineData
Definition VSDStencils.h:54
libvisio::VSDShape::m_txtxform
std::unique_ptr< XForm > m_txtxform
Definition VSDStencils.h:56
libvisio::VSDShape::m_textBlockStyle
VSDOptionalTextBlockStyle m_textBlockStyle
Definition VSDStencils.h:44
libvisio::VSDShape::~VSDShape
~VSDShape()
Definition VSDStencils.cpp:39
libvisio::VSDShape::m_textFormat
TextFormat m_textFormat
Definition VSDStencils.h:52
libvisio::VSDShape::m_xform1d
std::unique_ptr< XForm1D > m_xform1d
Definition VSDStencils.h:57
libvisio::VSDShape::m_aName
VSDName m_aName
Definition VSDStencils.h:60
libvisio::VSDStencil
Definition VSDStencils.h:64
libvisio::VSDStencil::setFirstShape
void setFirstShape(unsigned id)
Definition VSDStencils.cpp:131
libvisio::VSDStencil::m_shadowOffsetX
double m_shadowOffsetX
Definition VSDStencils.h:74
libvisio::VSDStencil::VSDStencil
VSDStencil()
Definition VSDStencils.cpp:117
libvisio::VSDStencil::addStencilShape
void addStencilShape(unsigned id, const VSDShape &shape)
Definition VSDStencils.cpp:126
libvisio::VSDStencil::m_shadowOffsetY
double m_shadowOffsetY
Definition VSDStencils.h:75
libvisio::VSDStencil::m_firstShapeId
unsigned m_firstShapeId
Definition VSDStencils.h:76
libvisio::VSDStencil::m_shapes
std::map< unsigned, VSDShape > m_shapes
Definition VSDStencils.h:73
libvisio::VSDStencil::VSDStencil
VSDStencil(const VSDStencil &stencil)=default
libvisio::VSDStencil::operator=
VSDStencil & operator=(const VSDStencil &stencil)=default
libvisio::VSDStencil::~VSDStencil
~VSDStencil()
Definition VSDStencils.cpp:122
libvisio::VSDStencil::getStencilShape
const VSDShape * getStencilShape(unsigned id) const
Definition VSDStencils.cpp:137
libvisio::VSDStencils::getStencilShape
const VSDShape * getStencilShape(unsigned pageId, unsigned shapeId) const
Definition VSDStencils.cpp:171
libvisio::VSDStencils::getStencil
const VSDStencil * getStencil(unsigned idx) const
Definition VSDStencils.cpp:162
libvisio::VSDStencils::m_stencils
std::map< unsigned, VSDStencil > m_stencils
Definition VSDStencils.h:92
libvisio::VSDStencils::addStencil
void addStencil(unsigned idx, const VSDStencil &stencil)
Definition VSDStencils.cpp:157
libvisio::VSDStencils::VSDStencils
VSDStencils()
Definition VSDStencils.cpp:148
libvisio::VSDStencils::~VSDStencils
~VSDStencils()
Definition VSDStencils.cpp:153
libvisio::VSDStencils::count
unsigned count() const
Definition VSDStencils.h:87
libvisio
Definition libvisio_utils.h:47
libvisio::TextFormat
TextFormat
Definition VSDTypes.h:150
libvisio::VSDMisc
Definition VSDTypes.h:204
libvisio::VSDOptionalCharStyle
Definition VSDStyles.h:226
libvisio::VSDOptionalFillStyle
Definition VSDStyles.h:104
libvisio::VSDOptionalLineStyle
Definition VSDStyles.h:24
libvisio::VSDOptionalParaStyle
Definition VSDStyles.h:340
libvisio::VSDOptionalTextBlockStyle
Definition VSDStyles.h:437
libvisio::XForm
Definition VSDTypes.h:23