2016-02-06 09:55:15 +01:00
|
|
|
#ifndef __LISTELEMENTS_H
|
|
|
|
#define __LISTELEMENTS_H
|
|
|
|
|
|
|
|
#include "viewelement.h"
|
|
|
|
#include "../extensions/scrapmanager.h"
|
|
|
|
|
|
|
|
#define MAX_TABS 6
|
|
|
|
/******************************************************************
|
|
|
|
* cListElement
|
|
|
|
******************************************************************/
|
2016-07-22 15:21:09 +02:00
|
|
|
class cListElement : public cViewElement , public cListShiftable {
|
2016-02-06 09:55:15 +01:00
|
|
|
protected:
|
|
|
|
eMenuCategory menuCat;
|
2016-07-22 15:21:09 +02:00
|
|
|
eOrientation orientation;
|
2016-02-06 09:55:15 +01:00
|
|
|
int num;
|
|
|
|
bool current;
|
|
|
|
bool wasCurrent;
|
|
|
|
bool selectable;
|
2016-07-22 15:21:09 +02:00
|
|
|
bool selectedFromTop;
|
|
|
|
bool suppressAnimation;
|
|
|
|
cListShifter *listShifter;
|
2016-02-06 09:55:15 +01:00
|
|
|
cViewElement *currentElement;
|
|
|
|
char *ParseSeparator(const char *text);
|
2016-07-22 15:21:09 +02:00
|
|
|
void StartListAnimation(void);
|
2016-02-06 09:55:15 +01:00
|
|
|
public:
|
|
|
|
cListElement(void);
|
|
|
|
cListElement(const cListElement &other);
|
|
|
|
virtual ~cListElement(void) {};
|
|
|
|
void SetMenuCategory(eMenuCategory menuCat) { this->menuCat = menuCat; };
|
2016-07-22 15:21:09 +02:00
|
|
|
void SetOrientation(eOrientation orientation) { this->orientation = orientation; };
|
2016-02-06 09:55:15 +01:00
|
|
|
void SetNumber(int number) { num = number; };
|
|
|
|
void SetCurrent(bool cur);
|
|
|
|
bool Current(void) { return current; };
|
2016-07-22 15:21:09 +02:00
|
|
|
bool WasCurrent(void) { return wasCurrent; };
|
2016-02-06 09:55:15 +01:00
|
|
|
void WakeCurrent(void);
|
|
|
|
void SetSelectable(bool sel) { selectable = sel; };
|
2016-07-22 15:21:09 +02:00
|
|
|
void SetSelectedFromTop(void) { selectedFromTop = true; };
|
|
|
|
void SetSelectedFromBottom(void) { selectedFromTop = false; };
|
|
|
|
void SetSuppressAnimation(bool suppress) { suppressAnimation = suppress; };
|
2016-02-06 09:55:15 +01:00
|
|
|
bool DoScroll(void) { return current; };
|
2016-07-22 15:21:09 +02:00
|
|
|
void Render(void);
|
2016-02-06 09:55:15 +01:00
|
|
|
virtual void RenderCurrent(void) { };
|
|
|
|
void Close(void);
|
2016-07-22 15:21:09 +02:00
|
|
|
int ListShiftTime(void) { return ShiftTime(); };
|
|
|
|
int ShiftDistance(void);
|
|
|
|
eOrientation ShiftOrientation(void);
|
|
|
|
void SetIndicatorPosition(cPoint &position);
|
|
|
|
void SetTransparency(int transparency, bool force = false);
|
|
|
|
void StopListAnimation(void);
|
2016-03-06 07:42:29 +01:00
|
|
|
virtual void Clear(bool forceClearBackground = false);
|
2016-02-06 09:55:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCurrentElement
|
|
|
|
******************************************************************/
|
|
|
|
class cCurrentElement : public cViewElement {
|
|
|
|
protected:
|
|
|
|
int listX;
|
|
|
|
int listY;
|
|
|
|
int listWidth;
|
|
|
|
int listHeight;
|
2016-04-30 06:49:30 +02:00
|
|
|
int listNum;
|
2016-02-06 09:55:15 +01:00
|
|
|
public:
|
|
|
|
cCurrentElement(void);
|
|
|
|
virtual ~cCurrentElement(void) {};
|
2016-04-30 06:49:30 +02:00
|
|
|
void SetListPosition(int x, int y, int width, int height, int num);
|
2016-02-06 09:55:15 +01:00
|
|
|
void SetListTokens(skindesignerapi::cTokenContainer *tokenContainer);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuDefault
|
|
|
|
******************************************************************/
|
|
|
|
class cLeMenuDefault : public cListElement {
|
|
|
|
private:
|
|
|
|
char *text;
|
|
|
|
int *colX;
|
|
|
|
int *colWidths;
|
|
|
|
const char *plugName;
|
|
|
|
const char *GetTabbedText(const char *s, int tab);
|
|
|
|
void SetMenuCategory(void);
|
|
|
|
void CheckProgressBar(const char *text, int tab);
|
|
|
|
public:
|
|
|
|
cLeMenuDefault(void);
|
|
|
|
cLeMenuDefault(const cLeMenuDefault &other);
|
|
|
|
virtual ~cLeMenuDefault(void);
|
|
|
|
void SetListInfo(int *colX, int *colWidths);
|
|
|
|
void SetText(const char *text);
|
|
|
|
void SetPlugin(const char *plugName) { this->plugName = plugName; };
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
bool Parse(bool forced = true);
|
2016-03-06 07:42:29 +01:00
|
|
|
void Clear(bool forceClearBackground = false);
|
2016-02-06 09:55:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cVeMenuMain
|
|
|
|
******************************************************************/
|
|
|
|
class cVeMenuMain {
|
|
|
|
protected:
|
|
|
|
char *text;
|
|
|
|
char *number;
|
|
|
|
char *label;
|
|
|
|
void SplitText(void);
|
|
|
|
public:
|
|
|
|
cVeMenuMain(void);
|
|
|
|
virtual ~cVeMenuMain(void);
|
|
|
|
void SetText(const char *text);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuMain
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuMain;
|
|
|
|
class cLeMenuMain : public cListElement, public cVeMenuMain {
|
|
|
|
private:
|
|
|
|
cCeMenuMain *currentMain;
|
|
|
|
public:
|
|
|
|
cLeMenuMain(void);
|
|
|
|
cLeMenuMain(const cLeMenuMain &other);
|
|
|
|
virtual ~cLeMenuMain(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetCurrentElement(cCeMenuMain *cur) { currentMain = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void SetText(const char *text);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
const char *PluginName(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuMain
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuMain : public cCurrentElement, public cVeMenuMain {
|
|
|
|
private:
|
|
|
|
public:
|
|
|
|
cCeMenuMain(void);
|
|
|
|
virtual ~cCeMenuMain(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetText(const char *text);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cVeMenuSchedules
|
|
|
|
******************************************************************/
|
|
|
|
class cVeMenuSchedules {
|
|
|
|
protected:
|
|
|
|
const cEvent *event;
|
|
|
|
const cChannel *channel;
|
|
|
|
bool withDate;
|
|
|
|
eTimerMatch timerMatch;
|
|
|
|
bool epgSearchFav;
|
|
|
|
public:
|
|
|
|
cVeMenuSchedules(void);
|
|
|
|
virtual ~cVeMenuSchedules(void){};
|
|
|
|
void SetEpgSearchFav(bool isFav) { epgSearchFav = isFav; };
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuSchedules
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuSchedules;
|
|
|
|
class cLeMenuSchedules : public cListElement, public cVeMenuSchedules {
|
|
|
|
private:
|
|
|
|
cCeMenuSchedules *currentSchedules;
|
|
|
|
public:
|
|
|
|
cLeMenuSchedules(void);
|
|
|
|
cLeMenuSchedules(const cLeMenuSchedules &other);
|
|
|
|
virtual ~cLeMenuSchedules(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetCurrentElement(cCeMenuSchedules *cur) { currentSchedules = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void Set(const cEvent *event, const cChannel *channel, bool withDate, eTimerMatch timerMatch);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuSchedules
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuSchedules : public cCurrentElement, public cVeMenuSchedules, public cScrapManager {
|
|
|
|
private:
|
|
|
|
eMenuCategory menuCat;
|
|
|
|
int schedulesIndex;
|
|
|
|
public:
|
|
|
|
cCeMenuSchedules(void);
|
|
|
|
virtual ~cCeMenuSchedules(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const cEvent *event, const cChannel *channel, bool withDate, eTimerMatch timerMatch, eMenuCategory menuCat);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuChannels
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuChannels;
|
|
|
|
class cLeMenuChannels : public cListElement {
|
|
|
|
private:
|
|
|
|
cCeMenuChannels *currentChannel;
|
|
|
|
const cChannel *channel;
|
|
|
|
bool withProvider;
|
|
|
|
public:
|
|
|
|
cLeMenuChannels(void);
|
|
|
|
cLeMenuChannels(const cLeMenuChannels &other);
|
|
|
|
virtual ~cLeMenuChannels(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetCurrentElement(cCeMenuChannels *cur) { currentChannel = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void Set(const cChannel *channel, bool withProvider);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuChannels
|
|
|
|
******************************************************************/
|
2016-02-28 12:32:02 +01:00
|
|
|
class cCeMenuChannels : public cCurrentElement, public cScrapManager {
|
2016-02-06 09:55:15 +01:00
|
|
|
private:
|
|
|
|
const cChannel *channel;
|
|
|
|
bool withProvider;
|
|
|
|
int schedulesIndex;
|
|
|
|
public:
|
|
|
|
cCeMenuChannels(void);
|
|
|
|
virtual ~cCeMenuChannels(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const cChannel *channel, bool withProvider);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuTimers
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuTimers;
|
|
|
|
class cLeMenuTimers : public cListElement {
|
|
|
|
private:
|
|
|
|
cCeMenuTimers *currentTimer;
|
|
|
|
const cTimer *timer;
|
|
|
|
public:
|
|
|
|
cLeMenuTimers(void);
|
|
|
|
cLeMenuTimers(const cLeMenuTimers &other);
|
|
|
|
virtual ~cLeMenuTimers(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetCurrentElement(cCeMenuTimers *cur) { currentTimer = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void Set(const cTimer *timer);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuTimers
|
|
|
|
******************************************************************/
|
2016-02-28 12:32:02 +01:00
|
|
|
class cCeMenuTimers : public cCurrentElement, public cScrapManager {
|
2016-02-06 09:55:15 +01:00
|
|
|
private:
|
|
|
|
const cTimer *timer;
|
|
|
|
public:
|
|
|
|
cCeMenuTimers(void);
|
|
|
|
virtual ~cCeMenuTimers(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const cTimer *timer);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuRecordings
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuRecordings;
|
|
|
|
class cLeMenuRecordings : public cListElement, public cScrapManager {
|
|
|
|
private:
|
|
|
|
cCeMenuRecordings *currentRecording;
|
|
|
|
const cRecording *recording;
|
|
|
|
int level;
|
|
|
|
int total;
|
|
|
|
int New;
|
|
|
|
char *RecName(const char *path, int level);
|
|
|
|
char *FolderName(const char *path, int level);
|
|
|
|
public:
|
|
|
|
cLeMenuRecordings(void);
|
|
|
|
cLeMenuRecordings(const cLeMenuRecordings &other);
|
|
|
|
virtual ~cLeMenuRecordings(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetCurrentElement(cCeMenuRecordings *cur) { currentRecording = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void Set(const cRecording *recording, int level, int total, int New);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuRecordings
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuRecordings : public cCurrentElement, public cScrapManager {
|
|
|
|
private:
|
|
|
|
const cRecording *recording;
|
|
|
|
int level;
|
|
|
|
int total;
|
|
|
|
int New;
|
|
|
|
public:
|
|
|
|
cCeMenuRecordings(void);
|
|
|
|
virtual ~cCeMenuRecordings(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const cRecording *recording, int level, int total, int New);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeMenuPlugin
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuPlugin;
|
|
|
|
class cLeMenuPlugin : public cListElement {
|
|
|
|
private:
|
|
|
|
int plugId;
|
|
|
|
int plugMenuId;
|
|
|
|
cCeMenuPlugin *currentPlugin;
|
|
|
|
public:
|
|
|
|
cLeMenuPlugin(void);
|
|
|
|
cLeMenuPlugin(const cLeMenuPlugin &other);
|
|
|
|
virtual ~cLeMenuPlugin(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetPlugId(int id) { plugId = id; };
|
|
|
|
void SetPlugMenuId(int id) { plugMenuId = id; };
|
|
|
|
void SetCurrentElement(cCeMenuPlugin *cur) { currentPlugin = cur; currentElement = (cViewElement*)cur; };
|
|
|
|
void ClearCurrentElement(void);
|
|
|
|
void Set(skindesignerapi::cTokenContainer *tk);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
void RenderCurrent(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cCeMenuPlugin
|
|
|
|
******************************************************************/
|
|
|
|
class cCeMenuPlugin : public cCurrentElement {
|
|
|
|
private:
|
|
|
|
int plugId;
|
|
|
|
int plugMenuId;
|
|
|
|
public:
|
|
|
|
cCeMenuPlugin(void);
|
|
|
|
virtual ~cCeMenuPlugin(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void SetPlugId(int id) { plugId = id; };
|
|
|
|
void SetPlugMenuId(int id) { plugMenuId = id; };
|
|
|
|
void Set(skindesignerapi::cTokenContainer *tk);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeAudioTracks
|
|
|
|
******************************************************************/
|
|
|
|
class cLeAudioTracks : public cListElement {
|
|
|
|
private:
|
|
|
|
char *text;
|
|
|
|
public:
|
|
|
|
cLeAudioTracks(void);
|
|
|
|
virtual ~cLeAudioTracks(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const char *text);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
2016-05-26 10:47:45 +02:00
|
|
|
/******************************************************************
|
|
|
|
* cLeChannelList
|
|
|
|
******************************************************************/
|
|
|
|
class cLeChannelList : public cListElement {
|
|
|
|
private:
|
|
|
|
const cChannel *channel;
|
|
|
|
public:
|
|
|
|
cLeChannelList(void);
|
|
|
|
cLeChannelList(const cLeChannelList &other);
|
|
|
|
virtual ~cLeChannelList(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const cChannel *channel);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* cLeGroupList
|
|
|
|
******************************************************************/
|
|
|
|
class cLeGroupList : public cListElement {
|
|
|
|
private:
|
|
|
|
const char *group;
|
|
|
|
int numChannels;
|
|
|
|
public:
|
|
|
|
cLeGroupList(void);
|
|
|
|
cLeGroupList(const cLeGroupList &other);
|
|
|
|
virtual ~cLeGroupList(void);
|
|
|
|
void SetTokenContainer(void);
|
|
|
|
void Set(const char *group, int numChannels);
|
|
|
|
bool Parse(bool forced = true);
|
|
|
|
};
|
|
|
|
|
2016-01-26 18:32:38 +01:00
|
|
|
#endif //__LISTELEMENTS_H
|