[Test] Added tests for CUtil::SplitParams
[xbmc.git] / xbmc / guilib / GUIColorManager.h
blobac33c6d47aa49abec1a1070c70cd7d6c55c83fd5
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 /*!
12 \file GUIColorManager.h
13 \brief
16 /*!
17 \ingroup textures
18 \brief
21 #include "utils/ColorUtils.h"
23 #include <map>
24 #include <string>
25 #include <utility>
26 #include <vector>
28 class CXBMCTinyXML;
30 class CGUIColorManager
32 public:
33 CGUIColorManager(void);
34 virtual ~CGUIColorManager(void);
36 void Load(const std::string &colorFile);
38 UTILS::COLOR::Color GetColor(const std::string& color) const;
40 void Clear();
42 /*! \brief Load a colors list from a XML file
43 \param filePath The path to the XML file
44 \param colors The vector to populate
45 \param sortColors if true the colors will be sorted in a hue scale
46 \return true if success, otherwise false
48 bool LoadColorsListFromXML(const std::string& filePath,
49 std::vector<std::pair<std::string, UTILS::COLOR::ColorInfo>>& colors,
50 bool sortColors);
52 protected:
53 bool LoadXML(CXBMCTinyXML& xmlDoc);
55 std::map<std::string, UTILS::COLOR::Color> m_colors;