vdr-plugin-skindesigner/views/displaymenuitemview.h

162 lines
4.9 KiB
C
Raw Permalink Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __DISPLAYMENUITEMVIEW_H
#define __DISPLAYMENUITEMVIEW_H
#include "../libtemplate/template.h"
#include "view.h"
#include "displaymenuitemcurrentview.h"
class cDisplayMenuItemView : public cViewListItem {
private:
protected:
bool itemInit;
bool dirty;
bool current;
bool selectable;
int num;
cTemplateViewList *tmplList;
map < string, string > stringTokens;
map < string, int > intTokens;
cDisplayMenuItemCurrentView *currentView;
virtual void Action(void);
public:
cDisplayMenuItemView(cTemplateViewList *tmplList, bool current, bool selectable);
virtual ~cDisplayMenuItemView();
void SetCurrent(bool cur);
void SetNumber(int n) { num = n; };
void ArrangeContainer(void);
bool Current(void) { return current; };
void PrepareScrolling(void);
void EndScrolling(void);
virtual void SetTokens(void) {};
virtual void Prepare(void) {};
virtual void Render(void) {};
virtual void Clear(void);
bool Dirty(void) { return dirty; };
void Stop(void);
virtual void Debug(void);
};
class cDisplayMenuItemDefaultView: public cDisplayMenuItemView {
private:
int *tabs;
int *tabWidths;
string *tabTexts;
int maxTabs;
string menuCategory;
2014-09-27 09:25:14 +02:00
public:
cDisplayMenuItemDefaultView(cTemplateViewList *tmplList, string *tabTexts, int *tabs, int *tabWidths, bool current, bool selectable);
virtual ~cDisplayMenuItemDefaultView();
void SetTabTexts(string *tabTexts);
void SetTokens(void);
void SetMenuCategory(string cat) { menuCategory = cat; };
2014-09-27 09:25:14 +02:00
void Prepare(void);
void Render(void);
void Debug(void);
};
class cDisplayMenuItemMainView: public cDisplayMenuItemView {
private:
bool isPlugin;
string plugName;
2014-09-27 09:25:14 +02:00
string text;
string number;
string label;
string icon;
void SplitMenuText(void);
void CheckPlugins(void);
2014-09-27 09:25:14 +02:00
public:
cDisplayMenuItemMainView(cTemplateViewList *tmplList, string itemText, bool current, bool selectable);
virtual ~cDisplayMenuItemMainView();
void SetTokens(void);
void Prepare(void);
void Render(void);
string GetPluginName(void);
2014-09-27 09:25:14 +02:00
void Debug(void);
};
class cDisplayMenuItemSchedulesView: public cDisplayMenuItemView {
private:
const cEvent *event;
const cChannel *channel;
2015-05-14 12:09:44 +02:00
string dayseparator;
2014-09-27 09:25:14 +02:00
eTimerMatch timerMatch;
eMenuCategory cat;
bool isEpgSearchFav;
2014-09-27 09:25:14 +02:00
string ParseSeparator(string sep);
public:
cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch,
2015-05-14 12:09:44 +02:00
eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable, string dayseparator);
2014-09-27 09:25:14 +02:00
virtual ~cDisplayMenuItemSchedulesView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
class cDisplayMenuItemChannelsView: public cDisplayMenuItemView {
private:
const cChannel *channel;
bool withProvider;
public:
cDisplayMenuItemChannelsView(cTemplateViewList *tmplList, const cChannel *channel, bool withProvider, bool current, bool selectable);
virtual ~cDisplayMenuItemChannelsView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
class cDisplayMenuItemTimersView: public cDisplayMenuItemView {
private:
const cTimer *timer;
public:
cDisplayMenuItemTimersView(cTemplateViewList *tmplList, const cTimer *timer, bool current, bool selectable);
virtual ~cDisplayMenuItemTimersView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
class cDisplayMenuItemRecordingView: public cDisplayMenuItemView {
private:
const cRecording *recording;
int level;
int total;
int newRecs;
public:
cDisplayMenuItemRecordingView(cTemplateViewList *tmplList, const cRecording *recording, int level, int total, int newRecs, bool current, bool selectable);
virtual ~cDisplayMenuItemRecordingView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
2014-11-15 09:47:22 +01:00
class cDisplayMenuItemPluginView: public cDisplayMenuItemView {
private:
map<string,vector<map<string,string> > > loopTokens;
public:
cDisplayMenuItemPluginView(cTemplateViewList *tmplList, map<string,string> *plugStringTokens, map<string,int> *plugIntTokens, map<string,vector<map<string,string> > > *pluginLoopTokens, int index, bool current, bool selectable);
virtual ~cDisplayMenuItemPluginView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
2014-09-27 09:25:14 +02:00
class cDisplayMenuItemTrackView: public cDisplayMenuItemView {
private:
const char *title;
int numTracks;
public:
cDisplayMenuItemTrackView(cTemplateViewList *tmplList, const char *title, bool current, bool selectable, int numTracks);
virtual ~cDisplayMenuItemTrackView();
void SetTokens(void);
void Prepare(void);
void Render(void);
void Debug(void);
};
#endif //__DISPLAYMENUITEMVIEW_H