VSDCharacterList.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 __VSDCHARACTERLIST_H__
11#define __VSDCHARACTERLIST_H__
12
13#include <memory>
14#include <vector>
15#include <map>
16#include "VSDTypes.h"
17#include "VSDStyles.h"
18
19namespace libvisio
20{
21
23class VSDCollector;
24
26{
27public:
29 VSDCharacterList(const VSDCharacterList &charList);
32 void addCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<VSDName> &font,
33 const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
34 const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline,
35 const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps,
36 const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript,
37 const boost::optional<bool> &subscript, const boost::optional<double> &scaleWidth);
38 void addCharIX(unsigned id, unsigned level, const VSDOptionalCharStyle &style);
39 unsigned getCharCount(unsigned id) const;
40 void setCharCount(unsigned id, unsigned charCount);
41 void resetCharCount();
42 unsigned getLevel() const;
43
44 void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
45 void handle(VSDCollector *collector) const;
46 void clear();
47 bool empty() const
48 {
49 return (m_elements.empty());
50 }
51private:
52 std::map<unsigned, std::unique_ptr<VSDCharacterListElement>> m_elements;
53 std::vector<unsigned> m_elementsOrder;
54};
55
56} // namespace libvisio
57
58#endif // __VSDCHARACTERLIST_H__
59/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition VSDCharacterList.cpp:18
void setCharCount(unsigned id, unsigned charCount)
Definition VSDCharacterList.cpp:141
~VSDCharacterList()
Definition VSDCharacterList.cpp:102
bool empty() const
Definition VSDCharacterList.h:47
VSDCharacterList & operator=(const VSDCharacterList &charList)
Definition VSDCharacterList.cpp:90
void handle(VSDCollector *collector) const
Definition VSDCharacterList.cpp:168
void setElementsOrder(const std::vector< unsigned > &m_elementsOrder)
Definition VSDCharacterList.cpp:161
void clear()
Definition VSDCharacterList.cpp:189
std::map< unsigned, std::unique_ptr< VSDCharacterListElement > > m_elements
Definition VSDCharacterList.h:52
unsigned getLevel() const
Definition VSDCharacterList.cpp:154
void addCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional< VSDName > &font, const boost::optional< Colour > &fontColour, const boost::optional< double > &fontSize, const boost::optional< bool > &bold, const boost::optional< bool > &italic, const boost::optional< bool > &underline, const boost::optional< bool > &doubleunderline, const boost::optional< bool > &strikeout, const boost::optional< bool > &doublestrikeout, const boost::optional< bool > &allcaps, const boost::optional< bool > &initcaps, const boost::optional< bool > &smallcaps, const boost::optional< bool > &superscript, const boost::optional< bool > &subscript, const boost::optional< double > &scaleWidth)
Definition VSDCharacterList.cpp:107
unsigned getCharCount(unsigned id) const
Definition VSDCharacterList.cpp:132
VSDCharacterList()
Definition VSDCharacterList.cpp:76
std::vector< unsigned > m_elementsOrder
Definition VSDCharacterList.h:53
void resetCharCount()
Definition VSDCharacterList.cpp:148
Definition VSDCollector.h:21
Definition libvisio_utils.h:49
Definition VSDStyles.h:208

Generated for libvisio by doxygen 1.14.0