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
19namespace libvisio
20{
21
22class VSDCollector;
23
25{
33
35};
36
38{
52 std::vector<VSDXVariationClrScheme> m_variationClrSchemeLst;
53
55};
56
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
77{
78public:
79 VSDXTheme();
80 ~VSDXTheme();
81 bool parse(librevenge::RVNGInputStream *input);
82 boost::optional<Colour> getThemeColour(unsigned value, unsigned variationIndex = 0) const;
83
84private:
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 bool readTypeFace(xmlTextReaderPtr reader, librevenge::RVNGString &typeFace);
98 bool 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: */
Definition: VSDXTheme.h:77
void readFontScheme(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:158
int getElementToken(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:75
VSDXClrScheme m_clrScheme
Definition: VSDXTheme.h:102
void readVariationClrScheme(xmlTextReaderPtr reader, VSDXVariationClrScheme &varClrSch)
Definition: VSDXTheme.cpp:387
bool readTypeFace(xmlTextReaderPtr reader, librevenge::RVNGString &typeFace)
Definition: VSDXTheme.cpp:231
void readFont(xmlTextReaderPtr reader, int idToken, VSDXFont &font)
Definition: VSDXTheme.cpp:190
void readVariationClrSchemeLst(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:356
void readThemeColour(xmlTextReaderPtr reader, int idToken, Colour &clr)
Definition: VSDXTheme.cpp:323
bool parse(librevenge::RVNGInputStream *input)
Definition: VSDXTheme.cpp:80
void readClrScheme(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:256
~VSDXTheme()
Definition: VSDXTheme.cpp:70
boost::optional< Colour > readSysClr(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:138
VSDXTheme(const VSDXTheme &)
boost::optional< Colour > getThemeColour(unsigned value, unsigned variationIndex=0) const
Definition: VSDXTheme.cpp:432
VSDXTheme & operator=(const VSDXTheme &)
VSDXFontScheme m_fontScheme
Definition: VSDXTheme.h:103
boost::optional< Colour > readSrgbClr(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:118
VSDXTheme()
Definition: VSDXTheme.cpp:64
Definition: libvisio_utils.h:49
Definition: VSDTypes.h:71
Definition: VSDXTheme.h:38
VSDXClrScheme()
Definition: VSDXTheme.cpp:31
Colour m_accent6
Definition: VSDXTheme.h:48
Colour m_accent3
Definition: VSDXTheme.h:45
std::vector< VSDXVariationClrScheme > m_variationClrSchemeLst
Definition: VSDXTheme.h:52
Colour m_accent4
Definition: VSDXTheme.h:46
Colour m_dk1
Definition: VSDXTheme.h:39
Colour m_dk2
Definition: VSDXTheme.h:41
Colour m_lt2
Definition: VSDXTheme.h:42
Colour m_hlink
Definition: VSDXTheme.h:49
Colour m_lt1
Definition: VSDXTheme.h:40
Colour m_accent1
Definition: VSDXTheme.h:43
Colour m_folHlink
Definition: VSDXTheme.h:50
Colour m_bkgnd
Definition: VSDXTheme.h:51
Colour m_accent5
Definition: VSDXTheme.h:47
Colour m_accent2
Definition: VSDXTheme.h:44
Definition: VSDXTheme.h:68
VSDXFontScheme()
Definition: VSDXTheme.cpp:57
unsigned m_schemeId
Definition: VSDXTheme.h:71
VSDXFont m_majorFont
Definition: VSDXTheme.h:69
VSDXFont m_minorFont
Definition: VSDXTheme.h:70
Definition: VSDXTheme.h:58
librevenge::RVNGString m_csTypeFace
Definition: VSDXTheme.h:61
librevenge::RVNGString m_latinTypeFace
Definition: VSDXTheme.h:59
VSDXFont()
Definition: VSDXTheme.cpp:49
std::map< unsigned, librevenge::RVNGString > m_typeFaces
Definition: VSDXTheme.h:62
librevenge::RVNGString m_eaTypeFace
Definition: VSDXTheme.h:60
Definition: VSDXTheme.h:25
Colour m_varColor6
Definition: VSDXTheme.h:31
VSDXVariationClrScheme()
Definition: VSDXTheme.cpp:20
Colour m_varColor1
Definition: VSDXTheme.h:26
Colour m_varColor2
Definition: VSDXTheme.h:27
Colour m_varColor5
Definition: VSDXTheme.h:30
Colour m_varColor3
Definition: VSDXTheme.h:28
Colour m_varColor4
Definition: VSDXTheme.h:29
Colour m_varColor7
Definition: VSDXTheme.h:32

Generated for libvisio by doxygen 1.9.6