PageRenderTime 17ms CodeModel.GetById 9ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/guilib/GUIRSSControl.h

http://github.com/xbmc/xbmc
C Header | 72 lines | 41 code | 16 blank | 15 comment | 0 complexity | 79e07f9f75f128b90c5dc08064b6981c MD5 | raw 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
11/*!
12\file GUIRSSControl.h
13\brief
14*/
15
16#include "GUIControl.h"
17#include "GUILabel.h"
18#include "utils/IRssObserver.h"
19
20#include <vector>
21
22class CRssReader;
23
24/*!
25\ingroup controls
26\brief
27*/
28class CGUIRSSControl : public CGUIControl, public IRssObserver
29{
30public:
31  CGUIRSSControl(int parentID, int controlID, float posX, float posY, float width, float height,
32                 const CLabelInfo& labelInfo, const KODI::GUILIB::GUIINFO::CGUIInfoColor &channelColor,
33                 const KODI::GUILIB::GUIINFO::CGUIInfoColor &headlineColor, std::string& strRSSTags);
34  CGUIRSSControl(const CGUIRSSControl &from);
35  ~CGUIRSSControl(void) override;
36  CGUIRSSControl *Clone() const override { return new CGUIRSSControl(*this); };
37
38  void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
39  void Render() override;
40  void OnFeedUpdate(const vecText &feed) override;
41  void OnFeedRelease() override;
42  bool CanFocus() const override { return true; };
43  CRect CalcRenderRegion() const override;
44
45  void OnFocus() override;
46  void OnUnFocus() override;
47
48  void SetUrlSet(const int urlset);
49
50protected:
51  bool UpdateColors() override;
52
53  CCriticalSection m_criticalSection;
54
55  CRssReader* m_pReader;
56  vecText m_feed;
57
58  std::string m_strRSSTags;
59
60  CLabelInfo m_label;
61  KODI::GUILIB::GUIINFO::CGUIInfoColor m_channelColor;
62  KODI::GUILIB::GUIINFO::CGUIInfoColor m_headlineColor;
63
64  std::vector<std::string> m_vecUrls;
65  std::vector<int> m_vecIntervals;
66  bool m_rtl;
67  CScrollInfo m_scrollInfo;
68  bool m_dirty;
69  bool m_stopped;
70  int  m_urlset;
71};
72