vdr-plugin-skindesigner/views/displaymenurootview.h

76 lines
2.7 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __DISPLAYMENUROOTVIEW_H
#define __DISPLAYMENUROOTVIEW_H
#include "../libtemplate/template.h"
#include "displaymenuview.h"
#include "displaymenulistview.h"
#include "displaymenudetailview.h"
2014-11-15 09:47:22 +01:00
enum ePluginMenuType {
mtList,
mtText,
mtUnknown
};
2015-01-06 06:07:48 +01:00
class cDisplayMenuRootView : public cView, public cViewHelpers {
2014-09-27 09:25:14 +02:00
private:
2014-10-26 08:26:44 +01:00
eMenuCategory cat;
2014-09-27 09:25:14 +02:00
eSubView viewType;
cTemplateView *subView;
bool subViewAvailable;
2014-11-15 09:47:22 +01:00
string pluginName;
int pluginMenu;
ePluginMenuType pluginMenuType;
bool pluginMenuChanged;
2014-09-27 09:25:14 +02:00
cDisplayMenuView *view;
cDisplayMenuListView *listView;
cDisplayMenuDetailView *detailView;
string menuTitle;
string buttonTexts[4];
bool defaultBackgroundDrawn;
bool defaultHeaderDrawn;
bool defaultButtonsDrawn;
bool defaultDateTimeDrawn;
bool defaultMessageDrawn;
void DrawBackground(void);
void DrawHeader(void);
void DrawDateTime(void);
2015-01-06 06:07:48 +01:00
bool DrawTime(void);
2014-09-27 09:25:14 +02:00
void DrawColorButtons(void);
void DrawMessage(eMessageType type, const char *text);
void ClearRootView(void);
virtual void Action(void);
public:
cDisplayMenuRootView(cTemplateView *rootView);
virtual ~cDisplayMenuRootView();
bool createOsd(void);
void SetMenu(eMenuCategory menuCat, bool menuInit);
void CorrectDefaultMenu(void);
2014-11-15 09:47:22 +01:00
void SetPluginMenu(string name, int menu, int type);
2014-09-27 09:25:14 +02:00
void SetTitle(const char *title);
void SetChannel(const cChannel *channel) { view->SetChannel(channel); };
const cChannel *GetChannel(void) { return view->GetChannel(); };
void SetEpgSearchFavorite(void) { if (view) view->SetEpgSearchFavorite(); };
2014-09-27 09:25:14 +02:00
void SetButtonTexts(const char *Red, const char *Green, const char *Yellow, const char *Blue);
void SetTabs(int tab1, int tab2, int tab3, int tab4, int tab5);
void SetMessage(eMessageType type, const char *text);
void SetDetailedViewEvent(const cEvent *event);
void SetDetailedViewRecording(const cRecording *recording);
void SetDetailedViewText(const char *text);
2014-11-15 09:47:22 +01:00
bool SetDetailedViewPlugin(map<string,string> *stringTokens, map<string,int> *intTokens, map<string,vector<map<string,string> > > *loopTokens);
2014-09-27 09:25:14 +02:00
void KeyInput(bool up, bool page);
void Clear(void);
int GetMaxItems(void);
int GetListViewWidth(void);
int GetTextAreaWidth(void);
cFont *GetTextAreaFont(void);
2014-09-27 09:25:14 +02:00
bool SubViewAvailable(void) { return subViewAvailable; };
cDisplayMenuListView *GetListView(void) { return listView; };
void Render(void);
void RenderMenuItems(void);
void RenderDetailView(void);
void RenderMenuScrollBar(int Total, int Offset);
bool RenderDynamicElements(void);
};
#endif //__DISPLAYMENUROOTVIEW_H