Debian Codegraph @

include/docmodel/theme/ColorSet.hxx

raw
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice 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
11 #pragma once
12
13 #include <array>
14 #include <docmodel/dllapi.h>
15 #include <rtl/ustring.hxx>
16 #include <docmodel/theme/ThemeColorType.hxx>
17 #include <docmodel/color/ComplexColor.hxx>
18 #include <tools/color.hxx>
19
20 typedef struct _xmlTextWriter* xmlTextWriterPtr;
21
22 namespace model
23 {
24 class DOCMODEL_DLLPUBLIC ColorSet
25 {
26 OUString maName;
27 std::array<Color, 12> maColors;
28
29 public:
30 ColorSet(OUString const& rName);
31
32 void setName(OUString const& rName) { maName = rName; }
33
34 void add(model::ThemeColorType Type, Color aColorData);
35
36 const OUString& getName() const { return maName; }
37
38 Color resolveColor(model::ComplexColor const& rComplexColor) const;
39
40 Color getColor(model::ThemeColorType eType) const;
41
42 void dumpAsXml(xmlTextWriterPtr pWriter) const;
43 };
44
45 } // end of namespace model
46
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */