| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "GUIListGroup.h" |
| 12 |
#include "GUITexture.h" |
| 13 |
#include "guilib/guiinfo/GUIInfoLabel.h" |
| 14 |
#include "threads/SystemClock.h" |
| 15 |
|
| 16 |
class CGUIListItem; |
| 17 |
class CFileItem; |
| 18 |
class CLabelInfo; |
| 19 |
|
| 20 |
class CGUIListItemLayout final |
| 21 |
{ |
| 22 |
public: |
| 23 |
CGUIListItemLayout(); |
| 24 |
explicit CGUIListItemLayout(const CGUIListItemLayout& from); |
| 25 |
explicit CGUIListItemLayout(const CGUIListItemLayout& from, CGUIControl* control); |
| 26 |
void LoadLayout(TiXmlElement *layout, int context, bool focused, float maxWidth, float maxHeight); |
| 27 |
void Process(CGUIListItem *item, int parentID, unsigned int currentTime, CDirtyRegionList &dirtyregions); |
| 28 |
void Render(CGUIListItem *item, int parentID); |
| 29 |
float Size(ORIENTATION orientation) const; |
| 30 |
unsigned int GetFocusedItem() const; |
| 31 |
void SetFocusedItem(unsigned int focus); |
| 32 |
bool IsAnimating(ANIMATION_TYPE animType); |
| 33 |
void ResetAnimation(ANIMATION_TYPE animType); |
| 34 |
void SetInvalid() { m_invalidated = true; } |
| 35 |
void FreeResources(bool immediately = false); |
| 36 |
void SetParentControl(CGUIControl* control) { m_group.SetParentControl(control); } |
| 37 |
|
| 38 |
|
| 39 |
void CreateListControlLayouts(float width, float height, bool focused, const CLabelInfo &labelInfo, const CLabelInfo &labelInfo2, const CTextureInfo &texture, const CTextureInfo &textureFocus, float texHeight, float iconWidth, float iconHeight, const std::string &nofocusCondition, const std::string &focusCondition); |
| 40 |
|
| 41 |
|
| 42 |
void SetWidth(float width); |
| 43 |
void SetHeight(float height); |
| 44 |
void SelectItemFromPoint(const CPoint &point); |
| 45 |
bool MoveLeft(); |
| 46 |
bool MoveRight(); |
| 47 |
|
| 48 |
#ifdef _DEBUG |
| 49 |
void DumpTextureUse(); |
| 50 |
#endif |
| 51 |
bool CheckCondition(); |
| 52 |
protected: |
| 53 |
void LoadControl(TiXmlElement *child, CGUIControlGroup *group); |
| 54 |
|
| 55 |
CGUIListGroup m_group; |
| 56 |
|
| 57 |
float m_width{0}; |
| 58 |
float m_height{0}; |
| 59 |
bool m_focused{false}; |
| 60 |
bool m_invalidated{true}; |
| 61 |
|
| 62 |
INFO::InfoPtr m_condition; |
| 63 |
KODI::GUILIB::GUIINFO::CGUIInfoBool m_isPlaying; |
| 64 |
std::chrono::milliseconds m_infoUpdateMillis = |
| 65 |
XbmcThreads::EndTime<decltype(m_infoUpdateMillis)>::Max(); |
| 66 |
XbmcThreads::EndTime<> m_infoUpdateTimeout; |
| 67 |
}; |
| 68 |
|