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;
69  WPXBinaryData m_text;
70  std::map< unsigned, VSDName > m_names;
72  std::map<unsigned, NURBSData> m_nurbsData;
73  std::map<unsigned, PolylineData> m_polylineData;
77 };
78 
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;
92  unsigned m_firstShapeId;
93 };
94 
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: */
unsigned m_firstShapeId
Definition: VSDStencils.h:92
Definition: VSDStencils.h:47
Definition: VSDStyles.h:102
VSDCharacterList m_charList
Definition: VSDStencils.h:66
double m_shadowOffsetX
Definition: VSDStencils.h:90
unsigned m_masterPage
Definition: VSDStencils.h:60
VSDShape()
Definition: VSDStencils.cpp:34
VSDParagraphList m_paraList
Definition: VSDStencils.h:68
const VSDShape * getStencilShape(unsigned pageId, unsigned shapeId) const
Definition: VSDStencils.cpp:206
VSDFieldList m_fields
Definition: VSDStencils.h:58
Definition: VSDStyles.h:357
void setFirstShape(unsigned id)
Definition: VSDStencils.cpp:166
TextFormat m_textFormat
Definition: VSDStencils.h:71
double m_shadowOffsetY
Definition: VSDStencils.h:91
VSDStencil & operator=(const VSDStencil &stencil)
Definition: VSDStencils.cpp:149
Definition: VSDStyles.h:43
Definition: VSDTypes.h:211
VSDOptionalLineStyle m_lineStyle
Definition: VSDStencils.h:62
~VSDStencil()
Definition: VSDStencils.cpp:145
Definition: VSDStencils.h:95
ForeignData * m_foreign
Definition: VSDStencils.h:59
Definition: VSDStyles.h:288
Definition: VSDFieldList.h:102
VSDOptionalParaStyle m_paraStyle
Definition: VSDStencils.h:67
Definition: VSDParagraphList.h:44
VSDOptionalFillStyle m_fillStyle
Definition: VSDStencils.h:63
std::map< unsigned, NURBSData > m_nurbsData
Definition: VSDStencils.h:72
unsigned m_shapeId
Definition: VSDStencils.h:60
XForm m_xform
Definition: VSDStencils.h:74
void addStencil(unsigned idx, const VSDStencil &stencil)
Definition: VSDStencils.cpp:192
unsigned m_masterShape
Definition: VSDStencils.h:60
TextFormat
Definition: VSDTypes.h:163
~VSDShape()
Definition: VSDStencils.cpp:56
void clear()
Definition: VSDStencils.cpp:218
XForm * m_txtxform
Definition: VSDStencils.h:75
VSDMisc m_misc
Definition: VSDStencils.h:76
Definition: VSDTypes.h:140
Definition: VSDStencils.h:79
std::map< unsigned, VSDStencil > m_stencils
Definition: VSDStencils.h:109
Definition: VSDStyles.h:181
std::map< unsigned, VSDShape > m_shapes
Definition: VSDStencils.h:89
unsigned m_fillStyleId
Definition: VSDStencils.h:61
VSDOptionalTextBlockStyle m_textBlockStyle
Definition: VSDStencils.h:64
unsigned m_lineStyleId
Definition: VSDStencils.h:61
Definition: VSDShapeList.h:40
void addStencilShape(unsigned id, const VSDShape &shape)
Definition: VSDStencils.cpp:161
unsigned m_parent
Definition: VSDStencils.h:60
VSDShape & operator=(const VSDShape &shape)
Definition: VSDStencils.cpp:61
VSDOptionalCharStyle m_charStyle
Definition: VSDStencils.h:65
std::map< unsigned, VSDName > m_names
Definition: VSDStencils.h:70
Definition: VSDTypes.h:43
const VSDStencil * getStencil(unsigned idx) const
Definition: VSDStencils.cpp:197
VSDStencil()
Definition: VSDStencils.cpp:134
Definition: VSDCharacterList.h:45
VSDStencils()
Definition: VSDStencils.cpp:183
unsigned count() const
Definition: VSDStencils.h:103
void clear()
Definition: VSDStencils.cpp:99
~VSDStencils()
Definition: VSDStencils.cpp:188
const VSDShape * getStencilShape(unsigned id) const
Definition: VSDStencils.cpp:172
VSDShapeList m_shapeList
Definition: VSDStencils.h:57
WPXBinaryData m_text
Definition: VSDStencils.h:69
std::map< unsigned, PolylineData > m_polylineData
Definition: VSDStencils.h:73
unsigned m_textStyleId
Definition: VSDStencils.h:61
std::map< unsigned, VSDGeometryList > m_geometries
Definition: VSDStencils.h:56

Generated for libvisio by doxygen 1.8.5