Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __VSDCHARACTERLIST_H__
00032 #define __VSDCHARACTERLIST_H__
00033
00034 #include <vector>
00035 #include <map>
00036 #include "VSDTypes.h"
00037 #include "VSDStyles.h"
00038
00039 namespace libvisio
00040 {
00041
00042 class VSDCharacterListElement;
00043 class VSDCollector;
00044
00045 class VSDCharacterList
00046 {
00047 public:
00048 VSDCharacterList();
00049 VSDCharacterList(const VSDCharacterList &charList);
00050 ~VSDCharacterList();
00051 VSDCharacterList &operator=(const VSDCharacterList &charList);
00052 void addCharIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<VSDName> &font,
00053 const boost::optional<Colour> &fontColour, const boost::optional<double> &fontSize, const boost::optional<bool> &bold,
00054 const boost::optional<bool> &italic, const boost::optional<bool> &underline, const boost::optional<bool> &doubleunderline,
00055 const boost::optional<bool> &strikeout, const boost::optional<bool> &doublestrikeout, const boost::optional<bool> &allcaps,
00056 const boost::optional<bool> &initcaps, const boost::optional<bool> &smallcaps, const boost::optional<bool> &superscript,
00057 const boost::optional<bool> &subscript);
00058 void addCharIX(unsigned id, unsigned level, const VSDOptionalCharStyle &style);
00059 unsigned getCharCount(unsigned id) const;
00060 void setCharCount(unsigned id, unsigned charCount);
00061 void resetCharCount();
00062 unsigned getLevel() const;
00063
00064 void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
00065 void handle(VSDCollector *collector) const;
00066 void clear();
00067 bool empty() const
00068 {
00069 return (m_elements.empty());
00070 }
00071 private:
00072 std::map<unsigned, VSDCharacterListElement *> m_elements;
00073 std::vector<unsigned> m_elementsOrder;
00074 };
00075
00076 }
00077
00078 #endif // __VSDCHARACTERLIST_H__
00079