VSDXTheme.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 __VSDXTHEME_H__
11 #define __VSDXTHEME_H__
12 
13 #include <vector>
14 #include <map>
15 #include <boost/optional.hpp>
16 #include <librevenge-stream/librevenge-stream.h>
17 #include "VSDXMLHelper.h"
18 
19 namespace libvisio
20 {
21 
22 class VSDCollector;
23 
25 {
33 
35 };
36 
38 {
52  std::vector<VSDXVariationClrScheme> m_variationClrSchemeLst;
53 
54  VSDXClrScheme();
55 };
56 
57 struct VSDXFont
58 {
59  librevenge::RVNGString m_latinTypeFace;
60  librevenge::RVNGString m_eaTypeFace;
61  librevenge::RVNGString m_csTypeFace;
62  std::map<unsigned, librevenge::RVNGString> m_typeFaces;
63 
64  VSDXFont();
65 };
66 
68 {
71  unsigned m_schemeId;
72 
74 };
75 
76 class VSDXTheme
77 {
78 public:
79  VSDXTheme();
80  ~VSDXTheme();
81  bool parse(librevenge::RVNGInputStream *input);
82  boost::optional<Colour> getThemeColour(unsigned value, unsigned variationIndex = 0) const;
83 
84 private:
85  VSDXTheme(const VSDXTheme &);
86  VSDXTheme &operator=(const VSDXTheme &);
87 
88  boost::optional<Colour> readSrgbClr(xmlTextReaderPtr reader);
89  boost::optional<Colour> readSysClr(xmlTextReaderPtr reader);
90 
91  void readClrScheme(xmlTextReaderPtr reader);
92  void readThemeColour(xmlTextReaderPtr reader, int idToken, Colour &clr);
93  void readVariationClrSchemeLst(xmlTextReaderPtr reader);
94  void readVariationClrScheme(xmlTextReaderPtr reader, VSDXVariationClrScheme &varClrSch);
95  void readFontScheme(xmlTextReaderPtr reader);
96  void readFont(xmlTextReaderPtr reader, int idToken, VSDXFont &font);
97  void readTypeFace(xmlTextReaderPtr reader, librevenge::RVNGString &typeFace);
98  void readTypeFace(xmlTextReaderPtr reader, int &script, librevenge::RVNGString &typeFace);
99 
100  int getElementToken(xmlTextReaderPtr reader);
101 
104 };
105 
106 } // namespace libvisio
107 
108 #endif // __VSDXTHEME_H__
109 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Colour m_accent5
Definition: VSDXTheme.h:47
Colour m_varColor7
Definition: VSDXTheme.h:32
Colour m_varColor4
Definition: VSDXTheme.h:29
Colour m_lt2
Definition: VSDXTheme.h:42
VSDXFont m_minorFont
Definition: VSDXTheme.h:70
Colour m_varColor3
Definition: VSDXTheme.h:28
Colour m_varColor2
Definition: VSDXTheme.h:27
Colour m_bkgnd
Definition: VSDXTheme.h:51
Colour m_lt1
Definition: VSDXTheme.h:40
Definition: VSDTypes.h:72
Colour m_dk1
Definition: VSDXTheme.h:39
Colour m_varColor1
Definition: VSDXTheme.h:26
Definition: VSDXTheme.h:24
unsigned m_schemeId
Definition: VSDXTheme.h:71
Colour m_accent6
Definition: VSDXTheme.h:48
Colour m_varColor6
Definition: VSDXTheme.h:31
Definition: VSDXTheme.h:37
VSDXClrScheme m_clrScheme
Definition: VSDXTheme.h:102
Colour m_accent4
Definition: VSDXTheme.h:46
librevenge::RVNGString m_latinTypeFace
Definition: VSDXTheme.h:59
Definition: VSDXTheme.h:67
Colour m_accent1
Definition: VSDXTheme.h:43
librevenge::RVNGString m_eaTypeFace
Definition: VSDXTheme.h:60
librevenge::RVNGString m_csTypeFace
Definition: VSDXTheme.h:61
Colour m_folHlink
Definition: VSDXTheme.h:50
std::map< unsigned, librevenge::RVNGString > m_typeFaces
Definition: VSDXTheme.h:62
Colour m_dk2
Definition: VSDXTheme.h:41
Definition: libvisio_utils.h:48
Colour m_hlink
Definition: VSDXTheme.h:49
VSDXFont m_majorFont
Definition: VSDXTheme.h:69
Colour m_varColor5
Definition: VSDXTheme.h:30
Definition: VSDXTheme.h:57
Definition: VSDXTheme.h:76
VSDXVariationClrScheme()
Definition: VSDXTheme.cpp:20
Colour m_accent3
Definition: VSDXTheme.h:45
Colour m_accent2
Definition: VSDXTheme.h:44
std::vector< VSDXVariationClrScheme > m_variationClrSchemeLst
Definition: VSDXTheme.h:52
VSDXFontScheme m_fontScheme
Definition: VSDXTheme.h:103

Generated for libvisio by doxygen 1.8.11