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: */

Generated for libvisio by doxygen 1.8.3.1