immplemented areacontainers to group areas

This commit is contained in:
louis 2015-07-07 17:58:10 +02:00
parent 50fe393724
commit 5a6fb850b3
35 changed files with 1623 additions and 1525 deletions

View File

@ -378,3 +378,4 @@ Version 0.5.3
- fixed crash using animated images in plugins
- added banner to displaymenuschedulescurrentview and
displaymenureplaycurrentview
- immplemented areacontainers to group areas

View File

@ -73,6 +73,7 @@ OBJS = $(PLUGIN).o \
libcore/imagecache.o \
libcore/helpers.o \
libcore/imageloader.o \
libcore/libxmlwrapper.o \
libcore/recfolderinfo.o \
libcore/skinsetup.o \
libcore/skinrepo.o \

View File

@ -237,7 +237,10 @@ void cDesignerConfig::DeleteSkin(string skin) {
if (FolderExists(delPath)) {
dsyslog("skindesigner: deleting skin %s", delPath.c_str());
cString command = cString::sprintf("rm -rf %s", delPath.c_str());
system(*command);
int ok = system(*command);
if (!ok) {
esyslog("skindesigner: error deleting skin %s", delPath.c_str());
}
}
}

View File

@ -21,13 +21,13 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area|areascroll)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT header (area|areascroll)*>
<!ELEMENT header (areacontainer|area|areascroll)*>
<!ATTLIST header
debug CDATA #IMPLIED
condition CDATA #IMPLIED
@ -45,6 +45,6 @@
orientation (horizontal|vertical) #REQUIRED
>
<!ELEMENT listelement (area|areascroll)*>
<!ELEMENT listelement (areacontainer|area|areascroll)*>
%functions;

View File

@ -24,79 +24,79 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT channelinfo (area|areascroll)*>
<!ELEMENT channelinfo (areacontainer|area|areascroll)*>
<!ATTLIST channelinfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT epginfo (area|areascroll)*>
<!ELEMENT epginfo (areacontainer|area|areascroll)*>
<!ATTLIST epginfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT progressbar (area|areascroll)*>
<!ELEMENT progressbar (areacontainer|area|areascroll)*>
<!ATTLIST progressbar
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT progressbarback (area)*>
<!ELEMENT progressbarback (areacontainer|area|areascroll)*>
<!ATTLIST progressbarback
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT statusinfo (area|areascroll)*>
<!ELEMENT statusinfo (areacontainer|area|areascroll)*>
<!ATTLIST statusinfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT audioinfo (area|areascroll)*>
<!ELEMENT audioinfo (areacontainer|area|areascroll)*>
<!ATTLIST audioinfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT ecminfo (area|areascroll)*>
<!ELEMENT ecminfo (areacontainer|area|areascroll)*>
<!ATTLIST ecminfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT screenresolution (area|areascroll)*>
<!ELEMENT screenresolution (areacontainer|area|areascroll)*>
<!ATTLIST screenresolution
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT channelgroup (area|areascroll)*>
<!ELEMENT channelgroup (areacontainer|area|areascroll)*>
<!ATTLIST channelgroup
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT signalquality (area|areascroll)*>
<!ELEMENT signalquality (areacontainer|area|areascroll)*>
<!ATTLIST signalquality
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT signalqualityback (area|areascroll)*>
<!ELEMENT signalqualityback (areacontainer|area|areascroll)*>
<!ATTLIST signalqualityback
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT devices (area|areascroll)*>
<!ELEMENT devices (areacontainer|area|areascroll)*>
<!ATTLIST devices
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -111,7 +111,7 @@
mode CDATA #IMPLIED
>
<!ELEMENT currentweather (area|areascroll)*>
<!ELEMENT currentweather (areacontainer|area|areascroll)*>
<!ATTLIST currentweather
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -125,7 +125,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT scrapercontent (area|areascroll)*>
<!ELEMENT scrapercontent (areacontainer|area|areascroll)*>
<!ATTLIST scrapercontent
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -139,7 +139,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT datetime (area|areascroll)*>
<!ELEMENT datetime (areacontainer|area|areascroll)*>
<!ATTLIST datetime
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -153,7 +153,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT time (area|areascroll)*>
<!ELEMENT time (areacontainer|area|areascroll)*>
<!ATTLIST time
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -167,13 +167,13 @@
condition CDATA #IMPLIED
>
<!ELEMENT message (area|areascroll)*>
<!ELEMENT message (areacontainer|area|areascroll)*>
<!ATTLIST message
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT customtokens (area|areascroll)*>
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
<!ATTLIST customtokens
detached CDATA #IMPLIED
delay CDATA #IMPLIED

View File

@ -16,13 +16,13 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT header (area|areascroll)*>
<!ELEMENT header (areacontainer|area|areascroll)*>
<!ATTLIST header
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -36,7 +36,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT datetime (area|areascroll)*>
<!ELEMENT datetime (areacontainer|area|areascroll)*>
<!ATTLIST datetime
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -50,7 +50,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT time (area|areascroll)*>
<!ELEMENT time (areacontainer|area|areascroll)*>
<!ATTLIST time
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -64,7 +64,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT message (area|areascroll)*>
<!ELEMENT message (areacontainer|area|areascroll)*>
<!ATTLIST message
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -78,19 +78,19 @@
condition CDATA #IMPLIED
>
<!ELEMENT sortmode (area|areascroll)*>
<!ELEMENT sortmode (areacontainer|area|areascroll)*>
<!ATTLIST sortmode
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT colorbuttons (area|areascroll)*>
<!ELEMENT colorbuttons (areacontainer|area|areascroll)*>
<!ATTLIST colorbuttons
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT timers (area|areascroll)*>
<!ELEMENT timers (areacontainer|area|areascroll)*>
<!ATTLIST timers
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -104,7 +104,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT discusage (area|areascroll)*>
<!ELEMENT discusage (areacontainer|area|areascroll)*>
<!ATTLIST discusage
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -118,7 +118,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT devices (area|areascroll)*>
<!ELEMENT devices (areacontainer|area|areascroll)*>
<!ATTLIST devices
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -133,7 +133,7 @@
mode CDATA #IMPLIED
>
<!ELEMENT systemload (area|areascroll)*>
<!ELEMENT systemload (areacontainer|area|areascroll)*>
<!ATTLIST systemload
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -147,7 +147,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT systemmemory (area|areascroll)*>
<!ELEMENT systemmemory (areacontainer|area|areascroll)*>
<!ATTLIST systemmemory
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -161,7 +161,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT temperatures (area|areascroll)*>
<!ELEMENT temperatures (areacontainer|area|areascroll)*>
<!ATTLIST temperatures
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -175,7 +175,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT vdrstatistics (area|areascroll)*>
<!ELEMENT vdrstatistics (areacontainer|area|areascroll)*>
<!ATTLIST vdrstatistics
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -189,7 +189,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT currentschedule (area|areascroll)*>
<!ELEMENT currentschedule (areacontainer|area|areascroll)*>
<!ATTLIST currentschedule
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -203,7 +203,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT currentweather (area|areascroll)*>
<!ELEMENT currentweather (areacontainer|area|areascroll)*>
<!ATTLIST currentweather
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -217,7 +217,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT lastrecordings (area|areascroll)*>
<!ELEMENT lastrecordings (areacontainer|area|areascroll)*>
<!ATTLIST lastrecordings
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -231,7 +231,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT customtokens (area|areascroll)*>
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
<!ATTLIST customtokens
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -245,19 +245,19 @@
condition CDATA #IMPLIED
>
<!ELEMENT scrollbar (area|areascroll)*>
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
<!ATTLIST scrollbar
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT detailheader (area|areascroll)*>
<!ELEMENT detailheader (areacontainer|area|areascroll)*>
<!ATTLIST detailheader
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT tablabels (area|areascroll)*>
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
<!ATTLIST tablabels
debug CDATA #IMPLIED
condition CDATA #IMPLIED
@ -421,12 +421,12 @@
orientation (horizontal|vertical) #REQUIRED
>
<!ELEMENT listelement (area|areascroll)*>
<!ELEMENT listelement (areacontainer|area|areascroll)*>
<!ATTLIST listelement
debug CDATA #IMPLIED
>
<!ELEMENT currentelement (area|areascroll)*>
<!ELEMENT currentelement (areacontainer|area|areascroll)*>
<!ATTLIST currentelement
delay CDATA #REQUIRED
fadetime CDATA #IMPLIED

View File

@ -16,42 +16,42 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
>
<!ELEMENT header (area|areascroll)*>
<!ELEMENT header (areacontainer|area|areascroll)*>
<!ATTLIST header
debug CDATA #IMPLIED
>
<!ELEMENT datetime (area|areascroll)*>
<!ELEMENT datetime (areacontainer|area|areascroll)*>
<!ATTLIST datetime
debug CDATA #IMPLIED
>
<!ELEMENT message (area|areascroll)*>
<!ELEMENT message (areacontainer|area|areascroll)*>
<!ATTLIST message
debug CDATA #IMPLIED
>
<!ELEMENT colorbuttons (area|areascroll)*>
<!ELEMENT colorbuttons (areacontainer|area|areascroll)*>
<!ATTLIST colorbuttons
debug CDATA #IMPLIED
>
<!ELEMENT scrollbar (area|areascroll)*>
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
<!ATTLIST scrollbar
debug CDATA #IMPLIED
>
<!ELEMENT detailheader (area|areascroll)*>
<!ELEMENT detailheader (areacontainer|area|areascroll)*>
<!ATTLIST detailheader
debug CDATA #IMPLIED
>
<!ELEMENT tablabels (area|areascroll)*>
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
<!ATTLIST tablabels
debug CDATA #IMPLIED
>
@ -68,12 +68,12 @@
orientation (horizontal|vertical) #REQUIRED
>
<!ELEMENT listelement (area|areascroll)*>
<!ELEMENT listelement (areacontainer|area|areascroll)*>
<!ATTLIST listelement
debug CDATA #IMPLIED
>
<!ELEMENT currentelement (area|areascroll)*>
<!ELEMENT currentelement (areacontainer|area|areascroll)*>
<!ATTLIST currentelement
delay CDATA #REQUIRED
fadetime CDATA #IMPLIED

View File

@ -21,12 +21,12 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
>
<!ELEMENT message (area|areascroll)*>
<!ELEMENT message (areacontainer|area|areascroll)*>
<!ATTLIST message
debug CDATA #IMPLIED
>

View File

@ -22,18 +22,18 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT viewelement (area|areascroll)*>
<!ELEMENT viewelement (areacontainer|area|areascroll)*>
<!ATTLIST viewelement
name CDATA #REQUIRED
debug CDATA #IMPLIED
>
<!ELEMENT scrollbar (area|areascroll)*>
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
<!ATTLIST scrollbar
debug CDATA #IMPLIED
>
<!ELEMENT tablabels (area|areascroll)*>
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
<!ATTLIST tablabels
debug CDATA #IMPLIED
>

View File

@ -25,29 +25,29 @@
debuggrid CDATA #IMPLIED
>
<!ELEMENT background (area)*>
<!ELEMENT background (areacontainer|area|areascroll)*>
<!ATTLIST background
debug CDATA #IMPLIED
>
<!ELEMENT backgroundmodeonly (area)*>
<!ELEMENT backgroundmodeonly (areacontainer|area|areascroll)*>
<!ATTLIST backgroundmodeonly
debug CDATA #IMPLIED
>
<!ELEMENT datetime (area|areascroll)*>
<!ELEMENT datetime (areacontainer|area|areascroll)*>
<!ATTLIST datetime
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT time (area|areascroll)*>
<!ELEMENT time (areacontainer|area|areascroll)*>
<!ATTLIST time
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT scrapercontent (area|areascroll)*>
<!ELEMENT scrapercontent (areacontainer|area|areascroll)*>
<!ATTLIST scrapercontent
detached CDATA #IMPLIED
delay CDATA #IMPLIED
@ -61,73 +61,73 @@
condition CDATA #IMPLIED
>
<!ELEMENT rectitle (area|areascroll)*>
<!ELEMENT rectitle (areacontainer|area|areascroll)*>
<!ATTLIST rectitle
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT recinfo (area|areascroll)*>
<!ELEMENT recinfo (areacontainer|area|areascroll)*>
<!ATTLIST recinfo
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT currenttime (area|areascroll)*>
<!ELEMENT currenttime (areacontainer|area|areascroll)*>
<!ATTLIST currenttime
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT totaltime (area|areascroll)*>
<!ELEMENT totaltime (areacontainer|area|areascroll)*>
<!ATTLIST totaltime
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT endtime (area|areascroll)*>
<!ELEMENT endtime (areacontainer|area|areascroll)*>
<!ATTLIST endtime
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT progressbar (area|areascroll)*>
<!ELEMENT progressbar (areacontainer|area|areascroll)*>
<!ATTLIST progressbar
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT cutmarks (area|areascroll)*>
<!ELEMENT cutmarks (areacontainer|area|areascroll)*>
<!ATTLIST cutmarks
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT controlicons (area|areascroll)*>
<!ELEMENT controlicons (areacontainer|area|areascroll)*>
<!ATTLIST controlicons
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT controliconsmodeonly (area|areascroll)*>
<!ELEMENT controliconsmodeonly (areacontainer|area|areascroll)*>
<!ATTLIST controliconsmodeonly
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT jump (area|areascroll)*>
<!ELEMENT jump (areacontainer|area|areascroll)*>
<!ATTLIST jump
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT message (area|areascroll)*>
<!ELEMENT message (areacontainer|area|areascroll)*>
<!ATTLIST message
debug CDATA #IMPLIED
condition CDATA #IMPLIED
>
<!ELEMENT onpause (area|areascroll)*>
<!ELEMENT onpause (areacontainer|area|areascroll)*>
<!ATTLIST onpause
debug CDATA #IMPLIED
delay CDATA #REQUIRED
@ -135,7 +135,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT onpausemodeonly (area|areascroll)*>
<!ELEMENT onpausemodeonly (areacontainer|area|areascroll)*>
<!ATTLIST onpausemodeonly
debug CDATA #IMPLIED
delay CDATA #REQUIRED
@ -143,7 +143,7 @@
condition CDATA #IMPLIED
>
<!ELEMENT customtokens (area|areascroll)*>
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
<!ATTLIST customtokens
debug CDATA #IMPLIED
condition CDATA #IMPLIED

