vdr-plugin-skindesigner/views/displaymenuview.h

89 lines
3.0 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __DISPLAYMENUVIEW_H
#define __DISPLAYMENUVIEW_H
#include "../libtemplate/template.h"
2014-10-25 20:10:00 +02:00
#include "viewhelpers.h"
2014-09-27 09:25:14 +02:00
#include "displaymenulistview.h"
#if APIVERSNUM < 20107
enum eMenuSortMode {
msmUnknown = 0,
msmNumber,
msmName,
msmTime,
msmProvider
};
#endif
2015-01-06 06:07:48 +01:00
class cDisplayMenuView : public cView, public cViewHelpers {
2014-09-27 09:25:14 +02:00
protected:
eMenuCategory cat;
eMenuSortMode sortMode;
eMenuSortMode sortModeLast;
2014-09-27 09:25:14 +02:00
string menuTitle;
string *buttonTexts;
virtual void Action(void);
public:
cDisplayMenuView(cTemplateView *tmplView, bool menuInit);
virtual ~cDisplayMenuView();
void SetMenuCat(eMenuCategory newCat) { cat = newCat; };
void SetSortMode(eMenuSortMode sortMode) { this->sortMode = sortMode; };
2014-09-27 09:25:14 +02:00
void SetTitle(const char *title) {menuTitle = title; };
virtual void SetChannel(const cChannel *channel) {};
virtual const cChannel *GetChannel(void) { return NULL; };
virtual void ClearChannel(void) {};
virtual void SetEpgSearchFavorite(void) {};
virtual void ClearEpgSearchFavorite(void) {};
2014-09-27 09:25:14 +02:00
void SetButtonTexts(string *buttonTexts) { this->buttonTexts = buttonTexts; };
bool DrawBackground(void);
virtual bool DrawHeader(void);
bool DrawDateTime(bool forced, bool &implemented);
bool DrawTime(bool forced, bool &implemented);
2014-09-27 09:25:14 +02:00
bool DrawColorButtons(void);
bool DrawMessage(eMessageType type, const char *text);
void DrawScrollbar(int numMax, int numDisplayed, int offset);
bool DrawSortMode(void);
2014-09-27 09:25:14 +02:00
virtual void DrawStaticViewElements(void) {};
virtual bool DrawDynamicViewElements(void) { return false; };
bool BackgroundImplemented(void);
};
2015-01-06 06:07:48 +01:00
class cDisplayMenuMainView : public cDisplayMenuView {
2014-09-27 09:25:14 +02:00
private:
bool initial;
string currentRecording;
2014-09-27 09:25:14 +02:00
void DrawTimers(void);
void DrawLastRecordings(void);
2014-09-27 09:25:14 +02:00
void DrawDiscUsage(void);
bool DrawLoad(void);
bool DrawMemory(void);
bool DrawVdrStats(void);
2015-01-06 06:07:48 +01:00
void DrawTemperatures(void);
2014-09-27 09:25:14 +02:00
bool DrawDevices(void);
void DrawCurrentSchedule(void);
void DrawCurrentWeather(void);
bool DrawCustomTokens(void);
2014-09-27 09:25:14 +02:00
public:
cDisplayMenuMainView(cTemplateView *tmplView, bool menuInit, string currentRecording);
2014-09-27 09:25:14 +02:00
virtual ~cDisplayMenuMainView();
void DrawStaticViewElements(void);
bool DrawDynamicViewElements(void);
};
class cDisplayMenuSchedulesView : public cDisplayMenuView {
private:
const cChannel *channel;
bool isEpgSearchFavoritesMenu;
2014-09-27 09:25:14 +02:00
public:
cDisplayMenuSchedulesView(cTemplateView *tmplView, eMenuCategory menuCat, bool menuInit);
virtual ~cDisplayMenuSchedulesView();
void SetChannel(const cChannel *channel) { if (channel) this->channel = channel; };
const cChannel *GetChannel(void) { return channel; };
void ClearChannel(void) { channel = NULL; };
void SetEpgSearchFavorite(void) { isEpgSearchFavoritesMenu = true; };
void ClearEpgSearchFavorite(void) { isEpgSearchFavoritesMenu = false; };
2014-09-27 09:25:14 +02:00
bool DrawHeader(void);
};
#endif //__DISPLAYMENUVIEW_H