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"
|
|
|
|
|
|
|
|
class cDisplayMenuView : public cView {
|
|
|
|
protected:
|
|
|
|
eMenuCategory cat;
|
|
|
|
string menuTitle;
|
|
|
|
string *buttonTexts;
|
|
|
|
virtual void Action(void);
|
|
|
|
public:
|
|
|
|
cDisplayMenuView(cTemplateView *tmplView, bool menuInit);
|
|
|
|
virtual ~cDisplayMenuView();
|
|
|
|
void SetMenuCat(eMenuCategory newCat) { cat = newCat; };
|
|
|
|
void SetTitle(const char *title) {menuTitle = title; };
|
|
|
|
virtual void SetChannel(const cChannel *channel) {};
|
2014-11-01 10:23:34 +01:00
|
|
|
virtual const cChannel *GetChannel(void) { return NULL; };
|
2014-09-27 09:25:14 +02:00
|
|
|
void SetButtonTexts(string *buttonTexts) { this->buttonTexts = buttonTexts; };
|
|
|
|
bool DrawBackground(void);
|
|
|
|
virtual bool DrawHeader(void);
|
|
|
|
bool DrawDateTime(void);
|
|
|
|
bool DrawColorButtons(void);
|
|
|
|
bool DrawMessage(eMessageType type, const char *text);
|
|
|
|
void DrawScrollbar(int numMax, int numDisplayed, int offset);
|
|
|
|
virtual void DrawStaticViewElements(void) {};
|
|
|
|
virtual bool DrawDynamicViewElements(void) { return false; };
|
|
|
|
bool BackgroundImplemented(void);
|
|
|
|
};
|
|
|
|
|
2014-10-25 20:10:00 +02:00
|
|
|
class cDisplayMenuMainView : public cDisplayMenuView, public cViewHelpers {
|
2014-09-27 09:25:14 +02:00
|
|
|
private:
|
|
|
|
bool initial;
|
|
|
|
double lastSystemLoad;
|
|
|
|
void DrawTimers(void);
|
|
|
|
void DrawDiscUsage(void);
|
|
|
|
bool DrawLoad(void);
|
|
|
|
bool DrawDevices(void);
|
|
|
|
public:
|
|
|
|
cDisplayMenuMainView(cTemplateView *tmplView, bool menuInit);
|
|
|
|
virtual ~cDisplayMenuMainView();
|
|
|
|
void DrawStaticViewElements(void);
|
|
|
|
bool DrawDynamicViewElements(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
class cDisplayMenuSchedulesView : public cDisplayMenuView {
|
|
|
|
private:
|
|
|
|
const cChannel *channel;
|
|
|
|
public:
|
|
|
|
cDisplayMenuSchedulesView(cTemplateView *tmplView, eMenuCategory menuCat, bool menuInit);
|
|
|
|
virtual ~cDisplayMenuSchedulesView();
|
2014-11-22 11:48:54 +01:00
|
|
|
void SetChannel(const cChannel *channel) { if (!this->channel) this->channel = channel; };
|
2014-11-01 10:23:34 +01:00
|
|
|
const cChannel *GetChannel(void) { return channel; };
|
2014-09-27 09:25:14 +02:00
|
|
|
bool DrawHeader(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__DISPLAYMENUVIEW_H
|