| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "GUIControl.h" |
| 17 |
#include "GUILabel.h" |
| 18 |
#include "guilib/guiinfo/GUIInfoLabel.h" |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
class CGUIListLabel : |
| 25 |
public CGUIControl |
| 26 |
{ |
| 27 |
public: |
| 28 |
CGUIListLabel(int parentID, int controlID, float posX, float posY, float width, float height, |
| 29 |
const CLabelInfo& labelInfo, const KODI::GUILIB::GUIINFO::CGUIInfoLabel &label, CGUIControl::GUISCROLLVALUE scroll); |
| 30 |
~CGUIListLabel(void) override; |
| 31 |
CGUIListLabel* Clone() const override { return new CGUIListLabel(*this); } |
| 32 |
|
| 33 |
void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override; |
| 34 |
void Render() override; |
| 35 |
bool CanFocus() const override { return false; } |
| 36 |
void UpdateInfo(const CGUIListItem *item = NULL) override; |
| 37 |
void SetFocus(bool focus) override; |
| 38 |
void SetInvalid() override; |
| 39 |
void SetWidth(float width) override; |
| 40 |
|
| 41 |
void SetLabel(const std::string &label); |
| 42 |
void SetSelected(bool selected); |
| 43 |
|
| 44 |
static void CheckAndCorrectOverlap(CGUIListLabel &label1, CGUIListLabel &label2) |
| 45 |
{ |
| 46 |
CGUILabel::CheckAndCorrectOverlap(label1.m_label, label2.m_label); |
| 47 |
} |
| 48 |
|
| 49 |
CRect CalcRenderRegion() const override; |
| 50 |
|
| 51 |
protected: |
| 52 |
bool UpdateColors(const CGUIListItem* item) override; |
| 53 |
|
| 54 |
CGUILabel m_label; |
| 55 |
KODI::GUILIB::GUIINFO::CGUIInfoLabel m_info; |
| 56 |
CGUIControl::GUISCROLLVALUE m_scroll; |
| 57 |
}; |