mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
checking setup conditions for viewelements
This commit is contained in:
@@ -32,7 +32,7 @@ bool cDisplayAudiotracksView::createOsd(void) {
|
||||
}
|
||||
|
||||
void cDisplayAudiotracksView::DrawBackground(void) {
|
||||
if (!ViewElementImplemented(veBackground)) {
|
||||
if (!ExecuteViewElement(veBackground)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void cDisplayAudiotracksView::DrawBackground(void) {
|
||||
}
|
||||
|
||||
void cDisplayAudiotracksView::DrawHeader(const char *title, int audioChannel) {
|
||||
if (!ViewElementImplemented(veHeader)) {
|
||||
if (!ExecuteViewElement(veHeader)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void cDisplayChannelView::ClearChannel(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawDate(void) {
|
||||
if (!ViewElementImplemented(veDateTime)) {
|
||||
if (!ExecuteViewElement(veDateTime)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void cDisplayChannelView::DrawDate(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawTime(void) {
|
||||
if (!ViewElementImplemented(veTime)) {
|
||||
if (!ExecuteViewElement(veTime)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ void cDisplayChannelView::DrawTime(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawProgressBar(cString &start, cString &stop, int Current, int Total) {
|
||||
if (!ViewElementImplemented(veProgressBar)) {
|
||||
if (!ExecuteViewElement(veProgressBar)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ void cDisplayChannelView::ClearEPGInfo(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
|
||||
if (!ViewElementImplemented(veStatusInfo)) {
|
||||
if (!ExecuteViewElement(veStatusInfo)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ void cDisplayChannelView::ClearStatusIcons(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawAudioInfo(void) {
|
||||
if (!ViewElementImplemented(veAudioInfo)) {
|
||||
if (!ExecuteViewElement(veAudioInfo)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ void cDisplayChannelView::ClearAudioInfo(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawScreenResolution(void) {
|
||||
if (!ViewElementImplemented(veScreenResolution)) {
|
||||
if (!ExecuteViewElement(veScreenResolution)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ViewElementImplemented(veScraperContent)) {
|
||||
if (!ExecuteViewElement(veScraperContent)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ void cDisplayChannelView::ClearScraperContent(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawSignal(void) {
|
||||
if (!ViewElementImplemented(veSignalQuality)) {
|
||||
if (!ExecuteViewElement(veSignalQuality)) {
|
||||
return;
|
||||
}
|
||||
time_t Now = time(NULL);
|
||||
@@ -426,7 +426,7 @@ void cDisplayChannelView::DrawSignal(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawSignalBackground(void) {
|
||||
if (!ViewElementImplemented(veSignalQualityBack)) {
|
||||
if (!ExecuteViewElement(veSignalQualityBack)) {
|
||||
return;
|
||||
}
|
||||
DrawViewElement(veSignalQualityBack);
|
||||
@@ -442,7 +442,7 @@ void cDisplayChannelView::ClearSignalBackground(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawDevices(bool initial) {
|
||||
if (!ViewElementImplemented(veDevices)) {
|
||||
if (!ExecuteViewElement(veDevices)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
@@ -465,7 +465,7 @@ void cDisplayChannelView::ClearDevices(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawChannelGroups(const cChannel *Channel, cString ChannelName) {
|
||||
if (!ViewElementImplemented(veChannelGroup)) {
|
||||
if (!ExecuteViewElement(veChannelGroup)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ void cDisplayChannelView::DisplayMessage(eMessageType Type, const char *Text) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawCustomTokens(void) {
|
||||
if (!ViewElementImplemented(veCustomTokens)) {
|
||||
if (!ExecuteViewElement(veCustomTokens)) {
|
||||
return;
|
||||
}
|
||||
if (!tmplView)
|
||||
@@ -541,7 +541,7 @@ void cDisplayChannelView::DrawCustomTokens(void) {
|
||||
}
|
||||
|
||||
void cDisplayChannelView::DrawCurrentWeather(void) {
|
||||
if (!ViewElementImplemented(veCurrentWeather)) {
|
||||
if (!ExecuteViewElement(veCurrentWeather)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
|
||||
@@ -805,7 +805,7 @@ void cDisplayMenuDetailView::DrawScrollbar(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuDetailView::DrawTabLabels(void) {
|
||||
if (!ViewElementImplemented(veTabLabels)) {
|
||||
if (!ExecuteViewElement(veTabLabels)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > labelStringTokens;
|
||||
|
||||
@@ -475,7 +475,7 @@ void cDisplayMenuRootView::DrawBackground(void) {
|
||||
DrawViewElement(veBackground, &stringTokens, &intTokens);
|
||||
}
|
||||
void cDisplayMenuRootView::DrawHeader(void) {
|
||||
if (!ViewElementImplemented(veHeader)) {
|
||||
if (!ExecuteViewElement(veHeader)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ void cDisplayMenuRootView::DrawHeader(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuRootView::DrawDateTime(void) {
|
||||
if (!ViewElementImplemented(veDateTime)) {
|
||||
if (!ExecuteViewElement(veDateTime)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -530,7 +530,7 @@ void cDisplayMenuRootView::DrawDateTime(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuRootView::DrawTime(void) {
|
||||
if (!ViewElementImplemented(veTime)) {
|
||||
if (!ExecuteViewElement(veTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ bool cDisplayMenuRootView::DrawTime(void) {
|
||||
|
||||
|
||||
void cDisplayMenuRootView::DrawColorButtons(void) {
|
||||
if (!ViewElementImplemented(veButtons)) {
|
||||
if (!ExecuteViewElement(veButtons)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ cDisplayMenuView::~cDisplayMenuView() {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawBackground(void) {
|
||||
if (!ViewElementImplemented(veBackground)) {
|
||||
if (!ExecuteViewElement(veBackground)) {
|
||||
return false;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
@@ -35,7 +35,7 @@ bool cDisplayMenuView::DrawBackground(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawHeader(void) {
|
||||
if (!ViewElementImplemented(veHeader)) {
|
||||
if (!ExecuteViewElement(veHeader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ bool cDisplayMenuView::DrawHeader(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawDateTime(void) {
|
||||
if (!ViewElementImplemented(veDateTime)) {
|
||||
if (!ExecuteViewElement(veDateTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ bool cDisplayMenuView::DrawDateTime(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawTime(void) {
|
||||
if (!ViewElementImplemented(veTime)) {
|
||||
if (!ExecuteViewElement(veTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ bool cDisplayMenuView::DrawTime(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawColorButtons(void) {
|
||||
if (!ViewElementImplemented(veButtons)) {
|
||||
if (!ExecuteViewElement(veButtons)) {
|
||||
return false;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
@@ -158,7 +158,7 @@ bool cDisplayMenuView::DrawColorButtons(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::DrawMessage(eMessageType type, const char *text) {
|
||||
if (!ViewElementImplemented(veMessage)) {
|
||||
if (!ExecuteViewElement(veMessage)) {
|
||||
return false;
|
||||
}
|
||||
if (!text) {
|
||||
@@ -180,7 +180,7 @@ bool cDisplayMenuView::DrawMessage(eMessageType type, const char *text) {
|
||||
}
|
||||
|
||||
void cDisplayMenuView::DrawScrollbar(int numMax, int numDisplayed, int offset) {
|
||||
if (!ViewElementImplemented(veScrollbar)) {
|
||||
if (!ExecuteViewElement(veScrollbar)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
@@ -204,7 +204,7 @@ void cDisplayMenuView::DrawScrollbar(int numMax, int numDisplayed, int offset) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuView::BackgroundImplemented(void) {
|
||||
if (!ViewElementImplemented(veBackground)) {
|
||||
if (!ExecuteViewElement(veBackground)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -250,7 +250,7 @@ bool cDisplayMenuMainView::DrawDynamicViewElements(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawTimers(void) {
|
||||
if (!ViewElementImplemented(veTimers)) {
|
||||
if (!ExecuteViewElement(veTimers)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ void cDisplayMenuMainView::DrawTimers(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawDiscUsage(void) {
|
||||
if (!ViewElementImplemented(veDiscUsage)) {
|
||||
if (!ExecuteViewElement(veDiscUsage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ void cDisplayMenuMainView::DrawDiscUsage(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuMainView::DrawLoad(void) {
|
||||
if (!ViewElementImplemented(veSystemLoad)) {
|
||||
if (!ExecuteViewElement(veSystemLoad)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ bool cDisplayMenuMainView::DrawLoad(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawTemperatures(void) {
|
||||
if (!ViewElementImplemented(veTemperatures)) {
|
||||
if (!ExecuteViewElement(veTemperatures)) {
|
||||
return;
|
||||
}
|
||||
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/temperatures\"", SCRIPTFOLDER, SCRIPTFOLDER);
|
||||
@@ -464,7 +464,7 @@ void cDisplayMenuMainView::DrawTemperatures(void) {
|
||||
}
|
||||
|
||||
bool cDisplayMenuMainView::DrawDevices(void) {
|
||||
if (!ViewElementImplemented(veDevices)) {
|
||||
if (!ExecuteViewElement(veDevices)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ bool cDisplayMenuMainView::DrawDevices(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawCurrentSchedule(void) {
|
||||
if (!ViewElementImplemented(veCurrentSchedule)) {
|
||||
if (!ExecuteViewElement(veCurrentSchedule)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ void cDisplayMenuMainView::DrawCurrentSchedule(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawCurrentWeather(void) {
|
||||
if (!ViewElementImplemented(veCurrentWeather)) {
|
||||
if (!ExecuteViewElement(veCurrentWeather)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > stringTokens;
|
||||
@@ -597,7 +597,7 @@ void cDisplayMenuMainView::DrawCurrentWeather(void) {
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawCustomTokens(void) {
|
||||
if (!ViewElementImplemented(veCustomTokens)) {
|
||||
if (!ExecuteViewElement(veCustomTokens)) {
|
||||
return;
|
||||
}
|
||||
if (!tmplView)
|
||||
@@ -623,7 +623,7 @@ cDisplayMenuSchedulesView::~cDisplayMenuSchedulesView() {
|
||||
}
|
||||
|
||||
bool cDisplayMenuSchedulesView::DrawHeader(void) {
|
||||
if (!ViewElementImplemented(veHeader)) {
|
||||
if (!ExecuteViewElement(veHeader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ void cDisplayPluginView::DrawScrollbar(void) {
|
||||
}
|
||||
|
||||
void cDisplayPluginView::DrawTabLabels(void) {
|
||||
if (!ViewElementImplemented((eViewElement)pveTablabels)) {
|
||||
if (!ExecuteViewElement((eViewElement)pveTablabels)) {
|
||||
return;
|
||||
}
|
||||
map < string, string > labelStringTokens;
|
||||
|
||||
@@ -43,7 +43,7 @@ void cDisplayReplayView::DrawBackground(bool modeOnly) {
|
||||
}
|
||||
|
||||
void cDisplayReplayView::DrawDate(void) {
|
||||
if (!ViewElementImplemented(veDateTime)) {
|
||||
if (!ExecuteViewElement(veDateTime)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ void cDisplayReplayView::DrawDate(void) {
|
||||
}
|
||||
|
||||
void cDisplayReplayView::DrawTime(void) {
|
||||
if (!ViewElementImplemented(veTime)) {
|
||||
if (!ExecuteViewElement(veTime)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ void cDisplayReplayView::DrawScraperContent(const cRecording *recording) {
|
||||
if (!recording)
|
||||
return;
|
||||
|
||||
if (!ViewElementImplemented(veScraperContent)) {
|
||||
if (!ExecuteViewElement(veScraperContent)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ void cDisplayReplayView::DelayOnPause(void) {
|
||||
}
|
||||
|
||||
void cDisplayReplayView::DrawCustomTokens(void) {
|
||||
if (!ViewElementImplemented(veCustomTokens)) {
|
||||
if (!ExecuteViewElement(veCustomTokens)) {
|
||||
return;
|
||||
}
|
||||
if (!tmplView)
|
||||
|
||||
@@ -205,7 +205,10 @@ void cView::ActivateScrolling(void) {
|
||||
}
|
||||
}
|
||||
|
||||
bool cView::ViewElementImplemented(eViewElement ve) {
|
||||
bool cView::ExecuteViewElement(eViewElement ve) {
|
||||
bool doExecute = tmplView->ExecuteView(ve);
|
||||
if (!doExecute)
|
||||
return false;
|
||||
return tmplView->GetNumPixmapsViewElement(ve);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ protected:
|
||||
void DrawViewElement(eViewElement ve, map <string,string> *stringTokens = NULL, map <string,int> *intTokens = NULL, map < string, vector< map< string, string > > > *loopTokens = NULL);
|
||||
void ClearViewElement(eViewElement ve);
|
||||
void DestroyViewElement(eViewElement ve);
|
||||
bool ViewElementImplemented(eViewElement ve);
|
||||
bool ExecuteViewElement(eViewElement ve);
|
||||
bool ViewElementScrolls(eViewElement ve);
|
||||
void CreateViewPixmap(int num, cTemplatePixmap *pix, cRect *size = NULL);
|
||||
void CreateScrollingPixmap(int num, cTemplatePixmap *pix, cSize &drawportSize);
|
||||
|
||||
Reference in New Issue
Block a user