VSDStencils.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* This file is part of the libvisio project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef __VSDSTENCILS_H__
#define __VSDSTENCILS_H__
#include <map>
#include <memory>
#include <vector>
#include "VSDStyles.h"
#include "VSDGeometryList.h"
#include "VSDFieldList.h"
#include "VSDTypes.h"
#include "VSDParagraphList.h"
#include "VSDCharacterList.h"
#include "VSDShapeList.h"
namespace libvisio
{
class VSDShape
{
public:
VSDShape();
VSDShape(const VSDShape &shape);
~VSDShape();
VSDShape &operator=(const VSDShape &shape);
void clear();
std::map<unsigned, VSDGeometryList> m_geometries;
VSDShapeList m_shapeList;
VSDFieldList m_fields;
std::unique_ptr<ForeignData> m_foreign;
unsigned m_parent, m_masterPage, m_masterShape, m_shapeId;
unsigned m_lineStyleId, m_fillStyleId, m_textStyleId;
VSDOptionalLineStyle m_lineStyle;
VSDOptionalFillStyle m_fillStyle;
VSDOptionalTextBlockStyle m_textBlockStyle;
VSDOptionalCharStyle m_charStyle;
VSDCharacterList m_charList;
VSDOptionalParaStyle m_paraStyle;
VSDParagraphList m_paraList;
std::map<unsigned, VSDTabSet> m_tabSets;
librevenge::RVNGBinaryData m_text;
std::map<unsigned, VSDName> m_names;
TextFormat m_textFormat;
std::map<unsigned, NURBSData> m_nurbsData;
std::map<unsigned, PolylineData> m_polylineData;
XForm m_xform;
std::unique_ptr<XForm> m_txtxform;
std::unique_ptr<XForm1D> m_xform1d;
VSDMisc m_misc;
VSDName m_layerMem;
VSDName m_aName;
};
class VSDStencil
{
public:
VSDStencil();
VSDStencil(const VSDStencil &stencil) = default;
~VSDStencil();
VSDStencil &operator=(const VSDStencil &stencil) = default;
void addStencilShape(unsigned id, const VSDShape &shape);
void setFirstShape(unsigned id);
const VSDShape *getStencilShape(unsigned id) const;
std::map<unsigned, VSDShape> m_shapes;
double m_shadowOffsetX;
double m_shadowOffsetY;
unsigned m_firstShapeId;
};
class VSDStencils
{
public:
VSDStencils();
~VSDStencils();
void addStencil(unsigned idx, const VSDStencil &stencil);
const VSDStencil *getStencil(unsigned idx) const;
const VSDShape *getStencilShape(unsigned pageId, unsigned shapeId) const;
unsigned count() const
{
return m_stencils.size();
}
private:
std::map<unsigned, VSDStencil> m_stencils;
};
} // namespace libvisio
#endif // __VSDSTENCILS_H__
/* 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