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 <vector>
14#include <map>
15#include "VSDTypes.h"
16#include "VSDStyles.h"
17
18namespace libvisio
19{
20
21class VSDCharacterListElement;
22class VSDCollector;
23
25{
26public:
28 VSDCharacterList(const VSDCharacterList &charList);
31 void addCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<VSDName> &font,
32 const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
33 const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline,
34 const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps,
35 const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript,
36 const boost::optional<bool> &subscript, const boost::optional<double> &scaleWidth);
37 void addCharIX(unsigned id, unsigned level, const VSDOptionalCharStyle &style);
38 unsigned getCharCount(unsigned id) const;
39 void setCharCount(unsigned id, unsigned charCount);
40 void resetCharCount();
41 unsigned getLevel() const;
42
43 void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
44 void handle(VSDCollector *collector) const;
45 void clear();
46 bool empty() const
47 {
48 return (m_elements.empty());
49 }
50private:
51 std::map<unsigned, VSDCharacterListElement *> m_elements;
52 std::vector<unsigned> m_elementsOrder;
53};
54
55} // namespace libvisio
56
57#endif // __VSDCHARACTERLIST_H__
58/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: VSDCharacterList.h:25
void setCharCount(unsigned id, unsigned charCount)
Definition: VSDCharacterList.cpp:142
std::map< unsigned, VSDCharacterListElement * > m_elements
Definition: VSDCharacterList.h:51
~VSDCharacterList()
Definition: VSDCharacterList.cpp:100
bool empty() const
Definition: VSDCharacterList.h:46
VSDCharacterList & operator=(const VSDCharacterList &charList)
Definition: VSDCharacterList.cpp:90
void handle(VSDCollector *collector) const
Definition: VSDCharacterList.cpp:169
void setElementsOrder(const std::vector< unsigned > &m_elementsOrder)
Definition: VSDCharacterList.cpp:162
void clear()
Definition: VSDCharacterList.cpp:191
unsigned getLevel() const
Definition: VSDCharacterList.cpp:155
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:105
unsigned getCharCount(unsigned id) const
Definition: VSDCharacterList.cpp:133
VSDCharacterList()
Definition: VSDCharacterList.cpp:75
std::vector< unsigned > m_elementsOrder
Definition: VSDCharacterList.h:52
void resetCharCount()
Definition: VSDCharacterList.cpp:149
Definition: VSDCollector.h:21
Definition: VisioDocument.h:30
Definition: VSDStyles.h:224

Generated for libvisio by doxygen 1.9.2