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 <boost/optional.hpp>
15 #include <librevenge-stream/librevenge-stream.h>
16 #include "VSDXMLHelper.h"
17 
18 namespace libvisio
19 {
20 
21 class VSDCollector;
22 
24 {
32 
34 };
35 
37 {
51  std::vector<VSDXVariationClrScheme> m_variationClrSchemeLst;
52 
53  VSDXClrScheme();
54 };
55 
56 class VSDXTheme
57 {
58 public:
59  VSDXTheme();
60  ~VSDXTheme();
61  bool parse(librevenge::RVNGInputStream *input);
62  boost::optional<Colour> getThemeColour(unsigned value, unsigned variationIndex = 0) const;
63 
64 private:
65  VSDXTheme(const VSDXTheme &);
66  VSDXTheme &operator=(const VSDXTheme &);
67 
68  boost::optional<Colour> readSrgbClr(xmlTextReaderPtr reader);
69  boost::optional<Colour> readSysClr(xmlTextReaderPtr reader);
70 
71  void readClrScheme(xmlTextReaderPtr reader);
72  void readThemeColour(xmlTextReaderPtr reader, int idToken, Colour &clr);
73  void readVariationClrSchemeLst(xmlTextReaderPtr reader);
74  void readVariationClrScheme(xmlTextReaderPtr reader, VSDXVariationClrScheme &varClrSch);
75 
76  int getElementToken(xmlTextReaderPtr reader);
77 
79 };
80 
81 } // namespace libvisio
82 
83 #endif // __VSDXTHEME_H__
84 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Colour m_accent5
Definition: VSDXTheme.h:46
Colour m_varColor7
Definition: VSDXTheme.h:31
bool parse(librevenge::RVNGInputStream *input)
Definition: VSDXTheme.cpp:58
Colour m_varColor4
Definition: VSDXTheme.h:28
Colour m_lt2
Definition: VSDXTheme.h:41
Colour m_varColor3
Definition: VSDXTheme.h:27
Colour m_varColor2
Definition: VSDXTheme.h:26
Colour m_bkgnd
Definition: VSDXTheme.h:50
Colour m_lt1
Definition: VSDXTheme.h:39
Definition: VSDTypes.h:57
boost::optional< Colour > readSysClr(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:115
VSDXTheme()
Definition: VSDXTheme.cpp:43
Colour m_dk1
Definition: VSDXTheme.h:38
Colour m_varColor1
Definition: VSDXTheme.h:25
Definition: VSDXTheme.h:23
Colour m_accent6
Definition: VSDXTheme.h:47
void readVariationClrScheme(xmlTextReaderPtr reader, VSDXVariationClrScheme &varClrSch)
Definition: VSDXTheme.cpp:265
Colour m_varColor6
Definition: VSDXTheme.h:30
Definition: VSDXTheme.h:36
VSDXClrScheme m_clrScheme
Definition: VSDXTheme.h:78
void readClrScheme(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:136
boost::optional< Colour > readSrgbClr(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:94
Colour m_accent4
Definition: VSDXTheme.h:45
~VSDXTheme()
Definition: VSDXTheme.cpp:48
VSDXClrScheme()
Definition: VSDXTheme.cpp:25
VSDXTheme & operator=(const VSDXTheme &)
Colour m_accent1
Definition: VSDXTheme.h:42
Colour m_folHlink
Definition: VSDXTheme.h:49
boost::optional< Colour > getThemeColour(unsigned value, unsigned variationIndex=0) const
Definition: VSDXTheme.cpp:309
Colour m_dk2
Definition: VSDXTheme.h:40
Colour m_hlink
Definition: VSDXTheme.h:48
int getElementToken(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:53
Colour m_varColor5
Definition: VSDXTheme.h:29
void readVariationClrSchemeLst(xmlTextReaderPtr reader)
Definition: VSDXTheme.cpp:235
Definition: VSDXTheme.h:56
void readThemeColour(xmlTextReaderPtr reader, int idToken, Colour &clr)
Definition: VSDXTheme.cpp:202
VSDXVariationClrScheme()
Definition: VSDXTheme.cpp:14
Colour m_accent3
Definition: VSDXTheme.h:44
Colour m_accent2
Definition: VSDXTheme.h:43
std::vector< VSDXVariationClrScheme > m_variationClrSchemeLst
Definition: VSDXTheme.h:51

Generated for libvisio by doxygen 1.8.6