xbmc
GUIInfoColor.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 
16 #include "guilib/GUIListItem.h"
17 #include "utils/ColorUtils.h"
18 
19 #include <string>
20 
21 class CGUIListItem;
22 
23 namespace KODI
24 {
25 namespace GUILIB
26 {
27 namespace GUIINFO
28 {
29 
31 {
32 public:
33  constexpr CGUIInfoColor(UTILS::COLOR::Color color = 0) : m_color(color) {}
34 
35  constexpr operator UTILS::COLOR::Color() const { return m_color; }
36 
37  bool Update(const CGUIListItem* item = nullptr);
38  void Parse(const std::string &label, int context);
39 
44  bool HasInfo() const { return m_info != 0; }
45 
46 private:
47  int m_info = 0;
48  UTILS::COLOR::Color m_color;
49 };
50 
51 } // namespace GUIINFO
52 } // namespace GUILIB
53 } // namespace KODI
Definition: GUIListItem.h:30
bool HasInfo() const
Check if the infocolor has an info condition bound to its color definition (or otherwise, if it&#39;s constant color)
Definition: GUIInfoColor.h:44
Definition: AudioDecoder.h:18
Definition: GUIInfoColor.h:30