xbmc
GUIColorManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
21 #include "utils/ColorUtils.h"
22 
23 #include <map>
24 #include <string>
25 #include <utility>
26 #include <vector>
27 
28 class CXBMCTinyXML;
29 
31 {
32 public:
33  CGUIColorManager(void);
34  virtual ~CGUIColorManager(void);
35 
36  void Load(const std::string &colorFile);
37 
38  UTILS::COLOR::Color GetColor(const std::string& color) const;
39 
40  void Clear();
41 
48  bool LoadColorsListFromXML(const std::string& filePath,
49  std::vector<std::pair<std::string, UTILS::COLOR::ColorInfo>>& colors,
50  bool sortColors);
51 
52 protected:
53  bool LoadXML(CXBMCTinyXML& xmlDoc);
54 
55  std::map<std::string, UTILS::COLOR::Color> m_colors;
56 };
Definition: XBMCTinyXML.h:33
bool LoadColorsListFromXML(const std::string &filePath, std::vector< std::pair< std::string, UTILS::COLOR::ColorInfo >> &colors, bool sortColors)
Load a colors list from a XML file.
Definition: GUIColorManager.cpp:107
Definition: GUIColorManager.h:30