mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
checking setup conditions for viewelements
This commit is contained in:
parent
b84af82ef5
commit
229b1274a5
1
HISTORY
1
HISTORY
@ -208,3 +208,4 @@ Version 0.2.2
|
||||
|
||||
Version 0.3.0
|
||||
|
||||
- checking setup conditions for viewelements
|
||||
|
@ -18,11 +18,13 @@
|
||||
<!ELEMENT background (area|areascroll)*>
|
||||
<!ATTLIST background
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT header (area|areascroll)*>
|
||||
<!ATTLIST header
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT menuitems (listelement)>
|
||||
|
@ -21,91 +21,109 @@
|
||||
<!ELEMENT background (area)*>
|
||||
<!ATTLIST background
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channelinfo (area|areascroll)*>
|
||||
<!ATTLIST channelinfo
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT epginfo (area|areascroll)*>
|
||||
<!ATTLIST epginfo
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT progressbar (area|areascroll)*>
|
||||
<!ATTLIST progressbar
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT progressbarback (area)*>
|
||||
<!ATTLIST progressbarback
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT statusinfo (area|areascroll)*>
|
||||
<!ATTLIST statusinfo
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT audioinfo (area|areascroll)*>
|
||||
<!ATTLIST audioinfo
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT screenresolution (area|areascroll)*>
|
||||
<!ATTLIST screenresolution
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channelgroup (area|areascroll)*>
|
||||
<!ATTLIST channelgroup
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT signalquality (area|areascroll)*>
|
||||
<!ATTLIST signalquality
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT signalqualityback (area|areascroll)*>
|
||||
<!ATTLIST signalqualityback
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT devices (area|areascroll)*>
|
||||
<!ATTLIST devices
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT currentweather (area|areascroll)*>
|
||||
<!ATTLIST currentweather
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT scrapercontent (area|areascroll)*>
|
||||
<!ATTLIST scrapercontent
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT datetime (area|areascroll)*>
|
||||
<!ATTLIST datetime
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT time (area|areascroll)*>
|
||||
<!ATTLIST time
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT message (area|areascroll)*>
|
||||
<!ATTLIST message
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT customtokens (area|areascroll)*>
|
||||
<!ATTLIST customtokens
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
%functions;
|
||||
|
@ -18,86 +18,103 @@
|
||||
<!ELEMENT background (area)*>
|
||||
<!ATTLIST background
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT header (area|areascroll)*>
|
||||
<!ATTLIST header
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT datetime (area|areascroll)*>
|
||||
<!ATTLIST datetime
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT time (area|areascroll)*>
|
||||
<!ATTLIST time
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT message (area|areascroll)*>
|
||||
<!ATTLIST message
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT colorbuttons (area|areascroll)*>
|
||||
<!ATTLIST colorbuttons
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT timers (area|areascroll)*>
|
||||
<!ATTLIST timers
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT discusage (area|areascroll)*>
|
||||
<!ATTLIST discusage
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT devices (area|areascroll)*>
|
||||
<!ATTLIST devices
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT systemload (area|areascroll)*>
|
||||
<!ATTLIST systemload
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT temperatures (area|areascroll)*>
|
||||
<!ATTLIST temperatures
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT currentschedule (area|areascroll)*>
|
||||
<!ATTLIST currentschedule
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT currentweather (area|areascroll)*>
|
||||
<!ATTLIST currentweather
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT customtokens (area|areascroll)*>
|
||||
<!ATTLIST customtokens
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT scrollbar (area|areascroll)*>
|
||||
<!ATTLIST scrollbar
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT detailheader (area|areascroll)*>
|
||||
<!ATTLIST detailheader
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT tablabels (area|areascroll)*>
|
||||
<!ATTLIST tablabels
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT menudefault (background | header | datetime | time | colorbuttons | scrollbar | menuitems)*>
|
||||
|
@ -32,66 +32,79 @@
|
||||
<!ELEMENT datetime (area|areascroll)*>
|
||||
<!ATTLIST datetime
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT time (area|areascroll)*>
|
||||
<!ATTLIST time
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT scrapercontent (area|areascroll)*>
|
||||
<!ATTLIST scrapercontent
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT rectitle (area|areascroll)*>
|
||||
<!ATTLIST rectitle
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT recinfo (area|areascroll)*>
|
||||
<!ATTLIST recinfo
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT currenttime (area|areascroll)*>
|
||||
<!ATTLIST currenttime
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT totaltime (area|areascroll)*>
|
||||
<!ATTLIST totaltime
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT progressbar (area|areascroll)*>
|
||||
<!ATTLIST progressbar
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT cutmarks (area|areascroll)*>
|
||||
<!ATTLIST cutmarks
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT controlicons (area|areascroll)*>
|
||||
<!ATTLIST controlicons
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT controliconsmodeonly (area|areascroll)*>
|
||||
<!ATTLIST controliconsmodeonly
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT jump (area|areascroll)*>
|
||||
<!ATTLIST jump
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT message (area|areascroll)*>
|
||||
<!ATTLIST message
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT onpause (area|areascroll)*>
|
||||
@ -99,6 +112,7 @@
|
||||
debug CDATA #IMPLIED
|
||||
delay CDATA #REQUIRED
|
||||
fadetime CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT onpausemodeonly (area|areascroll)*>
|
||||
@ -106,11 +120,13 @@
|
||||
debug CDATA #IMPLIED
|
||||
delay CDATA #REQUIRED
|
||||
fadetime CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT customtokens (area|areascroll)*>
|
||||
<!ATTLIST customtokens
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
%functions;
|
@ -194,6 +194,14 @@ int cTemplateView::GetNumPixmapsViewElement(eViewElement ve) {
|
||||
return viewElement->GetNumPixmaps();
|
||||
}
|
||||
|
||||
bool cTemplateView::ExecuteView(eViewElement ve) {
|
||||
map < eViewElement, cTemplateViewElement* >::iterator hit = viewElements.find(ve);
|
||||
if (hit == viewElements.end())
|
||||
return false;
|
||||
cTemplateViewElement *viewElement = hit->second;
|
||||
return viewElement->Execute();
|
||||
}
|
||||
|
||||
int cTemplateView::GetNumListViewMenuItems(void) {
|
||||
int numElements = 0;
|
||||
cTemplateViewList *menuList = GetViewList(vlMenuItem);
|
||||
@ -552,6 +560,7 @@ void cTemplateView::SetFunctionDefinitions(void) {
|
||||
attributes.insert("delay");
|
||||
attributes.insert("fadetime");
|
||||
attributes.insert("name");
|
||||
attributes.insert("condition");
|
||||
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
|
||||
|
||||
name = "area";
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
cRect GetOsdSize(void);
|
||||
int GetNumPixmaps(void);
|
||||
int GetNumPixmapsViewElement(eViewElement ve);
|
||||
bool ExecuteView(eViewElement ve);
|
||||
int GetNumListViewMenuItems(void);
|
||||
bool GetScalingWindow(cRect &scalingWindow);
|
||||
map<string,string> GetCustomStringTokens(void) { return globals->GetCustomStringTokens(); };
|
||||
|
@ -46,7 +46,7 @@ bool cTemplateViewElement::CalculateParameters(void) {
|
||||
parameters->SetContainer(containerX, containerY, containerWidth, containerHeight);
|
||||
parameters->SetGlobals(globals);
|
||||
paramsValid = parameters->CalculateParameters();
|
||||
|
||||
parameters->ParseParameters();
|
||||
return paramsValid;
|
||||
}
|
||||
|
||||
@ -118,6 +118,13 @@ cTemplateFunction *cTemplateViewElement::GetFunction(string name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool cTemplateViewElement::Execute(void) {
|
||||
if (!parameters)
|
||||
return true;
|
||||
return parameters->DoExecute();
|
||||
}
|
||||
|
||||
|
||||
bool cTemplateViewElement::DebugTokens(void) {
|
||||
if (!parameters)
|
||||
return false;
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
void InitIterator(void);
|
||||
cTemplatePixmap *GetNextPixmap(void);
|
||||
cTemplateFunction *GetFunction(string name);
|
||||
bool Execute(void);
|
||||
bool DebugTokens(void);
|
||||
virtual void Debug(void);
|
||||
};
|
||||
|
@ -191,7 +191,7 @@ bool cXmlParser::ParseView(void) {
|
||||
} else if (view->ValidViewElement((const char*)node->name)) {
|
||||
xmlAttrPtr attr = node->properties;
|
||||
vector<pair<string, string> > attribs;
|
||||
ParseAttributes(attr, node, attribs);
|
||||
ParseAttributes(attr, node, attribs, true);
|
||||
ParseViewElement(node->name, node->xmlChildrenNode, attribs);
|
||||
} else if (view->ValidViewList((const char*)node->name)) {
|
||||
ParseViewList(node);
|
||||
@ -682,7 +682,7 @@ bool cXmlParser::ParseSubView(xmlNodePtr node) {
|
||||
if (subView->ValidViewElement((const char*)childNode->name)) {
|
||||
xmlAttrPtr attr = childNode->properties;
|
||||
vector<pair<string, string> > attribs;
|
||||
ParseAttributes(attr, childNode, attribs);
|
||||
ParseAttributes(attr, childNode, attribs, true);
|
||||
ParseViewElement(childNode->name, childNode->xmlChildrenNode, attribs, subView);
|
||||
} else if (subView->ValidViewList((const char*)childNode->name)) {
|
||||
ParseViewList(childNode, subView);
|
||||
@ -954,7 +954,7 @@ void cXmlParser::ParseLoopFunctionCalls(xmlNodePtr node, cTemplateLoopFunction *
|
||||
}
|
||||
}
|
||||
|
||||
bool cXmlParser::ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<string, string> > &attribs) {
|
||||
bool cXmlParser::ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<string, string> > &attribs, bool isViewElement) {
|
||||
if (attr == NULL) {
|
||||
return false;
|
||||
}
|
||||
@ -965,15 +965,16 @@ bool cXmlParser::ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<s
|
||||
while (NULL != attr) {
|
||||
|
||||
string name = (const char*)attr->name;
|
||||
/*
|
||||
if (!name.compare("debug")) {
|
||||
attribs.push_back(pair<string, string>((const char*)attr->name, "true"));
|
||||
attr = attr->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
*/
|
||||
xmlChar *value = NULL;
|
||||
value = xmlGetProp(node, attr->name);
|
||||
if (!view->ValidAttribute((const char*)node->name, (const char*)attr->name)) {
|
||||
if (!view->ValidAttribute(isViewElement ? "viewelement" : (const char*)node->name, (const char*)attr->name)) {
|
||||
esyslog("skindesigner: unknown attribute %s in %s", (const char*)attr->name, (const char*)node->name);
|
||||
attr = attr->next;
|
||||
if (value)
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
void ParseGrid(xmlNodePtr node, vector<pair<string, string> > &attributes);
|
||||
void ParseFunctionCalls(xmlNodePtr node, cTemplatePixmap *pix);
|
||||
void ParseLoopFunctionCalls(xmlNodePtr node, cTemplateLoopFunction *loopFunc);
|
||||
bool ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<string, string> > &attribs);
|
||||
bool ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<string, string> > &attribs, bool isViewElement = false);
|
||||
public:
|
||||
cXmlParser(void);
|
||||
virtual ~cXmlParser(void);
|
||||
|
@ -184,8 +184,8 @@
|
||||
{devices[channelid]} ID of the currently tuned channel
|
||||
{devices[source]} source of the currently tuned channel
|
||||
-->
|
||||
<devices>
|
||||
<area condition="{showdevices}" x="56%" y="94%" width="28%" height="6%" layer="2">
|
||||
<devices condition="{showdevices}">
|
||||
<area x="56%" y="94%" width="28%" height="6%" layer="2">
|
||||
<loop name="devices" x="0" y="0" orientation="horizontal" columnwidth="{areawidth}/{numdevices}" rowheight="{areaheight}">
|
||||
<drawtext x="0" y="0" font="{regular}" fontsize="40%" color="{clrWhite}" text="{devices[num]}: {devices[type]}" />
|
||||
<drawtext condition="{devices[hascam]}" align="right" y="0" font="{regular}" fontsize="40%" color="{clrWhite}" text="(CAM {devices[cam]})" />
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user