View File

@ -1,3 +1,13 @@
<!ELEMENT areacontainer (area|areascroll)*>
<!ATTLIST areacontainer
x CDATA #IMPLIED
y CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
condition CDATA #IMPLIED
debug (true|false) #IMPLIED
>
<!ELEMENT area (loop|fill|drawtext|drawtextbox|drawimage|drawtextvertical|drawrectangle|drawellipse|drawslope)*>
<!ATTLIST area
x CDATA #IMPLIED
@ -28,7 +38,7 @@
debug (true|false) #IMPLIED
>
<!ELEMENT grid (area|areascroll)*>
<!ELEMENT grid (areacontainer|area|areascroll)*>
<!ATTLIST grid
x CDATA #REQUIRED
y CDATA #REQUIRED

View File

@ -151,7 +151,10 @@ bool FirstFileInFolder(string &path, string &extension, string &fileName) {
void CreateFolder(string &path) {
cString command = cString::sprintf("mkdir -p %s", path.c_str());
system(*command);
int ok = system(*command);
if (!ok) {
esyslog("skindesigner: error creating folder %s", path.c_str());
}
}
// trim from start

View File

@ -88,19 +88,19 @@ void cSkinSetupMenu::InitIterators(void) {
subMenuIt = subMenus.begin();
}
void cSkinSetupMenu::SetParameter(eSetupParameterType paramType, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value) {
void cSkinSetupMenu::SetParameter(eSetupParameterType paramType, string name, string displayText, string min, string max, string value) {
cSkinSetupParameter *param = new cSkinSetupParameter();
param->type = paramType;
param->name = (const char*)name;
param->displayText = (const char*)displayText;
param->name = name;
param->displayText = displayText;
if (min && paramType == sptInt) {
param->min = atoi((const char*)min);
if (min.size() && paramType == sptInt) {
param->min = atoi(min.c_str());
}
if (max && paramType == sptInt) {
param->max = atoi((const char*)max);
if (max.size() && paramType == sptInt) {
param->max = atoi(max.c_str());
}
param->value = atoi((const char*)value);
param->value = atoi(value.c_str());
parameters.push_back(param);
}
@ -169,10 +169,10 @@ bool cSkinSetup::ReadFromXML(void) {
return true;
}
void cSkinSetup::SetSubMenu(xmlChar *name, xmlChar *displayText) {
void cSkinSetup::SetSubMenu(string name, string displayText) {
cSkinSetupMenu *subMenu = new cSkinSetupMenu();
subMenu->SetName((const char*)name);
subMenu->SetDisplayText((const char*)displayText);
subMenu->SetName(name);
subMenu->SetDisplayText(displayText);
subMenu->SetParent(currentMenu);
currentMenu->AddSubMenu(subMenu);
currentMenu = subMenu;
@ -185,15 +185,15 @@ void cSkinSetup::SubMenuDone(void) {
}
}
void cSkinSetup::SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value) {
if (!type || !name || !displayText || !value) {
void cSkinSetup::SetParameter(string type, string name, string displayText, string min, string max, string value) {
if (!type.size() || !name.size() || !displayText.size() || !value.size()) {
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
return;
}
eSetupParameterType paramType = sptUnknown;
if (!xmlStrcmp(type, (const xmlChar *) "int")) {
if (!type.compare("int")) {
paramType = sptInt;
} else if (!xmlStrcmp(type, (const xmlChar *) "bool")) {
} else if (!type.compare("bool")) {
paramType = sptBool;
}
if (paramType == sptUnknown) {

View File

@ -55,7 +55,7 @@ public:
void SetParent(cSkinSetupMenu *p) { parent = p; };
cSkinSetupMenu *GetParent(void) { return parent; };
void AddSubMenu(cSkinSetupMenu *sub) { subMenus.push_back(sub); };
void SetParameter(eSetupParameterType paramType, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value);
void SetParameter(eSetupParameterType paramType, string name, string displayText, string min, string max, string value);
void InitIterators(void);
void InitParameterIterator(void) { paramIt = parameters.begin(); };
cSkinSetupParameter *GetNextParameter(bool deep = true);
@ -80,9 +80,9 @@ public:
cSkinSetup(string skin);
virtual ~cSkinSetup(void);
bool ReadFromXML(void);
void SetSubMenu(xmlChar *name, xmlChar *displayText);
void SetSubMenu(string name, string displayText);
void SubMenuDone(void);
void SetParameter(xmlChar *type, xmlChar *name, xmlChar* displayText, xmlChar *min, xmlChar *max, xmlChar *value);
void SetParameter(string type, string name, string displayText, string min, string max, string value);
void InitParameterIterator(void) { rootMenu->InitIterators(); };
cSkinSetupParameter *GetNextParameter(void);
cSkinSetupParameter *GetParameter(string name);

View File

@ -18,13 +18,13 @@ bool cGlobals::ReadFromXML(void) {
//globals.xml is mandatory
string xmlFile = "globals.xml";
cXmlParser parser;
if (!parser.ReadGlobals(this, xmlFile, true))
if (!parser.ReadGlobals(this, xmlFile))
return false;
if (!parser.ParseGlobals())
return false;
//theme.xml is optional
xmlFile = "theme.xml";
if (parser.ReadGlobals(this, xmlFile, false)) {
if (parser.ReadGlobals(this, xmlFile)) {
parser.ParseGlobals();
}
return true;

View File

@ -190,10 +190,10 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
view->InitViewElementIterator();
cTemplateViewElement *viewElement = NULL;
while(viewElement = view->GetNextViewElement()) {
viewElement->InitIterator();
viewElement->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewElement->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -206,10 +206,10 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
view->InitViewListIterator();
cTemplateViewList *viewList = NULL;
while(viewList = view->GetNextViewList()) {
viewList->InitIterator();
viewList->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewList->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -218,9 +218,9 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
}
}
cTemplateViewElement *listElement = viewList->GetListElement();
listElement->InitIterator();
listElement->InitPixmapIterator();
while(pix = listElement->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -233,7 +233,7 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
view->InitViewTabIterator();
cTemplateViewTab *viewTab = NULL;
while(viewTab = view->GetNextViewTab()) {
viewTab->InitIterator();
viewTab->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = viewTab->GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -248,7 +248,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
view->InitViewElementIterator();
cTemplateViewElement *viewElement = NULL;
while(viewElement = view->GetNextViewElement()) {
viewElement->InitIterator();
viewElement->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewElement->GetNextPixmap()) {
CachePixmapImages(pix);
@ -258,13 +258,13 @@ void cTemplate::CacheImages(cTemplateView *view) {
view->InitViewListIterator();
cTemplateViewList *viewList = NULL;
while(viewList = view->GetNextViewList()) {
viewList->InitIterator();
viewList->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewList->GetNextPixmap()) {
CachePixmapImages(pix);
}
cTemplateViewElement *listElement = viewList->GetListElement();
listElement->InitIterator();
listElement->InitPixmapIterator();
while(pix = listElement->GetNextPixmap()) {
CachePixmapImages(pix);
}
@ -272,7 +272,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
if (!currentElement) {
continue;
}
currentElement->InitIterator();
currentElement->InitPixmapIterator();
while(pix = currentElement->GetNextPixmap()) {
CachePixmapImages(pix);
}
@ -286,7 +286,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
}
void cTemplate::CachePixmapImages(cTemplatePixmap *pix) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawImage) {

View File

@ -1568,6 +1568,9 @@ string cTemplateFunction::GetFuncName(void) {
case ftViewElement:
name = "View Element Parameters";
break;
case ftPixmapContainer:
name = "Pixmap Container Parameters";
break;
case ftPixmap:
name = "Pixmap Parameters";
break;

View File

@ -23,6 +23,7 @@ enum eFuncType {
ftView,
ftViewElement,
ftViewList,
ftPixmapContainer,
ftPixmap,
ftPixmapScroll,
ftLoop,

View File

@ -1,16 +1,40 @@
#include "templatepixmap.h"
using namespace std;
// --- cTemplatePixmapNode -------------------------------------------------------------
// --- cTemplatePixmap -------------------------------------------------------------
cTemplatePixmap::cTemplatePixmap(void) {
cTemplatePixmapNode::cTemplatePixmapNode(void) {
parameters = NULL;
globals = NULL;
containerX = 0;
containerY = 0;
containerWidth = 0;
containerHeight = 0;
globals = NULL;
}
cTemplatePixmapNode::~cTemplatePixmapNode() {
if (parameters)
delete parameters;
}
void cTemplatePixmapNode::SetParameters(vector<stringpair> &params) {
parameters = new cTemplateFunction(isContainer?ftPixmapContainer:ftPixmap);
parameters->SetGlobals(globals);
parameters->SetParameters(params);
}
void cTemplatePixmapNode::SetContainer(int x, int y, int w, int h) {
containerX = x;
containerY = y;
containerWidth = w;
containerHeight = h;
}
// --- cTemplatePixmap -------------------------------------------------------------
cTemplatePixmap::cTemplatePixmap(void) {
pixContainer = NULL;
isContainer = false;
scrolling = false;
background = false;
}
@ -19,21 +43,6 @@ cTemplatePixmap::~cTemplatePixmap() {
for (vector<cTemplateFunction*>::iterator it = functions.begin(); it != functions.end(); it++) {
delete (*it);
}
if (parameters)
delete parameters;
}
void cTemplatePixmap::SetParameters(vector<pair<string, string> > &params) {
parameters = new cTemplateFunction(ftPixmap);
parameters->SetGlobals(globals);
parameters->SetParameters(params);
}
void cTemplatePixmap::SetContainer(int x, int y, int w, int h) {
containerX = x;
containerY = y;
containerWidth = w;
containerHeight = h;
}
void cTemplatePixmap::SetWidth(int width) {
@ -76,6 +85,11 @@ void cTemplatePixmap::SetYPercent(double y) {
parameters->SetYManually(absY);
}
void cTemplatePixmap::SetParameter(eParamType type, string value) {
parameters->SetParameter(type, value);
}
void cTemplatePixmap::ClearDynamicParameters(void) {
parameters->ClearDynamicParameters();
}
@ -180,7 +194,7 @@ bool cTemplatePixmap::CalculateParameters(void) {
}
void cTemplatePixmap::ClearDynamicFunctionParameters(void) {
InitIterator();
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
func->ClearDynamicParameters();
@ -188,7 +202,7 @@ void cTemplatePixmap::ClearDynamicFunctionParameters(void) {
}
void cTemplatePixmap::ParseDynamicFunctionParameters(map <string,string> *stringTokens, map <string,int> *intTokens, map < string, vector< map< string, string > > > *loopTokens) {
InitIterator();
InitFunctionIterator();
cTemplateFunction *func = NULL;
bool completelyParsed = true;
while(func = GetNextFunction()) {
@ -215,7 +229,7 @@ void cTemplatePixmap::ParseDynamicFunctionParameters(map <string,string> *string
if (!replacedWidth && !replacedHeight && !replacedPosX && !replacedPosY)
return;
InitIterator();
InitFunctionIterator();
func = NULL;
while(func = GetNextFunction()) {
if (func->ParsedCompletely())
@ -249,7 +263,7 @@ bool cTemplatePixmap::CalculateDrawPortSize(cSize &size, map < string, vector< m
}
} else if (orientation == orVertical) {
//check "last" element height
InitIterator();
InitFunctionIterator();
cTemplateFunction *f = NULL;
int drawportHeight = 1;
while (f = GetNextFunction()) {
@ -324,7 +338,7 @@ void cTemplatePixmap::SetScrollingTextWidth(void) {
if (orientation != orHorizontal)
return;
int pixWidth = parameters->GetNumericParameter(ptWidth);
InitIterator();
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -339,7 +353,7 @@ cTemplateFunction *cTemplatePixmap::GetScrollFunction(void) {
string scrollElement = parameters->GetParameter(ptScrollElement);
if (scrollElement.size() == 0)
return NULL;
InitIterator();
InitFunctionIterator();
cTemplateFunction *f = NULL;
while (f = GetNextFunction()) {
string funcName = f->GetParameter(ptName);
@ -365,7 +379,7 @@ int cTemplatePixmap::GetNumericParameter(eParamType type) {
return parameters->GetNumericParameter(type);
}
void cTemplatePixmap::InitIterator(void) {
void cTemplatePixmap::InitFunctionIterator(void) {
funcIt = functions.begin();
}
@ -393,9 +407,26 @@ bool cTemplatePixmap::Ready(void) {
return true;
}
bool cTemplatePixmap::ParameterSet(eParamType type) {
string value = parameters->GetParameter(type);
if (value.size() > 0)
return true;
return false;
}
cTemplateFunction *cTemplatePixmap::GetFunction(string name) {
for (vector<cTemplateFunction*>::iterator it = functions.begin(); it != functions.end(); it++) {
string funcName = (*it)->GetParameter(ptName);
if (!name.compare(funcName))
return *it;
}
return NULL;
}
bool cTemplatePixmap::ReplaceWidthFunctions(void) {
bool replaced = false;
InitIterator();
bool found = false;
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
if (func->ParsedCompletely()) {
@ -411,6 +442,7 @@ bool cTemplatePixmap::ReplaceWidthFunctions(void) {
cTemplateFunction *myFunc = *it;
string myFuncName = myFunc->GetParameter(ptName);
if (!myFuncName.compare(label)) {
found = true;
funcWidth = myFunc->GetWidth();
func->SetWidth(type, label, funcWidth);
if (func->Updated()) {
@ -418,6 +450,20 @@ bool cTemplatePixmap::ReplaceWidthFunctions(void) {
} else {
replaced = true;
}
break;
}
}
if (!found && pixContainer) {
cTemplateFunction *myFunc = pixContainer->GetFunction(label);
if (myFunc) {
funcWidth = myFunc->GetWidth();
func->SetWidth(type, label, funcWidth);
if (func->Updated()) {
func->CompleteParameters();
} else {
replaced = true;
}
break;
}
}
}
@ -427,7 +473,8 @@ bool cTemplatePixmap::ReplaceWidthFunctions(void) {
bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string, string > > > *loopTokens) {
bool replaced = false;
InitIterator();
bool found = false;
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
if (func->ParsedCompletely()) {
@ -443,6 +490,7 @@ bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string,
cTemplateFunction *myFunc = *it;
string myFuncName = myFunc->GetParameter(ptName);
if (!myFuncName.compare(label)) {
found = true;
funcHeight = myFunc->GetHeight(loopTokens);
func->SetHeight(type, label, funcHeight);
if (func->Updated()) {
@ -450,6 +498,20 @@ bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string,
} else {
replaced = true;
}
break;
}
}
if (!found && pixContainer) {
cTemplateFunction *myFunc = pixContainer->GetFunction(label);
if (myFunc) {
funcHeight = myFunc->GetHeight(loopTokens);
func->SetHeight(type, label, funcHeight);
if (func->Updated()) {
func->CompleteParameters();
} else {
replaced = true;
}
break;
}
}
}
@ -459,7 +521,8 @@ bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string,
bool cTemplatePixmap::ReplacePosXFunctions(void) {
bool replaced = false;
InitIterator();
bool found = false;
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
if (func->ParsedCompletely()) {
@ -475,6 +538,7 @@ bool cTemplatePixmap::ReplacePosXFunctions(void) {
cTemplateFunction *myFunc = *it;
string myFuncName = myFunc->GetParameter(ptName);
if (!myFuncName.compare(label)) {
found = true;
funcX = myFunc->GetNumericParameter(ptX);
if (funcX > -1) {
func->SetX(type, label, funcX);
@ -484,6 +548,22 @@ bool cTemplatePixmap::ReplacePosXFunctions(void) {
replaced = true;
}
}
break;
}
}
if (!found && pixContainer) {
cTemplateFunction *myFunc = pixContainer->GetFunction(label);
if (myFunc) {
funcX = myFunc->GetNumericParameter(ptX);
if (funcX > -1) {
func->SetX(type, label, funcX);
if (func->Updated()) {
func->CompleteParameters();
} else {
replaced = true;
}
}
break;
}
}
}
@ -493,7 +573,8 @@ bool cTemplatePixmap::ReplacePosXFunctions(void) {
bool cTemplatePixmap::ReplacePosYFunctions(void) {
bool replaced = false;
InitIterator();
bool found = false;
InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = GetNextFunction()) {
if (func->ParsedCompletely()) {
@ -509,6 +590,7 @@ bool cTemplatePixmap::ReplacePosYFunctions(void) {
cTemplateFunction *myFunc = *it;
string myFuncName = myFunc->GetParameter(ptName);
if (!myFuncName.compare(label)) {
found = true;
funcY = myFunc->GetNumericParameter(ptY);
if (funcY > -1) {
func->SetY(type, label, funcY);
@ -518,6 +600,22 @@ bool cTemplatePixmap::ReplacePosYFunctions(void) {
replaced = true;
}
}
break;
}
}
if (!found && pixContainer) {
cTemplateFunction *myFunc = pixContainer->GetFunction(label);
if (myFunc) {
funcY = myFunc->GetNumericParameter(ptY);
if (funcY > -1) {
func->SetY(type, label, funcY);
if (func->Updated()) {
func->CompleteParameters();
} else {
replaced = true;
}
}
break;
}
}
}
@ -532,3 +630,110 @@ void cTemplatePixmap::Debug(void) {
(*it)->Debug();
}
}
// --- cTemplatePixmapContainer -------------------------------------------------------------
cTemplatePixmapContainer::cTemplatePixmapContainer(void) {
isContainer = true;
}
cTemplatePixmapContainer::~cTemplatePixmapContainer() {
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
delete (*it);
}
}
void cTemplatePixmapContainer::SetGlobals(cGlobals *globals) {
this->globals = globals;
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
(*it)->SetGlobals(globals);
}
}
void cTemplatePixmapContainer::SetWidth(int width) {
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
(*it)->SetWidth(width);
}
}
void cTemplatePixmapContainer::SetHeight(int height) {
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
(*it)->SetHeight(height);
}
}
void cTemplatePixmapContainer::AddPixmap(cTemplatePixmap *pix) {
//setting default parameters of container if parameter is not set in area
string containerDefaultX = parameters->GetParameter(ptX);
string containerDefaultY = parameters->GetParameter(ptY);
string containerDefaultWidth = parameters->GetParameter(ptWidth);
string containerDefaultHeight = parameters->GetParameter(ptHeight);
if (containerDefaultX.size() > 0 && !pix->ParameterSet(ptX))
pix->SetParameter(ptX, containerDefaultX);
if (containerDefaultY.size() > 0 && !pix->ParameterSet(ptY))
pix->SetParameter(ptY, containerDefaultY);
if (containerDefaultWidth.size() > 0 && !pix->ParameterSet(ptWidth))
pix->SetParameter(ptWidth, containerDefaultWidth);
if (containerDefaultHeight.size() > 0 && !pix->ParameterSet(ptHeight))
pix->SetParameter(ptHeight, containerDefaultHeight);
pix->SetPixmapContainer(this);
pixmaps.push_back(pix);
}
bool cTemplatePixmapContainer::CalculateParameters(void) {
bool paramsValid = true;
//Calculate Pixmap Size
parameters->SetContainer(containerX, containerY, containerWidth, containerHeight);
parameters->SetGlobals(globals);
paramsValid = parameters->CalculateParameters();
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
(*it)->SetContainer(containerX, containerY, containerWidth, containerHeight);
(*it)->SetGlobals(globals);
paramsValid = (*it)->CalculateParameters() && paramsValid;
}
return paramsValid;
}
void cTemplatePixmapContainer::ParseDynamicParameters(map <string,string> *stringTokens, map <string,int> *intTokens) {
parameters->ClearDynamicParameters();
parameters->SetIntTokens(intTokens);
parameters->SetStringTokens(stringTokens);
parameters->ParseParameters();
parameters->UnsetIntTokens();
parameters->UnsetStringTokens();
}
void cTemplatePixmapContainer::InitIterator(void) {
pixmapIterator = pixmaps.begin();
}
cTemplatePixmap *cTemplatePixmapContainer::GetNextPixmap(void) {
if (pixmapIterator == pixmaps.end())
return NULL;
cTemplatePixmap *pix = *pixmapIterator;
pixmapIterator++;
return pix;
}
cTemplateFunction *cTemplatePixmapContainer::GetFunction(string name) {
cTemplateFunction *hit = NULL;
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
hit = (*it)->GetFunction(name);
if (hit)
return hit;
}
return NULL;
}
void cTemplatePixmapContainer::Debug(void) {
esyslog("skindesigner: pixmapcontainer");
parameters->Debug();
for (vector<cTemplatePixmap*>::iterator it = pixmaps.begin(); it != pixmaps.end(); it++) {
(*it)->Debug();
}
}

View File

@ -13,23 +13,46 @@
#include "globals.h"
#include "templateloopfunction.h"
#include "../views/viewhelpers.h"
using namespace std;
// --- cTemplatePixmap -------------------------------------------------------------
class cTemplatePixmap {
// --- cTemplatePixmapNode -------------------------------------------------------------
class cTemplatePixmapNode {
protected:
bool scrolling;
bool background;
bool isContainer;
cGlobals *globals;
cTemplateFunction *parameters;
vector<cTemplateFunction*> functions;
vector<cTemplateFunction*>::iterator funcIt;
int containerX;
int containerY;
int containerWidth;
int containerHeight;
cGlobals *globals;
public:
cTemplatePixmapNode(void);
virtual ~cTemplatePixmapNode(void);
void SetParameters(vector<stringpair> &params);
void SetContainer(int x, int y, int w, int h);
bool IsContainer(void) { return isContainer; };
bool DoExecute(void) { return parameters->DoExecute(); };
bool DoDebug(void) { return parameters->DoDebug(); };
virtual void SetGlobals(cGlobals *globals) { this->globals = globals; };
virtual bool CalculateParameters(void) { return false; };
virtual void SetWidth(int width) {};
virtual void SetHeight(int height) {};
virtual int NumPixmaps(void) { return 0; };
virtual void Debug(void) {};
};
// --- cTemplatePixmap -------------------------------------------------------------
class cTemplatePixmapContainer;
class cTemplatePixmap : public cTemplatePixmapNode {
protected:
cTemplatePixmapContainer *pixContainer;
bool scrolling;
bool background;
vector<cTemplateFunction*> functions;
vector<cTemplateFunction*>::iterator funcIt;
//functions replacing {width(label)} and {height(label)} tokens
bool ReplaceWidthFunctions(void);
bool ReplaceHeightFunctions(map < string, vector< map< string, string > > > *loopTokens);
@ -42,8 +65,8 @@ public:
cTemplatePixmap(void);
virtual ~cTemplatePixmap(void);
//Setter Functions
void SetPixmapContainer(cTemplatePixmapContainer *pixContainer) { this->pixContainer = pixContainer; };
void SetScrolling(void) { scrolling = true; };
void SetParameters(vector<pair<string, string> > &params);
void SetWidth(int width);
void SetHeight(int height);
void SetX(int x);
@ -52,8 +75,7 @@ public:
void SetHeightPercent(double height);
void SetXPercent(double x);
void SetYPercent(double y);
void SetContainer(int x, int y, int w, int h);
void SetGlobals(cGlobals *globals) { this->globals = globals; };
void SetParameter(eParamType type, string value);
void AddFunction(string name, vector<pair<string, string> > &params);
void AddLoopFunction(cTemplateLoopFunction *lf);
//PreCache Parameters
@ -71,18 +93,40 @@ public:
//Set max width for text in scrollarea
void SetScrollingTextWidth(void);
//Getter Functions
int NumPixmaps(void) { return 1; };
cRect GetPixmapSize(void);
int GetNumericParameter(eParamType type);
bool Scrolling(void) { return scrolling; };
bool DoExecute(void) { return parameters->DoExecute(); };
bool DoDebug(void) { return parameters->DoDebug(); };
bool Ready(void);
bool BackgroundArea(void) { return background; };
bool ParameterSet(eParamType type);
cTemplateFunction *GetFunction(string name);
//Traverse Functions
void InitIterator(void);
void InitFunctionIterator(void);
cTemplateFunction *GetNextFunction(void);
//Debug
void Debug(void);
};
class cTemplatePixmapContainer : public cTemplatePixmapNode {
private:
vector<cTemplatePixmap*> pixmaps;
vector<cTemplatePixmap*>::iterator pixmapIterator;
public:
cTemplatePixmapContainer(void);
virtual ~cTemplatePixmapContainer(void);
void SetGlobals(cGlobals *globals);
void SetWidth(int width);
void SetHeight(int height);
void AddPixmap(cTemplatePixmap *pix);
//PreCache Parameters
bool CalculateParameters(void);
void ParseDynamicParameters(map <string,string> *stringTokens, map <string,int> *intTokens);
int NumPixmaps(void) { return pixmaps.size(); };
void InitIterator(void);
cTemplatePixmap *GetNextPixmap(void);
cTemplateFunction *GetFunction(string name);
void Debug(void);
};
#endif //__TEMPLATEPIXMAP_H

View File

@ -349,10 +349,10 @@ void cTemplateView::Translate(void) {
InitViewElementIterator();
cTemplateViewElement *viewElement = NULL;
while(viewElement = GetNextViewElement()) {
viewElement->InitIterator();
viewElement->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewElement->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -385,10 +385,10 @@ void cTemplateView::Translate(void) {
InitViewListIterator();
cTemplateViewList *viewList = NULL;
while(viewList = GetNextViewList()) {
viewList->InitIterator();
viewList->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewList->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -402,9 +402,9 @@ void cTemplateView::Translate(void) {
}
}
cTemplateViewElement *listElement = viewList->GetListElement();
listElement->InitIterator();
listElement->InitPixmapIterator();
while(pix = listElement->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -420,9 +420,9 @@ void cTemplateView::Translate(void) {
cTemplateViewElement *listElementCurrent = viewList->GetListElementCurrent();
if (listElementCurrent) {
listElementCurrent->InitIterator();
listElementCurrent->InitPixmapIterator();
while(pix = listElementCurrent->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -463,7 +463,7 @@ void cTemplateView::Translate(void) {
if (translated) {
viewTab->SetName(tabTrans);
}
viewTab->InitIterator();
viewTab->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = viewTab->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -496,10 +496,10 @@ void cTemplateView::Translate(void) {
InitViewGridIterator();
cTemplateViewGrid *viewGrid = NULL;
while(viewGrid = GetNextViewGrid()) {
viewGrid->InitIterator();
viewGrid->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewGrid->GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
@ -696,6 +696,16 @@ void cTemplateView::SetFunctionDefinitions(void) {
attributes.insert("debug");
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
name = "areacontainer";
attributes.clear();
attributes.insert("x");
attributes.insert("y");
attributes.insert("width");
attributes.insert("height");
attributes.insert("debug");
attributes.insert("condition");
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
name = "area";
attributes.clear();
attributes.insert("debug");
@ -998,7 +1008,7 @@ string cTemplateViewChannel::GetViewElementName(eViewElement ve) {
return name;
}
void cTemplateViewChannel::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewChannel::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<stringpair> &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -1040,7 +1050,6 @@ void cTemplateViewChannel::AddPixmap(string sViewElement, cTemplatePixmap *pix,
} else if (!sViewElement.compare("customtokens")) {
ve = veCustomTokens;
}
if (ve == veUndefined) {
esyslog("skindesigner: unknown ViewElement in displaychannel: %s", sViewElement.c_str());
return;
@ -1507,7 +1516,7 @@ void cTemplateViewMenu::AddPluginView(string plugName, int templNo, cTemplateVie
}
}
void cTemplateViewMenu::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewMenu::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -1648,7 +1657,7 @@ string cTemplateViewMessage::GetViewElementName(eViewElement ve) {
return name;
}
void cTemplateViewMessage::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewMessage::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -1801,7 +1810,7 @@ string cTemplateViewReplay::GetViewElementName(eViewElement ve) {
return name;
}
void cTemplateViewReplay::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewReplay::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -1916,7 +1925,7 @@ string cTemplateViewVolume::GetViewElementName(eViewElement ve) {
return name;
}
void cTemplateViewVolume::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewVolume::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -2026,7 +2035,7 @@ string cTemplateViewAudioTracks::GetViewListName(eViewList vl) {
return name;
}
void cTemplateViewAudioTracks::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewAudioTracks::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
if (!sViewElement.compare("background")) {
@ -2133,7 +2142,7 @@ void cTemplateViewPlugin::AddSubView(string sSubView, cTemplateView *subView) {
subViews.insert(pair< eSubView, cTemplateView* >((eSubView)subViewId, subView));
}
void cTemplateViewPlugin::AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {
void cTemplateViewPlugin::AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes) {
eViewElement ve = veUndefined;
string viewElementName = "";
int viewElementID = -1;
@ -2177,7 +2186,7 @@ void cTemplateViewPlugin::AddPixmap(string sViewElement, cTemplatePixmap *pix, v
}
}
void cTemplateViewPlugin::AddPixmapGrid(cTemplatePixmap *pix, vector<pair<string, string> > &gridAttributes) {
void cTemplateViewPlugin::AddPixmapGrid(cTemplatePixmapNode *pix, vector<pair<string, string> > &gridAttributes) {
string gridName = "";
bool found = false;
for (vector<pair<string, string> >::iterator it = gridAttributes.begin(); it != gridAttributes.end(); it++) {

View File

@ -76,8 +76,8 @@ public:
virtual string GetViewListName(eViewList vl) { return ""; };
virtual void AddSubView(string sSubView, cTemplateView *subView) {};
virtual void AddPluginView(string plugName, int templNo, cTemplateView *plugView) {};
virtual void AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {};
virtual void AddPixmapGrid(cTemplatePixmap *pix, vector<pair<string, string> > &gridAttributes) {};
virtual void AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<stringpair> &viewElementattributes) {};
virtual void AddPixmapGrid(cTemplatePixmapNode *pix, vector<pair<string, string> > &gridAttributes) {};
virtual void AddViewList(string sViewList, cTemplateViewList *viewList) {};
virtual void AddViewTab(cTemplateViewTab *viewTab) {};
//Setter Functions
@ -146,11 +146,12 @@ class cTemplateViewChannel : public cTemplateView {
private:
void SetViewElements(void);
void SetViewLists(void);
eViewElement GetViewElementID(string sViewElement);
public:
cTemplateViewChannel(void);
virtual ~cTemplateViewChannel(void);
string GetViewElementName(eViewElement ve);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<stringpair> &viewElementattributes);
};
// --- cTemplateViewMenu -------------------------------------------------------------
@ -168,7 +169,7 @@ public:
string GetViewListName(eViewList vl);
void AddSubView(string sSubView, cTemplateView *subView);
void AddPluginView(string plugName, int templNo, cTemplateView *plugView);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
void AddViewList(string sViewList, cTemplateViewList *viewList);
void AddViewTab(cTemplateViewTab *viewTab);
};
@ -182,7 +183,7 @@ public:
cTemplateViewMessage(void);
virtual ~cTemplateViewMessage(void);
string GetViewElementName(eViewElement ve);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
};
// --- cTemplateViewReplay -------------------------------------------------------------
@ -194,7 +195,7 @@ public:
cTemplateViewReplay(void);
virtual ~cTemplateViewReplay(void);
string GetViewElementName(eViewElement ve);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
};
// --- cTemplateViewVolume -------------------------------------------------------------
@ -206,7 +207,7 @@ public:
cTemplateViewVolume(void);
virtual ~cTemplateViewVolume(void);
string GetViewElementName(eViewElement ve);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
};
// --- cTemplateViewAudioTracks -------------------------------------------------------------
@ -220,7 +221,7 @@ public:
virtual ~cTemplateViewAudioTracks(void);
string GetViewElementName(eViewElement ve);
string GetViewListName(eViewList vl);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
void AddViewList(string sViewList, cTemplateViewList *viewList);
};
@ -234,8 +235,8 @@ public:
cTemplateViewPlugin(string pluginName, int viewID);
virtual ~cTemplateViewPlugin(void);
void AddSubView(string sSubView, cTemplateView *subView);
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmapGrid(cTemplatePixmap *pix, vector<pair<string, string> > &gridAttributes);
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
void AddPixmapGrid(cTemplatePixmapNode *pix, vector<pair<string, string> > &gridAttributes);
void AddViewTab(cTemplateViewTab *viewTab);
};

View File

@ -9,12 +9,14 @@ cTemplateViewElement::cTemplateViewElement(void) {
containerWidth = 0;
containerHeight = 0;
pixOffset = -1;
pixmapIterator = NULL;
currentNode = NULL;
}
cTemplateViewElement::~cTemplateViewElement(void) {
if (parameters)
delete parameters;
for (vector<cTemplatePixmap*>::iterator it = viewPixmaps.begin(); it != viewPixmaps.end(); it++) {
for (vector<cTemplatePixmapNode*>::iterator it = viewPixmapNodes.begin(); it != viewPixmapNodes.end(); it++) {
delete (*it);
}
}
@ -28,7 +30,7 @@ void cTemplateViewElement::SetContainer(int x, int y, int width, int height) {
void cTemplateViewElement::SetGlobals(cGlobals *globals) {
this->globals = globals;
for (vector<cTemplatePixmap*>::iterator pix = viewPixmaps.begin(); pix != viewPixmaps.end(); pix++) {
for (vector<cTemplatePixmapNode*>::iterator pix = viewPixmapNodes.begin(); pix != viewPixmapNodes.end(); pix++) {
(*pix)->SetGlobals(globals);
}
}
@ -52,7 +54,7 @@ bool cTemplateViewElement::CalculateParameters(void) {
bool cTemplateViewElement::CalculatePixmapParameters(void) {
bool paramsValid = true;
for (vector<cTemplatePixmap*>::iterator pix = viewPixmaps.begin(); pix != viewPixmaps.end(); pix++) {
for (vector<cTemplatePixmapNode*>::iterator pix = viewPixmapNodes.begin(); pix != viewPixmapNodes.end(); pix++) {
(*pix)->SetContainer(containerX, containerY, containerWidth, containerHeight);
(*pix)->SetGlobals(globals);
paramsValid = paramsValid && (*pix)->CalculateParameters();
@ -62,7 +64,7 @@ bool cTemplateViewElement::CalculatePixmapParameters(void) {
bool cTemplateViewElement::CalculatePixmapParametersList(int orientation, int numElements) {
bool paramsValid = true;
for (vector<cTemplatePixmap*>::iterator pix = viewPixmaps.begin(); pix != viewPixmaps.end(); pix++) {
for (vector<cTemplatePixmapNode*>::iterator pix = viewPixmapNodes.begin(); pix != viewPixmapNodes.end(); pix++) {
(*pix)->SetContainer(containerX, containerY, containerWidth, containerHeight);
(*pix)->SetGlobals(globals);
if (orientation == orHorizontal) {
@ -87,23 +89,91 @@ int cTemplateViewElement::GetNumericParameter(eParamType type) {
return parameters->GetNumericParameter(type);
}
void cTemplateViewElement::InitIterator(void) {
pixIterator = viewPixmaps.begin();
int cTemplateViewElement::GetNumPixmaps(void) {
int numPixmaps = 0;
for (vector<cTemplatePixmapNode*>::iterator pix = viewPixmapNodes.begin(); pix != viewPixmapNodes.end(); pix++) {
numPixmaps += (*pix)->NumPixmaps();
}
return numPixmaps;
};
void cTemplateViewElement::InitPixmapNodeIterator(void) {
pixmapNodeIterator = viewPixmapNodes.begin();
}
cTemplatePixmap *cTemplateViewElement::GetNextPixmap(void) {
if (pixIterator == viewPixmaps.end())
cTemplatePixmapNode *cTemplateViewElement::GetNextPixmapNode(void) {
if (pixmapNodeIterator == viewPixmapNodes.end())
return NULL;
cTemplatePixmap *pix = *pixIterator;
pixIterator++;
cTemplatePixmapNode *pix = *pixmapNodeIterator;
pixmapNodeIterator++;
return pix;
}
void cTemplateViewElement::InitPixmapIterator(void) {
pixmapNodeIterator = viewPixmapNodes.begin();
if (pixmapNodeIterator == viewPixmapNodes.end())
return;
if (!(*pixmapNodeIterator)->IsContainer()) {
//first node is a pixmap, use this
pixmapIterator = dynamic_cast<cTemplatePixmap*>(*pixmapNodeIterator);
return;
}
//first node is a container, so fetch first pixmap of this container
currentNode = dynamic_cast<cTemplatePixmapContainer*>(*pixmapNodeIterator);
currentNode->InitIterator();
pixmapIterator = currentNode->GetNextPixmap();
}
cTemplatePixmap *cTemplateViewElement::GetNextPixmap(void) {
if (!pixmapIterator)
return NULL;
cTemplatePixmap *current = pixmapIterator;
//set next pixmap
if (!currentNode) {
//last node was a pixmap
pixmapNodeIterator++;
if (pixmapNodeIterator == viewPixmapNodes.end()) {
pixmapIterator = NULL;
return current;
}
if (!(*pixmapNodeIterator)->IsContainer()) {
//node is a pixmap, use this
pixmapIterator = dynamic_cast<cTemplatePixmap*>(*pixmapNodeIterator);
return current;
}
//node is a container, so fetch first pixmap of this container
currentNode = dynamic_cast<cTemplatePixmapContainer*>(*pixmapNodeIterator);
currentNode->InitIterator();
pixmapIterator = currentNode->GetNextPixmap();
} else {
pixmapIterator = currentNode->GetNextPixmap();
if (pixmapIterator) {
return current;
}
currentNode = NULL;
pixmapNodeIterator++;
if (pixmapNodeIterator == viewPixmapNodes.end()) {
pixmapIterator = NULL;
return current;
}
if (!(*pixmapNodeIterator)->IsContainer()) {
//node is a pixmap, use this
pixmapIterator = dynamic_cast<cTemplatePixmap*>(*pixmapNodeIterator);
return current;
}
//node is a container, so fetch first pixmap of this container
currentNode = dynamic_cast<cTemplatePixmapContainer*>(*pixmapNodeIterator);
currentNode->InitIterator();
pixmapIterator = currentNode->GetNextPixmap();
}
return current;
}
cTemplateFunction *cTemplateViewElement::GetFunction(string name) {
InitIterator();
InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while (pix = GetNextPixmap()) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
if (func->GetType() == ftDrawText) {
@ -151,7 +221,7 @@ void cTemplateViewElement::Debug(void) {
if (parameters)
parameters->Debug();
return;
for (vector<cTemplatePixmap*>::iterator it = viewPixmaps.begin(); it != viewPixmaps.end(); it++) {
for (vector<cTemplatePixmapNode*>::iterator it = viewPixmapNodes.begin(); it != viewPixmapNodes.end(); it++) {
(*it)->Debug();
}
}

View File

@ -91,24 +91,28 @@ protected:
int containerY;
int containerWidth;
int containerHeight;
vector<cTemplatePixmap*> viewPixmaps;
vector<cTemplatePixmap*>::iterator pixIterator;
vector<cTemplatePixmapNode*> viewPixmapNodes;
vector<cTemplatePixmapNode*>::iterator pixmapNodeIterator;
cTemplatePixmap *pixmapIterator;
cTemplatePixmapContainer *currentNode;
int pixOffset;
public:
cTemplateViewElement(void);
virtual ~cTemplateViewElement(void);
void SetContainer(int x, int y, int width, int height);
virtual void SetGlobals(cGlobals *globals);
void SetParameters(vector<pair<string, string> > &params);
bool CalculateParameters(void);
virtual bool CalculatePixmapParameters(void);
bool CalculatePixmapParametersList(int orientation, int numElements);
void AddPixmap(cTemplatePixmapNode *pix) { viewPixmapNodes.push_back(pix); };
int GetNumericParameter(eParamType type);
void AddPixmap(cTemplatePixmap *pix) { viewPixmaps.push_back(pix); };
virtual void SetGlobals(cGlobals *globals);
void SetContainer(int x, int y, int width, int height);
void SetPixOffset(int offset) { pixOffset = offset; };
int GetPixOffset(void) { return pixOffset; };
virtual int GetNumPixmaps(void) { return viewPixmaps.size(); };
void InitIterator(void);
virtual int GetNumPixmaps(void);
void InitPixmapNodeIterator(void);
cTemplatePixmapNode *GetNextPixmapNode(void);
void InitPixmapIterator(void);
cTemplatePixmap *GetNextPixmap(void);
cTemplateFunction *GetFunction(string name);
bool Execute(void);

View File

@ -15,7 +15,7 @@ bool cTemplateViewGrid::CalculatePixmapParameters(void) {
int gridWidth = parameters->GetNumericParameter(ptWidth);
int gridHeight = parameters->GetNumericParameter(ptHeight);
for (vector<cTemplatePixmap*>::iterator pix = viewPixmaps.begin(); pix != viewPixmaps.end(); pix++) {
for (vector<cTemplatePixmapNode*>::iterator pix = viewPixmapNodes.begin(); pix != viewPixmapNodes.end(); pix++) {
(*pix)->SetContainer(gridX, gridY, gridWidth, gridHeight);
(*pix)->SetGlobals(globals);
paramsValid = paramsValid && (*pix)->CalculateParameters();

File diff suppressed because it is too large Load Diff

View File

@ -8,11 +8,8 @@
#include <vector>
#include <map>
#include <set>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlerror.h>
#include <vdr/plugin.h>
#include "../libcore/libxmlwrapper.h"
#include "templateview.h"
#include "templateviewlist.h"
#include "templateviewgrid.h"
@ -23,45 +20,49 @@ using namespace std;
// --- cXmlParser -------------------------------------------------------------
class cXmlParser {
class cXmlParser : public cLibXMLWrapper {
private:
cTemplateView *view;
cGlobals *globals;
cSkinSetup *skinSetup;
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNodePtr root;
string GetPath(string xmlFile);
void ParseSetupMenu(xmlNodePtr node);
void ParseSetupParameter(xmlNodePtr node);
void ParseGlobalColors(xmlNodePtr node);
//parsing views
bool ParseSubView(void);
void ParseViewElement(cTemplateView *subView = NULL);
void ParseViewList(cTemplateView *subView = NULL);
void ParseViewTab(cTemplateView *subView);
void ParseGrid(void);
cTemplatePixmap *ParseArea(void);
cTemplatePixmapContainer *ParseAreaContainer(void);
void ParseFunctionCalls(cTemplatePixmap *pix);
void ParseLoopFunctionCalls(cTemplateLoopFunction *loopFunc);
//parsing globals
void ParseGlobalColors(void);
void InsertColor(string name, string value);
void ParseGlobalVariables(xmlNodePtr node);
void ParseGlobalVariables(void);
void InsertVariable(string name, string type, string value);
void ParseGlobalFonts(xmlNodePtr node);
void ParseTranslations(xmlNodePtr node);
bool ParseSubView(xmlNodePtr node);
void ParseViewElement(const xmlChar * viewElement, xmlNodePtr node, vector<pair<string, string> > &attributes, cTemplateView *subView = NULL);
void ParseViewList(xmlNodePtr parentNode, cTemplateView *subView = NULL);
void ParseViewTab(xmlNodePtr parentNode, cTemplateView *subView);
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 isViewElement = false);
void ParseGlobalFonts(void);
void ParseTranslations(void);
//parsing skin setup
void ParseSetupMenu(void);
void ParseSetupParameter(void);
//helpers
void ValidateAttributes(const char *nodeName, vector<stringpair> &attributes);
string GetPath(string xmlFile);
public:
cXmlParser(void);
virtual ~cXmlParser(void);
//reading views
bool ReadView(cTemplateView *view, string xmlFile);
bool ReadPluginView(string plugName, int templateNumber, string templateName);
bool ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory);
bool ReadSkinSetup(cSkinSetup *skinSetup, string xmlFile);
bool ParseView(void);
//reading plugin views
bool ReadPluginView(string plugName, int templateNumber, string templateName);
bool ParsePluginView(string plugName, int templateNumber);
//reading globals
bool ReadGlobals(cGlobals *globals, string xmlFile);
bool ParseGlobals(void);
//reading skin setups
bool ReadSkinSetup(cSkinSetup *skinSetup, string xmlFile);
bool ParseSkinSetup(string skin);
void DeleteDocument(void);
static void InitLibXML();
static void CleanupLibXML();
};
#endif //__XMLPARSER_H

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE displaychannel SYSTEM "../../../dtd/displaychannel.dtd">
<displaychannel x="0" y="0" width="100%" height="100%" fadetime="{fadetime}" shifttime="{shifttimechannel}" shifttype="bottom" shiftmode="slowed">
<displaychannel x="0" y="0" width="100%" height="100%" fadetime="{fadetime}" shifttime="0" shifttype="bottom" shiftmode="slowed">
<background>
<!-- background infobar -->
<area x="0" y="80%" width="100%" height="20%" layer="1">

View File

@ -1,5 +1,5 @@
<menudefault x="0" y="0" width="100%" height="100%" fadetime="0">
<background>
<menudefault x="0" y="0" width="100%" height="100%" fadetime="0">
<background>
<!-- background Menu -->
<area x="0" y="0" width="100%" height="100%" layer="1">
<fill color="{clrTransBlack}" />

View File

@ -61,64 +61,72 @@
<fill condition="{separator}" color="{clrSemiTransBlack}" />
</area>
<!-- WHATSON -->
<areascroll condition="not{separator}++{whatson}++not{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="58%" layer="3">
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<areascroll condition="not{separator}++{whatson}++{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="48%" layer="3">
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<area condition="not{separator}++{whatson}" x="1%" width="58%" layer="3">
<drawimage condition="{timerfull}" imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
<drawimage condition="{timerpartitial}" imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 10" y="{areaheight}/3" width="{areawidth}*0.15" height="{areaheight}/3" color="{clrWhite}" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 8" y="{areaheight}/3 + 2" width="{areawidth}*0.15 - 4" height="{areaheight}/3 - 4" color="{clrTransparent}" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 6" y="{areaheight}/3 + 4" width="{areawidth}*0.15 * {elapsed} / {duration} - 8" height="{areaheight}/3 - 8" color="{clrWhite}" />
</area>
<areacontainer x="1%" width="58%" condition="not{separator}++{whatson}">
<areascroll condition="not{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" layer="3">
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<areascroll condition="{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" width="48%" layer="3">
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<area layer="3">
<drawimage condition="{timerfull}" imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
<drawimage condition="{timerpartitial}" imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 10" y="{areaheight}/3" width="{areawidth}*0.15" height="{areaheight}/3" color="{clrWhite}" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 8" y="{areaheight}/3 + 2" width="{areawidth}*0.15 - 4" height="{areaheight}/3 - 4" color="{clrTransparent}" />
<drawrectangle condition="{running}" x="{areawidth}*0.85 - 6" y="{areaheight}/3 + 4" width="{areawidth}*0.15 * {elapsed} / {duration} - 8" height="{areaheight}/3 - 8" color="{clrWhite}" />
</area>
</areacontainer>
<!-- WHATSONNOW -->
<area condition="not{separator}++{whatsonnow}" x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="not{separator}++{whatsonnow}++{running}" x="8%" width="7%" layer="3">
<drawrectangle condition="{current}" x="0" y="{areaheight}/3" width="{areawidth}" height="{areaheight}/3" color="{clrWhite}" />
<drawrectangle condition="not{current}" x="0" y="{areaheight}/3" width="{areawidth}" height="{areaheight}/3" color="{clrTransBlueLight}" />
<drawrectangle x="2" y="{areaheight}/3 + 2" width="{areawidth} - 4" height="{areaheight}/3 - 4" color="{clrTransparent}" />
<drawrectangle x="4" y="{areaheight}/3 + 4" width="{areawidth} * {elapsed} / {duration} - 8" height="{areaheight}/3 - 8" color="{clrWhite}" />
</area>
<area condition="not{separator}++{whatsonnow}++{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="not{separator}++{whatsonnow}++{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll condition="not{separator}++{whatsonnow}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="15%" width="44%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<areacontainer condition="not{separator}++{whatsonnow}">
<area x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="{running}" x="8%" width="7%" layer="3">
<drawrectangle condition="{current}" x="0" y="{areaheight}/3" width="{areawidth}" height="{areaheight}/3" color="{clrWhite}" />
<drawrectangle condition="not{current}" x="0" y="{areaheight}/3" width="{areawidth}" height="{areaheight}/3" color="{clrTransBlueLight}" />
<drawrectangle x="2" y="{areaheight}/3 + 2" width="{areawidth} - 4" height="{areaheight}/3 - 4" color="{clrTransparent}" />
<drawrectangle x="4" y="{areaheight}/3 + 4" width="{areawidth} * {elapsed} / {duration} - 8" height="{areaheight}/3 - 8" color="{clrWhite}" />
</area>
<area condition="{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="15%" width="44%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
</areacontainer>
<!-- WHATSONNEXT -->
<area condition="not{separator}++{whatsonnext}" x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="not{separator}++{whatsonnext}++{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="not{separator}++{whatsonnext}++{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll condition="not{separator}++{whatsonnext}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<areacontainer condition="not{separator}++{whatsonnext}">
<area x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
</areacontainer>
<!-- WHATSONFAVORITES -->
<area condition="not{separator}++{whatsonfavorites}" x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="not{separator}++{whatsonfavorites}++{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="not{separator}++{whatsonfavorites}++{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll condition="not{separator}++{whatsonfavorites}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
<areacontainer condition="not{separator}++{whatsonfavorites}">
<area x="1%" width="6%" layer="3">
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
</area>
<area condition="{timerfull}" x="53%" width="6%" layer="4">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
</area>
<area condition="{timerpartitial}" x="53%" width="6%" layer="5">
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
</area>
<areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
</areascroll>
</areacontainer>
<!-- Separator -->
<area condition="{separator}" x="0" width="68%" layer="3">
<drawtext x="20" valign="center" font="{light}" fontsize="95%" color="{clrBlueLight}" text="{title}" />
@ -177,28 +185,30 @@
<drawtextbox condition="{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" float="topleft" floatwidth="{width(poster)} + 10" floatheight="{height(poster)} + 20" font="{light}" fontsize="{areaheight}/20" color="{clrWhite}" text="{description}" />
<drawtextbox condition="not{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" font="{light}" fontsize="{areaheight}/20" color="{clrWhite}" text="{description}" />
</area>
<area condition="{whatsonnow}||{whatsonnext}" x="63%" y="0" width="36%" height="85%" layer="2">
<!-- title -->
<drawtext align="center" y="0" font="{semibold}" width="{areawidth}-20" fontsize="10%" color="{clrWhite}" text="{title}" />
<!-- progress bar if event is running -->
<drawtext condition="{running}" name="start" x="{areawidth}/4 - {width(start)}" y="{areaheight}/16 + 15" font="{light}" fontsize="{areaheight}/15" color="{clrWhite}" text="{start}" />
<drawtext condition="{running}" name="stop" x="{areawidth}*3/4" y="{areaheight}/16 + 15" font="{light}" fontsize="{areaheight}/15" color="{clrWhite}" text="{stop}" />
<drawrectangle condition="{running}" x="{areawidth}/4+10" y="{areaheight}/16 + 15 + {areaheight}/30" width="{areawidth}/2 - 20" height="1" color="{clrWhite}" />
<drawrectangle condition="{running}" x="{areawidth}/4+10" y="{areaheight}/16 + 15 + {areaheight}/30 -2" width="{areawidth}/2 * {elapsed} / {duration} - 20 * {elapsed} / {duration}" height="5" color="{clrWhite}" />
<!-- start and stop if event is not running -->
<drawtext condition="not{running}" x="10" y="{areaheight}/18 + 15" font="{light}" fontsize="{areaheight}/20" color="{clrWhite}" text="{start} - {stop} ({duration} min)" />
<!-- scraper poster -->
<drawimage condition="{hasposter}" name="poster" imagetype="image" path="{posterpath}" x="10" y="{posy(start)} + {height(start)} + 10" width="{areawidth}/3" height="{areawidth}/3 * {posterheight} / {posterwidth}"/>
<!-- description -->
<drawtextbox condition="{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" float="topleft" floatwidth="{width(poster)} + 10" floatheight="{height(poster)} + 10" font="{light}" fontsize="{areaheight}/18" color="{clrWhite}" text="{description}" />
<drawtextbox condition="not{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" font="{light}" fontsize="{areaheight}/18" color="{clrWhite}" text="{description}" />
</area>
<areascroll condition="{whatsonnow}||{whatsonnext}" mode="forthandback" orientation="vertical" delay="1000" scrollspeed="medium" x="63%" y="85%" width="36%" height="15%" layer="2">
<drawtext x="10" y="0" font="{semibold}" fontsize="30%" color="{clrWhite}" text="Next Schedules:" />
<loop name="schedule" x="0" y="{areaheight}/4 + 5" orientation="vertical">
<drawtext x="10" font="{light}" width="{areawidth}-20" fontsize="30%" color="{clrWhite}" text="{schedule[start]} {schedule[title]}" />
</loop>
</areascroll>
<areacontainer condition="{whatsonnow}||{whatsonnext}">
<area x="63%" y="0" width="36%" height="85%" layer="2">
<!-- title -->
<drawtext align="center" y="0" font="{semibold}" width="{areawidth}-20" fontsize="10%" color="{clrWhite}" text="{title}" />
<!-- progress bar if event is running -->
<drawtext condition="{running}" name="start" x="{areawidth}/4 - {width(start)}" y="{areaheight}/16 + 15" font="{light}" fontsize="{areaheight}/15" color="{clrWhite}" text="{start}" />
<drawtext condition="{running}" name="stop" x="{areawidth}*3/4" y="{areaheight}/16 + 15" font="{light}" fontsize="{areaheight}/15" color="{clrWhite}" text="{stop}" />
<drawrectangle condition="{running}" x="{areawidth}/4+10" y="{areaheight}/16 + 15 + {areaheight}/30" width="{areawidth}/2 - 20" height="1" color="{clrWhite}" />
<drawrectangle condition="{running}" x="{areawidth}/4+10" y="{areaheight}/16 + 15 + {areaheight}/30 -2" width="{areawidth}/2 * {elapsed} / {duration} - 20 * {elapsed} / {duration}" height="5" color="{clrWhite}" />
<!-- start and stop if event is not running -->
<drawtext condition="not{running}" x="10" y="{areaheight}/18 + 15" font="{light}" fontsize="{areaheight}/20" color="{clrWhite}" text="{start} - {stop} ({duration} min)" />
<!-- scraper poster -->
<drawimage condition="{hasposter}" name="poster" imagetype="image" path="{posterpath}" x="10" y="{posy(start)} + {height(start)} + 10" width="{areawidth}/3" height="{areawidth}/3 * {posterheight} / {posterwidth}"/>
<!-- description -->
<drawtextbox condition="{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" float="topleft" floatwidth="{width(poster)} + 10" floatheight="{height(poster)} + 10" font="{light}" fontsize="{areaheight}/18" color="{clrWhite}" text="{description}" />
<drawtextbox condition="not{hasposter}" x="10" y="{posy(poster)}" width="99%" height="{areaheight} - {posy(poster)}" font="{light}" fontsize="{areaheight}/18" color="{clrWhite}" text="{description}" />
</area>
<areascroll mode="forthandback" orientation="vertical" delay="1000" scrollspeed="medium" x="63%" y="85%" width="36%" height="15%" layer="2">
<drawtext x="10" y="0" font="{semibold}" fontsize="30%" color="{clrWhite}" text="Next Schedules:" />
<loop name="schedule" x="0" y="{areaheight}/4 + 5" orientation="vertical">
<drawtext x="10" font="{light}" width="{areawidth}-20" fontsize="30%" color="{clrWhite}" text="{schedule[start]} {schedule[title]}" />
</loop>
</areascroll>
</areacontainer>
</currentelement>
</menuitems>
<!-- Available Variables scrollbar:

View File

@ -78,18 +78,20 @@
{textyes} text to display on yes button
{textno} text to display on no button
-->
<area condition="{buttonyesno}" layer="5">
<drawrectangle condition="not{current}" x="2%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="not{current}" x="52%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++{yes}" x="2%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
<drawrectangle condition="{current}++{yes}" x="52%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++not{yes}" x="2%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++not{yes}" x="52%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
</area>
<area condition="{buttonyesno}" layer="6">
<drawtext name="yestext" x="{areawidth}/4 - {width(yestext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textyes}" />
<drawtext name="notext" x="3*{areawidth}/4 - {width(notext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textno}" />
</area>
<areacontainer condition="{buttonyesno}">
<area layer="5">
<drawrectangle condition="not{current}" x="2%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="not{current}" x="52%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++{yes}" x="2%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
<drawrectangle condition="{current}++{yes}" x="52%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++not{yes}" x="2%" y="5%" width="46%" height="90%" color="{clrDarkGray}"/>
<drawrectangle condition="{current}++not{yes}" x="52%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
</area>
<area layer="6">
<drawtext name="yestext" x="{areawidth}/4 - {width(yestext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textyes}" />
<drawtext name="notext" x="3*{areawidth}/4 - {width(notext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textno}" />
</area>
</areacontainer>
<!-- Int Selector
{intselector} true
{text} title of selector
@ -126,14 +128,16 @@
{text} title of selector
{value} current value of selector, string
-->
<area condition="{textinput}" layer="6">
<drawtext x="1%" y="10%" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
<drawrectangle condition="not{editmode}" x="1%" y="55%" width="98%" height="40%" color="{clrWhite}"/>
<drawrectangle condition="{editmode}" x="1%" y="55%" width="98%" height="40%" color="{clrRed}"/>
</area>
<area condition="{textinput}" layer="7">
<drawtext align="right" y="55%" font="{light}" fontsize="40%" color="{clrBlack}" text="{value} " />
</area>
<areacontainer condition="{textinput}">
<area layer="6">
<drawtext x="1%" y="10%" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
<drawrectangle condition="not{editmode}" x="1%" y="55%" width="98%" height="40%" color="{clrWhite}"/>
<drawrectangle condition="{editmode}" x="1%" y="55%" width="98%" height="40%" color="{clrRed}"/>
</area>
<area layer="7">
<drawtext align="right" y="55%" font="{light}" fontsize="40%" color="{clrBlack}" text="{value} " />
</area>
</areacontainer>
<!-- Time Selector
{timeselector} true
{text} title of selector
@ -174,49 +178,51 @@
{day0abbr} ... {day6abbr} localized one character abbrevation for weekdays from Monday to Sunday
{day0set} ... {day6set} true if according weekday from Monday to Sunday is set
-->
<area condition="{weekdayselector}" layer="6">
<drawtext x="1%" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{text}" />
<areacontainer condition="{weekdayselector}">
<area layer="6">
<drawtext x="1%" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{text}" />
<drawrectangle x="{areawidth} - {areaheight}*4" y="25%" width="{areaheight}*3.5" height="50%" color="{clrWhite}" />
<drawrectangle x="{areawidth} - {areaheight}*4" y="25%" width="{areaheight}*3.5" height="50%" color="{clrWhite}" />
<drawrectangle condition="not{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
<drawrectangle condition="not{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
</area>
<area condition="{weekdayselector}" layer="7">
<drawrectangle condition="{current}++eq({dayselected}, 0)" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 1)" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 2)" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 3)" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 4)" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 5)" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 6)" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="not{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrDarkGray}" />
<drawrectangle condition="{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlueLight}" />
</area>
<area layer="7">
<drawrectangle condition="{current}++eq({dayselected}, 0)" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 1)" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 2)" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 3)" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 4)" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 5)" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawrectangle condition="{current}++eq({dayselected}, 6)" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
<drawtext name="day0" x="{areawidth} - {areaheight}*4.0 + {areaheight}/4 - {width(day0)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day0abbr}" />
<drawtext name="day1" x="{areawidth} - {areaheight}*3.5 + {areaheight}/4 - {width(day1)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day1abbr}" />
<drawtext name="day2" x="{areawidth} - {areaheight}*3.0 + {areaheight}/4 - {width(day2)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day2abbr}" />
<drawtext name="day3" x="{areawidth} - {areaheight}*2.5 + {areaheight}/4 - {width(day3)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day3abbr}" />
<drawtext name="day4" x="{areawidth} - {areaheight}*2.0 + {areaheight}/4 - {width(day4)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day4abbr}" />
<drawtext name="day5" x="{areawidth} - {areaheight}*1.5 + {areaheight}/4 - {width(day5)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day5abbr}" />
<drawtext name="day6" x="{areawidth} - {areaheight}*1.0 + {areaheight}/4 - {width(day6)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day6abbr}" />
</area>
<drawtext name="day0" x="{areawidth} - {areaheight}*4.0 + {areaheight}/4 - {width(day0)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day0abbr}" />
<drawtext name="day1" x="{areawidth} - {areaheight}*3.5 + {areaheight}/4 - {width(day1)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day1abbr}" />
<drawtext name="day2" x="{areawidth} - {areaheight}*3.0 + {areaheight}/4 - {width(day2)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day2abbr}" />
<drawtext name="day3" x="{areawidth} - {areaheight}*2.5 + {areaheight}/4 - {width(day3)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day3abbr}" />
<drawtext name="day4" x="{areawidth} - {areaheight}*2.0 + {areaheight}/4 - {width(day4)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day4abbr}" />
<drawtext name="day5" x="{areawidth} - {areaheight}*1.5 + {areaheight}/4 - {width(day5)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day5abbr}" />
<drawtext name="day6" x="{areawidth} - {areaheight}*1.0 + {areaheight}/4 - {width(day6)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day6abbr}" />
</area>
</areacontainer>
<!-- Directory Selector
{directoryselector} true
{text} title of selector
@ -238,17 +244,19 @@
{overlapstartpercent} start of overlap in percent of total conflict time width
{overlapwidthpercent} width of overlap in percent of total conflict time width
-->
<area condition="{timerconflictheader}" layer="5">
<drawtext name="title" x="{areawidth}*0.7*0.5 - {width(title)}/2" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{text}" />
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
</area>
<area condition="{timerconflictheader}" layer="6">
<drawtext x="{areawidth}*0.7" y="0" font="{light}" fontsize="50%" color="{clrBlack}" text="{conflictstart}" />
<drawtext align="right" y="0" font="{light}" fontsize="50%" color="{clrBlack}" text="{conflictstop}" />
<drawtext name="olstart" x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 - 70" y="50%" font="{light}" fontsize="50%" color="{clrRed}" text="{overlapstart}" />
<drawtext x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 + {overlapwidthpercent}*{areawidth}*0.3/100 + 5" y="50%" font="{light}" fontsize="50%" color="{clrRed}" text="{overlapstop}" />
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="50%" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="50%" color="{clrRedTrans}"/>
</area>
<areacontainer condition="{timerconflictheader}">
<area layer="5">
<drawtext name="title" x="{areawidth}*0.7*0.5 - {width(title)}/2" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{text}" />
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
</area>
<area layer="6">
<drawtext x="{areawidth}*0.7" y="0" font="{light}" fontsize="50%" color="{clrBlack}" text="{conflictstart}" />
<drawtext align="right" y="0" font="{light}" fontsize="50%" color="{clrBlack}" text="{conflictstop}" />
<drawtext name="olstart" x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 - 70" y="50%" font="{light}" fontsize="50%" color="{clrRed}" text="{overlapstart}" />
<drawtext x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 + {overlapwidthpercent}*{areawidth}*0.3/100 + 5" y="50%" font="{light}" fontsize="50%" color="{clrRed}" text="{overlapstop}" />
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="50%" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="50%" color="{clrRedTrans}"/>
</area>
</areacontainer>
<!-- Timerconflict
{timerconflict} true
{timertitle} title of timer
@ -268,28 +276,30 @@
{overlapstartpercent} start of overlap in percent of total conflict time width
{overlapwidthpercent} width of overlap in percent of total conflict time width
-->
<area condition="{timerconflict}" layer="5">
<drawimage condition="not{current}" imagetype="skinpart" path="menubutton" x="0" y="0" width="70%" height="100%"/>
<drawimage condition="{current}" imagetype="skinpart" path="menubuttonactive" x="0" y="0" width="70%" height="100%"/>
</area>
<area condition="{timerconflict}" layer="6">
<drawimage condition="{current}++{infoactive}" imagetype="icon" path="ico_info_active" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{infoactive}" imagetype="icon" path="ico_info_inactive" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{deleteactive}" imagetype="icon" path="ico_delete_active" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{deleteactive}" imagetype="icon" path="ico_delete_inactive" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{editactive}" imagetype="icon" path="ico_edit_active" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{editactive}" imagetype="icon" path="ico_edit_inactive" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{searchactive}" imagetype="icon" path="ico_search_active" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{searchactive}" imagetype="icon" path="ico_search_inactive" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawtext x="{areaheight}*2.3" width="{areawidth}*0.7 - {areaheight}*2.4" y="0" font="{regular}" fontsize="40%" color="{clrWhite}" text="{timertitle}" />
<drawtext x="{areaheight}*2.3" y="40%" font="{light}" fontsize="30%" color="{clrWhite}" text="{weekday} {date} {starttime} - {stoptime}" />
<drawtext x="{areaheight}*2.3" y="70%" font="{light}" fontsize="30%" color="{clrWhite}" text="{channelname}, Transp. {transponder}" />
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.7 + {timerstartpercent}*{areawidth}*0.3/100" y="30%" width="{timerwidthpercent}*{areawidth}*0.3/100" height="40%" color="{clrBlack}"/>
</area>
<area condition="{timerconflict}" layer="7">
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="0" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="100%" color="{clrRedTrans}"/>
</area>
<areacontainer condition="{timerconflict}">
<area layer="5">
<drawimage condition="not{current}" imagetype="skinpart" path="menubutton" x="0" y="0" width="70%" height="100%"/>
<drawimage condition="{current}" imagetype="skinpart" path="menubuttonactive" x="0" y="0" width="70%" height="100%"/>
</area>
<area layer="6">
<drawimage condition="{current}++{infoactive}" imagetype="icon" path="ico_info_active" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{infoactive}" imagetype="icon" path="ico_info_inactive" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{deleteactive}" imagetype="icon" path="ico_delete_active" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{deleteactive}" imagetype="icon" path="ico_delete_inactive" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{editactive}" imagetype="icon" path="ico_edit_active" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{editactive}" imagetype="icon" path="ico_edit_inactive" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="{current}++{searchactive}" imagetype="icon" path="ico_search_active" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawimage condition="not{current}||not{searchactive}" imagetype="icon" path="ico_search_inactive" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
<drawtext x="{areaheight}*2.3" width="{areawidth}*0.7 - {areaheight}*2.4" y="0" font="{regular}" fontsize="40%" color="{clrWhite}" text="{timertitle}" />
<drawtext x="{areaheight}*2.3" y="40%" font="{light}" fontsize="30%" color="{clrWhite}" text="{weekday} {date} {starttime} - {stoptime}" />
<drawtext x="{areaheight}*2.3" y="70%" font="{light}" fontsize="30%" color="{clrWhite}" text="{channelname}, Transp. {transponder}" />
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.7 + {timerstartpercent}*{areawidth}*0.3/100" y="30%" width="{timerwidthpercent}*{areawidth}*0.3/100" height="40%" color="{clrBlack}"/>
</area>
<area layer="7">
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="0" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="100%" color="{clrRedTrans}"/>
</area>
</areacontainer>
<!-- Event
{event} true
{title} title of event
@ -367,78 +377,82 @@
{eventstart} start time of according event
{eventstop} end time of according event
-->
<area condition="{timelineheader}" layer="5">
<drawtext align="center" y="1%" font="{regular}" fontsize="35%" color="{clrWhite}" text="Timer for {date}" />
<drawrectangle x="{areawidth}*0.05" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.0875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.1625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.2" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.2375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.275" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.3125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.35" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.3875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.425" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.4625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.5" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.5375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.575" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.6125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.65" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.6875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.725" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.7625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.8" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.8375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.9125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
</area>
<area condition="{timelineheader}" layer="6">
<drawtext name="text0" x="{areawidth}*0.05 + {areawidth}*0.0375/2 - {width(text0)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="0"/>
<drawtext name="text1" x="{areawidth}*0.0875 + {areawidth}*0.0375/2 - {width(text1)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="1"/>
<drawtext name="text2" x="{areawidth}*0.125 + {areawidth}*0.0375/2 - {width(text2)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="2"/>
<drawtext name="text3" x="{areawidth}*0.1625 + {areawidth}*0.0375/2 - {width(text3)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="3"/>
<drawtext name="text4" x="{areawidth}*0.2 + {areawidth}*0.0375/2 - {width(text4)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="4"/>
<drawtext name="text5" x="{areawidth}*0.2375 + {areawidth}*0.0375/2 - {width(text5)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="5"/>
<drawtext name="text6" x="{areawidth}*0.275 + {areawidth}*0.0375/2 - {width(text6)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="6"/>
<drawtext name="text7" x="{areawidth}*0.3125 + {areawidth}*0.0375/2 - {width(text7)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="7"/>
<drawtext name="text8" x="{areawidth}*0.35 + {areawidth}*0.0375/2 - {width(text8)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="8"/>
<drawtext name="text9" x="{areawidth}*0.3875 + {areawidth}*0.0375/2 - {width(text9)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="9"/>
<drawtext name="text10" x="{areawidth}*0.425 + {areawidth}*0.0375/2 - {width(text10)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="10"/>
<drawtext name="text11" x="{areawidth}*0.4625 + {areawidth}*0.0375/2 - {width(text11)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="11"/>
<drawtext name="text12" x="{areawidth}*0.5 + {areawidth}*0.0375/2 - {width(text12)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="12"/>
<drawtext name="text13" x="{areawidth}*0.5375 + {areawidth}*0.0375/2 - {width(text13)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="13"/>
<drawtext name="text14" x="{areawidth}*0.575 + {areawidth}*0.0375/2 - {width(text14)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="14"/>
<drawtext name="text15" x="{areawidth}*0.6125 + {areawidth}*0.0375/2 - {width(text15)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="15"/>
<drawtext name="text16" x="{areawidth}*0.65 + {areawidth}*0.0375/2 - {width(text16)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="16"/>
<drawtext name="text17" x="{areawidth}*0.6875 + {areawidth}*0.0375/2 - {width(text17)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="17"/>
<drawtext name="text18" x="{areawidth}*0.725 + {areawidth}*0.0375/2 - {width(text18)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="18"/>
<drawtext name="text19" x="{areawidth}*0.7625 + {areawidth}*0.0375/2 - {width(text19)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="19"/>
<drawtext name="text20" x="{areawidth}*0.8 + {areawidth}*0.0375/2 - {width(text20)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="20"/>
<drawtext name="text21" x="{areawidth}*0.8375 + {areawidth}*0.0375/2 - {width(text21)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="21"/>
<drawtext name="text22" x="{areawidth}*0.875 + {areawidth}*0.0375/2 - {width(text22)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="22"/>
<drawtext name="text23" x="{areawidth}*0.9125 + {areawidth}*0.0375/2 - {width(text23)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="23"/>
</area>
<area condition="{timelineheader}++{timerset}" layer="6">
<drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="1%" y="30%" width="{areaheight}*0.5" height="{areaheight}*0.5" />
<drawtext condition="not{channellogoexisis}" x="1%" width="{areaheight}*0.7" y="40%" font="{light}" fontsize="20%" color="{clrWhite}" text="{channelname}"/>
<drawtext x="{areaheight}*0.8" y="36%" font="{light}" fontsize="25%" color="{clrWhite}" text="{eventstart} - {eventstop} (Rec. {timerstart} - {timerstop}), Transp. {channeltransponder}"/>
<drawtext x="{areaheight}*0.8" y="57%" width="{areawidth}-{areaheight}" font="{light}" fontsize="25%" color="{clrWhite}" text="{eventtitle} - {eventshorttext}"/>
</area>
<areacontainer condition="{timelineheader}">
<area layer="5">
<drawtext align="center" y="1%" font="{regular}" fontsize="35%" color="{clrWhite}" text="Timer for {date}" />
<drawrectangle x="{areawidth}*0.05" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.0875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.1625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.2" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.2375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.275" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.3125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.35" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.3875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.425" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.4625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.5" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.5375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.575" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.6125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.65" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.6875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.725" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.7625" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.8" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.8375" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
<drawrectangle x="{areawidth}*0.875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
<drawrectangle x="{areawidth}*0.9125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
</area>
<area layer="6">
<drawtext name="text0" x="{areawidth}*0.05 + {areawidth}*0.0375/2 - {width(text0)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="0"/>
<drawtext name="text1" x="{areawidth}*0.0875 + {areawidth}*0.0375/2 - {width(text1)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="1"/>
<drawtext name="text2" x="{areawidth}*0.125 + {areawidth}*0.0375/2 - {width(text2)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="2"/>
<drawtext name="text3" x="{areawidth}*0.1625 + {areawidth}*0.0375/2 - {width(text3)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="3"/>
<drawtext name="text4" x="{areawidth}*0.2 + {areawidth}*0.0375/2 - {width(text4)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="4"/>
<drawtext name="text5" x="{areawidth}*0.2375 + {areawidth}*0.0375/2 - {width(text5)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="5"/>
<drawtext name="text6" x="{areawidth}*0.275 + {areawidth}*0.0375/2 - {width(text6)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="6"/>
<drawtext name="text7" x="{areawidth}*0.3125 + {areawidth}*0.0375/2 - {width(text7)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="7"/>
<drawtext name="text8" x="{areawidth}*0.35 + {areawidth}*0.0375/2 - {width(text8)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="8"/>
<drawtext name="text9" x="{areawidth}*0.3875 + {areawidth}*0.0375/2 - {width(text9)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="9"/>
<drawtext name="text10" x="{areawidth}*0.425 + {areawidth}*0.0375/2 - {width(text10)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="10"/>
<drawtext name="text11" x="{areawidth}*0.4625 + {areawidth}*0.0375/2 - {width(text11)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="11"/>
<drawtext name="text12" x="{areawidth}*0.5 + {areawidth}*0.0375/2 - {width(text12)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="12"/>
<drawtext name="text13" x="{areawidth}*0.5375 + {areawidth}*0.0375/2 - {width(text13)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="13"/>
<drawtext name="text14" x="{areawidth}*0.575 + {areawidth}*0.0375/2 - {width(text14)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="14"/>
<drawtext name="text15" x="{areawidth}*0.6125 + {areawidth}*0.0375/2 - {width(text15)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="15"/>
<drawtext name="text16" x="{areawidth}*0.65 + {areawidth}*0.0375/2 - {width(text16)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="16"/>
<drawtext name="text17" x="{areawidth}*0.6875 + {areawidth}*0.0375/2 - {width(text17)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="17"/>
<drawtext name="text18" x="{areawidth}*0.725 + {areawidth}*0.0375/2 - {width(text18)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="18"/>
<drawtext name="text19" x="{areawidth}*0.7625 + {areawidth}*0.0375/2 - {width(text19)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="19"/>
<drawtext name="text20" x="{areawidth}*0.8 + {areawidth}*0.0375/2 - {width(text20)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="20"/>
<drawtext name="text21" x="{areawidth}*0.8375 + {areawidth}*0.0375/2 - {width(text21)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="21"/>
<drawtext name="text22" x="{areawidth}*0.875 + {areawidth}*0.0375/2 - {width(text22)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="22"/>
<drawtext name="text23" x="{areawidth}*0.9125 + {areawidth}*0.0375/2 - {width(text23)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrBlack}" text="23"/>
</area>
<area condition="{timerset}" layer="6">
<drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="1%" y="30%" width="{areaheight}*0.5" height="{areaheight}*0.5" />
<drawtext condition="not{channellogoexisis}" x="1%" width="{areaheight}*0.7" y="40%" font="{light}" fontsize="20%" color="{clrWhite}" text="{channelname}"/>
<drawtext x="{areaheight}*0.8" y="36%" font="{light}" fontsize="25%" color="{clrWhite}" text="{eventstart} - {eventstop} (Rec. {timerstart} - {timerstop}), Transp. {channeltransponder}"/>
<drawtext x="{areaheight}*0.8" y="57%" width="{areawidth}-{areaheight}" font="{light}" fontsize="25%" color="{clrWhite}" text="{eventtitle} - {eventshorttext}"/>
</area>
</areacontainer>
<!-- Timeline Timer
{timelinetimer} true
{timerstart} start of timer in tenth percent of complete 24h width
{timerwidth} width of timer in tenth percent of complete 24h width
-->
<area condition="{timelinetimer}" layer="5">
<drawrectangle condition="{current}" x="5%" y="0" width="90%" height="100%" color="{clrTransBlueLight}"/>
<drawrectangle condition="not{current}" x="5%" y="0" width="90%" height="100%" color="{clrDarkGray}"/>
<drawrectangle x="5%" y="{areaheight}-1" width="90%" height="1" color="{clrBlack}"/>
</area>
<area condition="{timelinetimer}" layer="6">
<drawrectangle x="{areawidth}*0.05 + {timerstart}*{areawidth}*0.9/1000" y="25%" width="{timerwidth}*{areawidth}*0.9/1000" height="50%" color="{clrBlack}"/>
</area>
<areacontainer condition="{timelinetimer}">
<area layer="5">
<drawrectangle condition="{current}" x="5%" y="0" width="90%" height="100%" color="{clrTransBlueLight}"/>
<drawrectangle condition="not{current}" x="5%" y="0" width="90%" height="100%" color="{clrDarkGray}"/>
<drawrectangle x="5%" y="{areaheight}-1" width="90%" height="1" color="{clrBlack}"/>
</area>
<area layer="6">
<drawrectangle x="{areawidth}*0.05 + {timerstart}*{areawidth}*0.9/1000" y="25%" width="{timerwidth}*{areawidth}*0.9/1000" height="50%" color="{clrBlack}"/>
</area>
</areacontainer>
<!-- Favorites
{favorite} true
{favdesc} description of favorite

View File

@ -130,70 +130,93 @@ void cView::DrawViewElement(eViewElement ve, map <string,string> *stringTokens,
int pixCurrent = viewElement->GetPixOffset();
if (pixCurrent < 0)
return;
viewElement->InitIterator();
cTemplatePixmap *pix = NULL;
while(pix = viewElement->GetNextPixmap()) {
//check if already drawn background area, this can be skipped
if (PixmapExists(pixCurrent) && pix->BackgroundArea()) {
viewElement->InitPixmapNodeIterator();
cTemplatePixmapNode *pixNode = NULL;
while(pixNode = viewElement->GetNextPixmapNode()) {
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
if (pix) {
bool draw = PreparePixmap(ve, pixCurrent, pix, stringTokens, intTokens, loopTokens);
if (draw)
DrawPixmap(pixCurrent, pix, loopTokens);
pixCurrent++;
continue;
}
//reset Template
pix->ClearDynamicParameters();
//create Pixmap if already fully parsed
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(pixCurrent, pix);
}
//check if pixmap needs dynamic parameters
if ((!pix->Ready() || !pix->DoExecute()) && !pix->Scrolling()) {
//parse dynamic parameters and initiate functions
pix->ParseDynamicParameters(stringTokens, intTokens, true);
if (pix->Ready() && pix->DoExecute()) {
CreateViewPixmap(pixCurrent, pix);
}
} else {
//parse dynamic parameters but not initiate functions
pix->ParseDynamicParameters(stringTokens, intTokens, false);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
pixCurrent++;
continue;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
pixCurrent++;
continue;
}
//parse dynamic tokens of pixmap functions
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, loopTokens);
if (!PixmapExists(pixCurrent) && pix->Scrolling()) {
cSize drawportSize;
scrolling = pix->CalculateDrawPortSize(drawportSize, loopTokens);
if (scrolling) {
CreateScrollingPixmap(pixCurrent, pix, drawportSize);
pix->SetScrollingTextWidth();
veScroll = ve;
scrollingPix = pixCurrent;
scrollOrientation = pix->GetNumericParameter(ptOrientation);
scrollMode = pix->GetNumericParameter(ptScrollMode);
scrollDelay = pix->GetNumericParameter(ptDelay);
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
} else {
CreateViewPixmap(pixCurrent, pix);
cTemplatePixmapContainer *pixContainer = dynamic_cast<cTemplatePixmapContainer*>(pixNode);
pixContainer->ParseDynamicParameters(stringTokens, intTokens);
if (pixContainer->DoDebug()) {
pixContainer->Debug();
}
if (!pixContainer->DoExecute()) {
pixCurrent += pixContainer->NumPixmaps();
continue;
}
pixContainer->InitIterator();
cTemplatePixmap *pix = NULL;
while (pix = pixContainer->GetNextPixmap()) {
bool draw = PreparePixmap(ve, pixCurrent, pix, stringTokens, intTokens, loopTokens);
if (draw)
DrawPixmap(pixCurrent, pix, loopTokens);
pixCurrent++;
}
}
if (pix->DoDebug()) {
pix->Debug();
}
DrawPixmap(pixCurrent, pix, loopTokens);
pixCurrent++;
}
}
bool cView::PreparePixmap(eViewElement ve, int num, cTemplatePixmap *pix, map <string,string> *stringTokens, map <string,int> *intTokens, map < string, vector< map< string, string > > > *loopTokens) {
//check if already drawn background area, this can be skipped
if (PixmapExists(num) && pix->BackgroundArea()) {
return false;
}
//reset Template
pix->ClearDynamicParameters();
//create Pixmap if already fully parsed
if (!PixmapExists(num) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(num, pix);
}
//check if pixmap needs dynamic parameters
if ((!pix->Ready() || !pix->DoExecute()) && !pix->Scrolling()) {
//parse dynamic parameters and initiate functions
pix->ParseDynamicParameters(stringTokens, intTokens, true);
if (pix->Ready() && pix->DoExecute()) {
CreateViewPixmap(num, pix);
}
} else {
//parse dynamic parameters but not initiate functions
pix->ParseDynamicParameters(stringTokens, intTokens, false);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
return false;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
return false;
}
//parse dynamic tokens of pixmap functions
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, loopTokens);
if (!PixmapExists(num) && pix->Scrolling()) {
cSize drawportSize;
scrolling = pix->CalculateDrawPortSize(drawportSize, loopTokens);
if (scrolling) {
CreateScrollingPixmap(num, pix, drawportSize);
pix->SetScrollingTextWidth();
veScroll = ve;
scrollingPix = num;
scrollOrientation = pix->GetNumericParameter(ptOrientation);
scrollMode = pix->GetNumericParameter(ptScrollMode);
scrollDelay = pix->GetNumericParameter(ptDelay);
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
} else {
CreateViewPixmap(num, pix);
}
}
if (pix->DoDebug()) {
pix->Debug();
}
return true;
}
void cView::ClearViewElement(eViewElement ve) {
cViewElement *detachedVE = GetViewElement(ve);
if (detachedVE) {
@ -217,7 +240,7 @@ void cView::ClearViewElement(eViewElement ve) {
if (pixCurrent < 0)
return;
cTemplatePixmap *pix = NULL;
viewElement->InitIterator();
viewElement->InitPixmapIterator();
while(pix = viewElement->GetNextPixmap()) {
if (!pix->BackgroundArea()) {
Fill(pixCurrent, clrTransparent);
@ -237,7 +260,7 @@ void cView::DestroyViewElement(eViewElement ve) {
if (pixCurrent < 0)
return;
cTemplatePixmap *pix = NULL;
viewElement->InitIterator();
viewElement->InitPixmapIterator();
while(pix = viewElement->GetNextPixmap()) {
DestroyPixmap(pixCurrent);
pixCurrent++;
@ -299,7 +322,7 @@ void cView::ActivateScrolling(void) {
int pixCurrent = scrollViewElement->GetPixOffset();
if (pixCurrent < 0)
return;
scrollViewElement->InitIterator();
scrollViewElement->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
while(pix = scrollViewElement->GetNextPixmap()) {
DrawPixmap(pixCurrent, pix);
@ -376,7 +399,7 @@ void cView::CreateScrollingPixmap(int num, cTemplatePixmap *pix, cSize &drawport
}
void cView::DrawPixmap(int num, cTemplatePixmap *pix, map < string, vector< map< string, string > > > *loopTokens, bool flushPerLoop) {
pix->InitIterator();
pix->InitFunctionIterator();
cTemplateFunction *func = NULL;
while(func = pix->GetNextFunction()) {
eFuncType type = func->GetType();
@ -1200,61 +1223,88 @@ cRect cViewListItem::DrawListItem(map <string,string> *stringTokens, map <string
DebugTokens("ListItem", stringTokens, intTokens);
}
tmplViewElement->InitIterator();
cTemplatePixmap *pix = NULL;
tmplViewElement->InitPixmapIterator();
int pixCurrent = 0;
while(pix = tmplViewElement->GetNextPixmap()) {
SetListElementPosition(pix);
if (pixCurrent == 0) {
posItem = pix->GetPixmapSize();
}
if (!PixmapExists(pixCurrent)) {
pix->ParseDynamicParameters(stringTokens, intTokens, true);
cTemplatePixmapNode *pixNode = NULL;
while(pixNode = tmplViewElement->GetNextPixmapNode()) {
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
if (pix) {
SetListElementPosition(pix);
if (pixCurrent == 0) {
posItem = pix->GetPixmapSize();
}
bool draw = PrepareListItemPixmap(pixCurrent, pix, stringTokens, intTokens);
if (draw) {
DrawPixmap(pixCurrent, pix);
}
pixCurrent++;
} else {
pix->ParseDynamicParameters(stringTokens, intTokens, false);
}
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(pixCurrent, pix);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
pixCurrent++;
continue;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
pixCurrent++;
continue;
}
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, NULL);
if (!PixmapExists(pixCurrent) && pix->Scrolling()) {
cSize drawportSize;
scrolling = pix->CalculateDrawPortSize(drawportSize);
pix->SetScrollingTextWidth();
if (scrolling) {
CreateScrollingPixmap(pixCurrent, pix, drawportSize);
scrollingPix = pixCurrent;
scrollOrientation = pix->GetNumericParameter(ptOrientation);
scrollMode = pix->GetNumericParameter(ptScrollMode);
scrollDelay = pix->GetNumericParameter(ptDelay);
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
} else {
CreateViewPixmap(pixCurrent, pix);
cTemplatePixmapContainer *pixContainer = dynamic_cast<cTemplatePixmapContainer*>(pixNode);
pixContainer->ParseDynamicParameters(stringTokens, intTokens);
if (pixContainer->DoDebug()) {
pixContainer->Debug();
}
if (!pixContainer->DoExecute()) {
pixCurrent += pixContainer->NumPixmaps();
continue;
}
pixContainer->InitIterator();
cTemplatePixmap *pix = NULL;
while (pix = pixContainer->GetNextPixmap()) {
SetListElementPosition(pix);
bool draw = PrepareListItemPixmap(pixCurrent, pix, stringTokens, intTokens);
if (draw) {
DrawPixmap(pixCurrent, pix);
}
pixCurrent++;
}
}
if (pix->DoDebug()) {
pix->Debug();
}
DrawPixmap(pixCurrent, pix);
pixCurrent++;
}
return posItem;
}
bool cViewListItem::PrepareListItemPixmap(int num, cTemplatePixmap *pix, map <string,string> *stringTokens, map <string,int> *intTokens) {
if (!PixmapExists(num)) {
pix->ParseDynamicParameters(stringTokens, intTokens, true);
} else {
pix->ParseDynamicParameters(stringTokens, intTokens, false);
}
if (!PixmapExists(num) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(num, pix);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
return false;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
return false;
}
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, NULL);
if (!PixmapExists(num) && pix->Scrolling()) {
cSize drawportSize;
scrolling = pix->CalculateDrawPortSize(drawportSize);
pix->SetScrollingTextWidth();
if (scrolling) {
CreateScrollingPixmap(num, pix, drawportSize);
scrollingPix = num;
scrollOrientation = pix->GetNumericParameter(ptOrientation);
scrollMode = pix->GetNumericParameter(ptScrollMode);
scrollDelay = pix->GetNumericParameter(ptDelay);
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
} else {
CreateViewPixmap(num, pix);
}
}
if (pix->DoDebug()) {
pix->Debug();
}
return true;
}
void cViewListItem::ClearListItem(void) {
int pixMax = NumPixmaps();
for (int pixCurrent = 0; pixCurrent < pixMax; pixCurrent++) {
@ -1352,7 +1402,7 @@ void cGrid::SetCurrent(bool current) {
void cGrid::Move(void) {
if (!tmplViewElement)
return;
tmplViewElement->InitIterator();
tmplViewElement->InitPixmapIterator();
cTemplatePixmap *pix = NULL;
int pixCurrent = 0;
@ -1374,42 +1424,73 @@ void cGrid::Draw(void) {
DebugTokens("Grid", &stringTokens, &intTokens);
}
tmplViewElement->InitIterator();
cTemplatePixmap *pix = NULL;
tmplViewElement->InitPixmapIterator();
int pixCurrent = 0;
while(pix = tmplViewElement->GetNextPixmap()) {
PositionPixmap(pix);
if (!PixmapExists(pixCurrent)) {
pix->ParseDynamicParameters(&stringTokens, &intTokens, true);
cTemplatePixmapNode *pixNode = NULL;
while(pixNode = tmplViewElement->GetNextPixmapNode()) {
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
if (pix) {
PositionPixmap(pix);
bool draw = PrepareGridPixmap(pixCurrent, pix);
if (pix->DoDebug())
pix->Debug();
if (draw) {
DrawPixmap(pixCurrent, pix);
}
pixCurrent++;
} else {
pix->ParseDynamicParameters(&stringTokens, &intTokens, false);
}
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(pixCurrent, pix);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
pixCurrent++;
continue;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
pixCurrent++;
continue;
}
cTemplatePixmapContainer *pixContainer = dynamic_cast<cTemplatePixmapContainer*>(pixNode);
pixContainer->ParseDynamicParameters(&stringTokens, &intTokens);
if (pixContainer->DoDebug()) {
pixContainer->Debug();
}
if (!pixContainer->DoExecute()) {
pixCurrent += pixContainer->NumPixmaps();
continue;
}
pixContainer->InitIterator();
cTemplatePixmap *pix = NULL;
while (pix = pixContainer->GetNextPixmap()) {
PositionPixmap(pix);
bool draw = PrepareGridPixmap(pixCurrent, pix);
if (pix->DoDebug())
pix->Debug();
if (draw) {
DrawPixmap(pixCurrent, pix);
}
pixCurrent++;
}
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(&stringTokens, &intTokens, NULL);
//pix->Debug();
DrawPixmap(pixCurrent, pix);
pixCurrent++;
}
}
dirty = false;
resized = false;
moved = false;
}
bool cGrid::PrepareGridPixmap(int num, cTemplatePixmap *pix) {
if (!PixmapExists(num)) {
pix->ParseDynamicParameters(&stringTokens, &intTokens, true);
} else {
pix->ParseDynamicParameters(&stringTokens, &intTokens, false);
}
if (!PixmapExists(num) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
CreateViewPixmap(num, pix);
}
//if pixmap still not valid, skip
if (!pix->Ready() && !pix->Scrolling()) {
return false;
}
//if condition for pixmap set, check if cond is true
if (!pix->DoExecute()) {
return false;
}
pix->ClearDynamicFunctionParameters();
pix->ParseDynamicFunctionParameters(&stringTokens, &intTokens, NULL);
return true;
}
void cGrid::Clear(void) {
int pixMax = NumPixmaps();
for (int pixCurrent = 0; pixCurrent < pixMax; pixCurrent++) {

View File

@ -56,6 +56,7 @@ protected:
int scrollSpeed;
int animCat;
void DrawViewElement(eViewElement ve, map <string,string> *stringTokens = NULL, map <string,int> *intTokens = NULL, map < string, vector< map< string, string > > > *loopTokens = NULL);
bool PreparePixmap(eViewElement ve, int num, cTemplatePixmap *pix, map <string,string> *stringTokens, map <string,int> *intTokens, map < string, vector< map< string, string > > > *loopTokens);
void ClearViewElement(eViewElement ve);
void DestroyViewElement(eViewElement ve);
void DestroyDetachedViewElement(eViewElement ve);
@ -112,6 +113,7 @@ protected:
int align;
int listOrientation;
void SetListElementPosition(cTemplatePixmap *pix);
bool PrepareListItemPixmap(int num, cTemplatePixmap *pix, map <string,string> *stringTokens, map <string,int> *intTokens);
public:
cViewListItem(cTemplateViewElement *tmplItem);
virtual ~cViewListItem();
@ -132,6 +134,7 @@ protected:
map <string,string> stringTokens;
map <string,int> intTokens;
void PositionPixmap(cTemplatePixmap *pix);
bool PrepareGridPixmap(int num, cTemplatePixmap *pix);
public:
cGrid(cTemplateViewElement *tmplGrid);
virtual ~cGrid();

View File

@ -221,7 +221,8 @@ bool cViewHelpers::SetSystemMemory(bool forced, stringmap &stringTokens, intmap
bool cViewHelpers::SetSystemTemperatures(bool forced, stringmap &stringTokens, intmap &intTokens) {
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/temperatures\"", SCRIPTFOLDER, SCRIPTFOLDER);
system(*execCommand);
int ok = system(*execCommand);
if (ok) {}
string tempCPU, tempGPU;
int cpu, gpu;
@ -261,7 +262,8 @@ bool cViewHelpers::SetSystemTemperatures(bool forced, stringmap &stringTokens, i
bool cViewHelpers::SetVDRStats(bool forced, stringmap &stringTokens, intmap &intTokens) {
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/vdrstats\"", SCRIPTFOLDER, SCRIPTFOLDER);
system(*execCommand);
int ok = system(*execCommand);
if (ok) {}
string vdrCPU = "";
string vdrMEM = "";

View File

@ -5,6 +5,7 @@
typedef map<string,string> stringmap;
typedef map<string,int> intmap;
typedef pair<string,string> stringpair;
class cViewHelpers {
private: