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 
18 namespace libvisio
19 {
20 
21 class VSDCharacterListElement;
22 class VSDCollector;
23 
25 {
26 public:
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);
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  }
50 private:
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: */

Generated for libvisio by doxygen 1.8.4