mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
immplemented areacontainers to group areas
This commit is contained in:
parent
50fe393724
commit
5a6fb850b3
1
HISTORY
1
HISTORY
@ -378,3 +378,4 @@ Version 0.5.3
|
|||||||
- fixed crash using animated images in plugins
|
- fixed crash using animated images in plugins
|
||||||
- added banner to displaymenuschedulescurrentview and
|
- added banner to displaymenuschedulescurrentview and
|
||||||
displaymenureplaycurrentview
|
displaymenureplaycurrentview
|
||||||
|
- immplemented areacontainers to group areas
|
||||||
|
1
Makefile
1
Makefile
@ -73,6 +73,7 @@ OBJS = $(PLUGIN).o \
|
|||||||
libcore/imagecache.o \
|
libcore/imagecache.o \
|
||||||
libcore/helpers.o \
|
libcore/helpers.o \
|
||||||
libcore/imageloader.o \
|
libcore/imageloader.o \
|
||||||
|
libcore/libxmlwrapper.o \
|
||||||
libcore/recfolderinfo.o \
|
libcore/recfolderinfo.o \
|
||||||
libcore/skinsetup.o \
|
libcore/skinsetup.o \
|
||||||
libcore/skinrepo.o \
|
libcore/skinrepo.o \
|
||||||
|
5
config.c
5
config.c
@ -237,7 +237,10 @@ void cDesignerConfig::DeleteSkin(string skin) {
|
|||||||
if (FolderExists(delPath)) {
|
if (FolderExists(delPath)) {
|
||||||
dsyslog("skindesigner: deleting skin %s", delPath.c_str());
|
dsyslog("skindesigner: deleting skin %s", delPath.c_str());
|
||||||
cString command = cString::sprintf("rm -rf %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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area|areascroll)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT header (area|areascroll)*>
|
<!ELEMENT header (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST header
|
<!ATTLIST header
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
@ -45,6 +45,6 @@
|
|||||||
orientation (horizontal|vertical) #REQUIRED
|
orientation (horizontal|vertical) #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT listelement (area|areascroll)*>
|
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||||
|
|
||||||
%functions;
|
%functions;
|
@ -24,79 +24,79 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT channelinfo (area|areascroll)*>
|
<!ELEMENT channelinfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST channelinfo
|
<!ATTLIST channelinfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT epginfo (area|areascroll)*>
|
<!ELEMENT epginfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST epginfo
|
<!ATTLIST epginfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT progressbar (area|areascroll)*>
|
<!ELEMENT progressbar (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST progressbar
|
<!ATTLIST progressbar
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT progressbarback (area)*>
|
<!ELEMENT progressbarback (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST progressbarback
|
<!ATTLIST progressbarback
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT statusinfo (area|areascroll)*>
|
<!ELEMENT statusinfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST statusinfo
|
<!ATTLIST statusinfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT audioinfo (area|areascroll)*>
|
<!ELEMENT audioinfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST audioinfo
|
<!ATTLIST audioinfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT ecminfo (area|areascroll)*>
|
<!ELEMENT ecminfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST ecminfo
|
<!ATTLIST ecminfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT screenresolution (area|areascroll)*>
|
<!ELEMENT screenresolution (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST screenresolution
|
<!ATTLIST screenresolution
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT channelgroup (area|areascroll)*>
|
<!ELEMENT channelgroup (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST channelgroup
|
<!ATTLIST channelgroup
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT signalquality (area|areascroll)*>
|
<!ELEMENT signalquality (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST signalquality
|
<!ATTLIST signalquality
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT signalqualityback (area|areascroll)*>
|
<!ELEMENT signalqualityback (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST signalqualityback
|
<!ATTLIST signalqualityback
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT devices (area|areascroll)*>
|
<!ELEMENT devices (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST devices
|
<!ATTLIST devices
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -111,7 +111,7 @@
|
|||||||
mode CDATA #IMPLIED
|
mode CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currentweather (area|areascroll)*>
|
<!ELEMENT currentweather (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentweather
|
<!ATTLIST currentweather
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -125,7 +125,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT scrapercontent (area|areascroll)*>
|
<!ELEMENT scrapercontent (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST scrapercontent
|
<!ATTLIST scrapercontent
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -139,7 +139,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT datetime (area|areascroll)*>
|
<!ELEMENT datetime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST datetime
|
<!ATTLIST datetime
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -153,7 +153,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT time (area|areascroll)*>
|
<!ELEMENT time (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST time
|
<!ATTLIST time
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -167,13 +167,13 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT message (area|areascroll)*>
|
<!ELEMENT message (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST message
|
<!ATTLIST message
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT customtokens (area|areascroll)*>
|
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST customtokens
|
<!ATTLIST customtokens
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT header (area|areascroll)*>
|
<!ELEMENT header (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST header
|
<!ATTLIST header
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -36,7 +36,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT datetime (area|areascroll)*>
|
<!ELEMENT datetime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST datetime
|
<!ATTLIST datetime
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -50,7 +50,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT time (area|areascroll)*>
|
<!ELEMENT time (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST time
|
<!ATTLIST time
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -64,7 +64,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT message (area|areascroll)*>
|
<!ELEMENT message (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST message
|
<!ATTLIST message
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -78,19 +78,19 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT sortmode (area|areascroll)*>
|
<!ELEMENT sortmode (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST sortmode
|
<!ATTLIST sortmode
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT colorbuttons (area|areascroll)*>
|
<!ELEMENT colorbuttons (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST colorbuttons
|
<!ATTLIST colorbuttons
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT timers (area|areascroll)*>
|
<!ELEMENT timers (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST timers
|
<!ATTLIST timers
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -104,7 +104,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT discusage (area|areascroll)*>
|
<!ELEMENT discusage (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST discusage
|
<!ATTLIST discusage
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -118,7 +118,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT devices (area|areascroll)*>
|
<!ELEMENT devices (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST devices
|
<!ATTLIST devices
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -133,7 +133,7 @@
|
|||||||
mode CDATA #IMPLIED
|
mode CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT systemload (area|areascroll)*>
|
<!ELEMENT systemload (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST systemload
|
<!ATTLIST systemload
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -147,7 +147,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT systemmemory (area|areascroll)*>
|
<!ELEMENT systemmemory (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST systemmemory
|
<!ATTLIST systemmemory
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -161,7 +161,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT temperatures (area|areascroll)*>
|
<!ELEMENT temperatures (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST temperatures
|
<!ATTLIST temperatures
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -175,7 +175,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT vdrstatistics (area|areascroll)*>
|
<!ELEMENT vdrstatistics (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST vdrstatistics
|
<!ATTLIST vdrstatistics
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -189,7 +189,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currentschedule (area|areascroll)*>
|
<!ELEMENT currentschedule (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentschedule
|
<!ATTLIST currentschedule
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -203,7 +203,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currentweather (area|areascroll)*>
|
<!ELEMENT currentweather (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentweather
|
<!ATTLIST currentweather
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -217,7 +217,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT lastrecordings (area|areascroll)*>
|
<!ELEMENT lastrecordings (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST lastrecordings
|
<!ATTLIST lastrecordings
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -231,7 +231,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT customtokens (area|areascroll)*>
|
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST customtokens
|
<!ATTLIST customtokens
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -245,19 +245,19 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT scrollbar (area|areascroll)*>
|
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST scrollbar
|
<!ATTLIST scrollbar
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT detailheader (area|areascroll)*>
|
<!ELEMENT detailheader (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST detailheader
|
<!ATTLIST detailheader
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT tablabels (area|areascroll)*>
|
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST tablabels
|
<!ATTLIST tablabels
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
@ -421,12 +421,12 @@
|
|||||||
orientation (horizontal|vertical) #REQUIRED
|
orientation (horizontal|vertical) #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT listelement (area|areascroll)*>
|
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST listelement
|
<!ATTLIST listelement
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currentelement (area|areascroll)*>
|
<!ELEMENT currentelement (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentelement
|
<!ATTLIST currentelement
|
||||||
delay CDATA #REQUIRED
|
delay CDATA #REQUIRED
|
||||||
fadetime CDATA #IMPLIED
|
fadetime CDATA #IMPLIED
|
||||||
|
@ -16,42 +16,42 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT header (area|areascroll)*>
|
<!ELEMENT header (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST header
|
<!ATTLIST header
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT datetime (area|areascroll)*>
|
<!ELEMENT datetime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST datetime
|
<!ATTLIST datetime
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT message (area|areascroll)*>
|
<!ELEMENT message (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST message
|
<!ATTLIST message
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT colorbuttons (area|areascroll)*>
|
<!ELEMENT colorbuttons (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST colorbuttons
|
<!ATTLIST colorbuttons
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT scrollbar (area|areascroll)*>
|
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST scrollbar
|
<!ATTLIST scrollbar
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT detailheader (area|areascroll)*>
|
<!ELEMENT detailheader (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST detailheader
|
<!ATTLIST detailheader
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT tablabels (area|areascroll)*>
|
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST tablabels
|
<!ATTLIST tablabels
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
@ -68,12 +68,12 @@
|
|||||||
orientation (horizontal|vertical) #REQUIRED
|
orientation (horizontal|vertical) #REQUIRED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT listelement (area|areascroll)*>
|
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST listelement
|
<!ATTLIST listelement
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currentelement (area|areascroll)*>
|
<!ELEMENT currentelement (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currentelement
|
<!ATTLIST currentelement
|
||||||
delay CDATA #REQUIRED
|
delay CDATA #REQUIRED
|
||||||
fadetime CDATA #IMPLIED
|
fadetime CDATA #IMPLIED
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT message (area|areascroll)*>
|
<!ELEMENT message (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST message
|
<!ATTLIST message
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
@ -22,18 +22,18 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT viewelement (area|areascroll)*>
|
<!ELEMENT viewelement (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST viewelement
|
<!ATTLIST viewelement
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT scrollbar (area|areascroll)*>
|
<!ELEMENT scrollbar (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST scrollbar
|
<!ATTLIST scrollbar
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT tablabels (area|areascroll)*>
|
<!ELEMENT tablabels (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST tablabels
|
<!ATTLIST tablabels
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
@ -25,29 +25,29 @@
|
|||||||
debuggrid CDATA #IMPLIED
|
debuggrid CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT background (area)*>
|
<!ELEMENT background (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST background
|
<!ATTLIST background
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT backgroundmodeonly (area)*>
|
<!ELEMENT backgroundmodeonly (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST backgroundmodeonly
|
<!ATTLIST backgroundmodeonly
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT datetime (area|areascroll)*>
|
<!ELEMENT datetime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST datetime
|
<!ATTLIST datetime
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT time (area|areascroll)*>
|
<!ELEMENT time (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST time
|
<!ATTLIST time
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT scrapercontent (area|areascroll)*>
|
<!ELEMENT scrapercontent (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST scrapercontent
|
<!ATTLIST scrapercontent
|
||||||
detached CDATA #IMPLIED
|
detached CDATA #IMPLIED
|
||||||
delay CDATA #IMPLIED
|
delay CDATA #IMPLIED
|
||||||
@ -61,73 +61,73 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT rectitle (area|areascroll)*>
|
<!ELEMENT rectitle (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST rectitle
|
<!ATTLIST rectitle
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT recinfo (area|areascroll)*>
|
<!ELEMENT recinfo (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST recinfo
|
<!ATTLIST recinfo
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT currenttime (area|areascroll)*>
|
<!ELEMENT currenttime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST currenttime
|
<!ATTLIST currenttime
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT totaltime (area|areascroll)*>
|
<!ELEMENT totaltime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST totaltime
|
<!ATTLIST totaltime
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT endtime (area|areascroll)*>
|
<!ELEMENT endtime (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST endtime
|
<!ATTLIST endtime
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT progressbar (area|areascroll)*>
|
<!ELEMENT progressbar (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST progressbar
|
<!ATTLIST progressbar
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT cutmarks (area|areascroll)*>
|
<!ELEMENT cutmarks (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST cutmarks
|
<!ATTLIST cutmarks
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT controlicons (area|areascroll)*>
|
<!ELEMENT controlicons (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST controlicons
|
<!ATTLIST controlicons
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT controliconsmodeonly (area|areascroll)*>
|
<!ELEMENT controliconsmodeonly (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST controliconsmodeonly
|
<!ATTLIST controliconsmodeonly
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT jump (area|areascroll)*>
|
<!ELEMENT jump (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST jump
|
<!ATTLIST jump
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT message (area|areascroll)*>
|
<!ELEMENT message (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST message
|
<!ATTLIST message
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT onpause (area|areascroll)*>
|
<!ELEMENT onpause (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST onpause
|
<!ATTLIST onpause
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
delay CDATA #REQUIRED
|
delay CDATA #REQUIRED
|
||||||
@ -135,7 +135,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT onpausemodeonly (area|areascroll)*>
|
<!ELEMENT onpausemodeonly (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST onpausemodeonly
|
<!ATTLIST onpausemodeonly
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
delay CDATA #REQUIRED
|
delay CDATA #REQUIRED
|
||||||
@ -143,7 +143,7 @@
|
|||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT customtokens (area|areascroll)*>
|
<!ELEMENT customtokens (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST customtokens
|
<!ATTLIST customtokens
|
||||||
debug CDATA #IMPLIED
|
debug CDATA #IMPLIED
|
||||||
condition CDATA #IMPLIED
|
condition CDATA #IMPLIED
|
||||||
|
@ -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)*>
|
<!ELEMENT area (loop|fill|drawtext|drawtextbox|drawimage|drawtextvertical|drawrectangle|drawellipse|drawslope)*>
|
||||||
<!ATTLIST area
|
<!ATTLIST area
|
||||||
x CDATA #IMPLIED
|
x CDATA #IMPLIED
|
||||||
@ -28,7 +38,7 @@
|
|||||||
debug (true|false) #IMPLIED
|
debug (true|false) #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
<!ELEMENT grid (area|areascroll)*>
|
<!ELEMENT grid (areacontainer|area|areascroll)*>
|
||||||
<!ATTLIST grid
|
<!ATTLIST grid
|
||||||
x CDATA #REQUIRED
|
x CDATA #REQUIRED
|
||||||
y CDATA #REQUIRED
|
y CDATA #REQUIRED
|
||||||
|
@ -151,7 +151,10 @@ bool FirstFileInFolder(string &path, string &extension, string &fileName) {
|
|||||||
|
|
||||||
void CreateFolder(string &path) {
|
void CreateFolder(string &path) {
|
||||||
cString command = cString::sprintf("mkdir -p %s", path.c_str());
|
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
|
// trim from start
|
||||||
|
@ -88,19 +88,19 @@ void cSkinSetupMenu::InitIterators(void) {
|
|||||||
subMenuIt = subMenus.begin();
|
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();
|
cSkinSetupParameter *param = new cSkinSetupParameter();
|
||||||
param->type = paramType;
|
param->type = paramType;
|
||||||
param->name = (const char*)name;
|
param->name = name;
|
||||||
param->displayText = (const char*)displayText;
|
param->displayText = displayText;
|
||||||
|
|
||||||
if (min && paramType == sptInt) {
|
if (min.size() && paramType == sptInt) {
|
||||||
param->min = atoi((const char*)min);
|
param->min = atoi(min.c_str());
|
||||||
}
|
}
|
||||||
if (max && paramType == sptInt) {
|
if (max.size() && paramType == sptInt) {
|
||||||
param->max = atoi((const char*)max);
|
param->max = atoi(max.c_str());
|
||||||
}
|
}
|
||||||
param->value = atoi((const char*)value);
|
param->value = atoi(value.c_str());
|
||||||
|
|
||||||
parameters.push_back(param);
|
parameters.push_back(param);
|
||||||
}
|
}
|
||||||
@ -169,10 +169,10 @@ bool cSkinSetup::ReadFromXML(void) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSkinSetup::SetSubMenu(xmlChar *name, xmlChar *displayText) {
|
void cSkinSetup::SetSubMenu(string name, string displayText) {
|
||||||
cSkinSetupMenu *subMenu = new cSkinSetupMenu();
|
cSkinSetupMenu *subMenu = new cSkinSetupMenu();
|
||||||
subMenu->SetName((const char*)name);
|
subMenu->SetName(name);
|
||||||
subMenu->SetDisplayText((const char*)displayText);
|
subMenu->SetDisplayText(displayText);
|
||||||
subMenu->SetParent(currentMenu);
|
subMenu->SetParent(currentMenu);
|
||||||
currentMenu->AddSubMenu(subMenu);
|
currentMenu->AddSubMenu(subMenu);
|
||||||
currentMenu = 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) {
|
void cSkinSetup::SetParameter(string type, string name, string displayText, string min, string max, string value) {
|
||||||
if (!type || !name || !displayText || !value) {
|
if (!type.size() || !name.size() || !displayText.size() || !value.size()) {
|
||||||
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
esyslog("skindesigner: invalid setup parameter for skin %s", skin.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
eSetupParameterType paramType = sptUnknown;
|
eSetupParameterType paramType = sptUnknown;
|
||||||
if (!xmlStrcmp(type, (const xmlChar *) "int")) {
|
if (!type.compare("int")) {
|
||||||
paramType = sptInt;
|
paramType = sptInt;
|
||||||
} else if (!xmlStrcmp(type, (const xmlChar *) "bool")) {
|
} else if (!type.compare("bool")) {
|
||||||
paramType = sptBool;
|
paramType = sptBool;
|
||||||
}
|
}
|
||||||
if (paramType == sptUnknown) {
|
if (paramType == sptUnknown) {
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
void SetParent(cSkinSetupMenu *p) { parent = p; };
|
void SetParent(cSkinSetupMenu *p) { parent = p; };
|
||||||
cSkinSetupMenu *GetParent(void) { return parent; };
|
cSkinSetupMenu *GetParent(void) { return parent; };
|
||||||
void AddSubMenu(cSkinSetupMenu *sub) { subMenus.push_back(sub); };
|
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 InitIterators(void);
|
||||||
void InitParameterIterator(void) { paramIt = parameters.begin(); };
|
void InitParameterIterator(void) { paramIt = parameters.begin(); };
|
||||||
cSkinSetupParameter *GetNextParameter(bool deep = true);
|
cSkinSetupParameter *GetNextParameter(bool deep = true);
|
||||||
@ -80,9 +80,9 @@ public:
|
|||||||
cSkinSetup(string skin);
|
cSkinSetup(string skin);
|
||||||
virtual ~cSkinSetup(void);
|
virtual ~cSkinSetup(void);
|
||||||
bool ReadFromXML(void);
|
bool ReadFromXML(void);
|
||||||
void SetSubMenu(xmlChar *name, xmlChar *displayText);
|
void SetSubMenu(string name, string displayText);
|
||||||
void SubMenuDone(void);
|
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(); };
|
void InitParameterIterator(void) { rootMenu->InitIterators(); };
|
||||||
cSkinSetupParameter *GetNextParameter(void);
|
cSkinSetupParameter *GetNextParameter(void);
|
||||||
cSkinSetupParameter *GetParameter(string name);
|
cSkinSetupParameter *GetParameter(string name);
|
||||||
|
@ -18,13 +18,13 @@ bool cGlobals::ReadFromXML(void) {
|
|||||||
//globals.xml is mandatory
|
//globals.xml is mandatory
|
||||||
string xmlFile = "globals.xml";
|
string xmlFile = "globals.xml";
|
||||||
cXmlParser parser;
|
cXmlParser parser;
|
||||||
if (!parser.ReadGlobals(this, xmlFile, true))
|
if (!parser.ReadGlobals(this, xmlFile))
|
||||||
return false;
|
return false;
|
||||||
if (!parser.ParseGlobals())
|
if (!parser.ParseGlobals())
|
||||||
return false;
|
return false;
|
||||||
//theme.xml is optional
|
//theme.xml is optional
|
||||||
xmlFile = "theme.xml";
|
xmlFile = "theme.xml";
|
||||||
if (parser.ReadGlobals(this, xmlFile, false)) {
|
if (parser.ReadGlobals(this, xmlFile)) {
|
||||||
parser.ParseGlobals();
|
parser.ParseGlobals();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -190,10 +190,10 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
|
|||||||
view->InitViewElementIterator();
|
view->InitViewElementIterator();
|
||||||
cTemplateViewElement *viewElement = NULL;
|
cTemplateViewElement *viewElement = NULL;
|
||||||
while(viewElement = view->GetNextViewElement()) {
|
while(viewElement = view->GetNextViewElement()) {
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pix = viewElement->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -206,10 +206,10 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
|
|||||||
view->InitViewListIterator();
|
view->InitViewListIterator();
|
||||||
cTemplateViewList *viewList = NULL;
|
cTemplateViewList *viewList = NULL;
|
||||||
while(viewList = view->GetNextViewList()) {
|
while(viewList = view->GetNextViewList()) {
|
||||||
viewList->InitIterator();
|
viewList->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewList->GetNextPixmap()) {
|
while(pix = viewList->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -218,9 +218,9 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cTemplateViewElement *listElement = viewList->GetListElement();
|
cTemplateViewElement *listElement = viewList->GetListElement();
|
||||||
listElement->InitIterator();
|
listElement->InitPixmapIterator();
|
||||||
while(pix = listElement->GetNextPixmap()) {
|
while(pix = listElement->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -233,7 +233,7 @@ void cTemplate::GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &u
|
|||||||
view->InitViewTabIterator();
|
view->InitViewTabIterator();
|
||||||
cTemplateViewTab *viewTab = NULL;
|
cTemplateViewTab *viewTab = NULL;
|
||||||
while(viewTab = view->GetNextViewTab()) {
|
while(viewTab = view->GetNextViewTab()) {
|
||||||
viewTab->InitIterator();
|
viewTab->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = viewTab->GetNextFunction()) {
|
while(func = viewTab->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -248,7 +248,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
|
|||||||
view->InitViewElementIterator();
|
view->InitViewElementIterator();
|
||||||
cTemplateViewElement *viewElement = NULL;
|
cTemplateViewElement *viewElement = NULL;
|
||||||
while(viewElement = view->GetNextViewElement()) {
|
while(viewElement = view->GetNextViewElement()) {
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pix = viewElement->GetNextPixmap()) {
|
||||||
CachePixmapImages(pix);
|
CachePixmapImages(pix);
|
||||||
@ -258,13 +258,13 @@ void cTemplate::CacheImages(cTemplateView *view) {
|
|||||||
view->InitViewListIterator();
|
view->InitViewListIterator();
|
||||||
cTemplateViewList *viewList = NULL;
|
cTemplateViewList *viewList = NULL;
|
||||||
while(viewList = view->GetNextViewList()) {
|
while(viewList = view->GetNextViewList()) {
|
||||||
viewList->InitIterator();
|
viewList->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewList->GetNextPixmap()) {
|
while(pix = viewList->GetNextPixmap()) {
|
||||||
CachePixmapImages(pix);
|
CachePixmapImages(pix);
|
||||||
}
|
}
|
||||||
cTemplateViewElement *listElement = viewList->GetListElement();
|
cTemplateViewElement *listElement = viewList->GetListElement();
|
||||||
listElement->InitIterator();
|
listElement->InitPixmapIterator();
|
||||||
while(pix = listElement->GetNextPixmap()) {
|
while(pix = listElement->GetNextPixmap()) {
|
||||||
CachePixmapImages(pix);
|
CachePixmapImages(pix);
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
|
|||||||
if (!currentElement) {
|
if (!currentElement) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentElement->InitIterator();
|
currentElement->InitPixmapIterator();
|
||||||
while(pix = currentElement->GetNextPixmap()) {
|
while(pix = currentElement->GetNextPixmap()) {
|
||||||
CachePixmapImages(pix);
|
CachePixmapImages(pix);
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ void cTemplate::CacheImages(cTemplateView *view) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cTemplate::CachePixmapImages(cTemplatePixmap *pix) {
|
void cTemplate::CachePixmapImages(cTemplatePixmap *pix) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawImage) {
|
if (func->GetType() == ftDrawImage) {
|
||||||
|
@ -1568,6 +1568,9 @@ string cTemplateFunction::GetFuncName(void) {
|
|||||||
case ftViewElement:
|
case ftViewElement:
|
||||||
name = "View Element Parameters";
|
name = "View Element Parameters";
|
||||||
break;
|
break;
|
||||||
|
case ftPixmapContainer:
|
||||||
|
name = "Pixmap Container Parameters";
|
||||||
|
break;
|
||||||
case ftPixmap:
|
case ftPixmap:
|
||||||
name = "Pixmap Parameters";
|
name = "Pixmap Parameters";
|
||||||
break;
|
break;
|
||||||
|
@ -23,6 +23,7 @@ enum eFuncType {
|
|||||||
ftView,
|
ftView,
|
||||||
ftViewElement,
|
ftViewElement,
|
||||||
ftViewList,
|
ftViewList,
|
||||||
|
ftPixmapContainer,
|
||||||
ftPixmap,
|
ftPixmap,
|
||||||
ftPixmapScroll,
|
ftPixmapScroll,
|
||||||
ftLoop,
|
ftLoop,
|
||||||
|
@ -1,16 +1,40 @@
|
|||||||
#include "templatepixmap.h"
|
#include "templatepixmap.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
// --- cTemplatePixmapNode -------------------------------------------------------------
|
||||||
|
|
||||||
// --- cTemplatePixmap -------------------------------------------------------------
|
cTemplatePixmapNode::cTemplatePixmapNode(void) {
|
||||||
|
|
||||||
cTemplatePixmap::cTemplatePixmap(void) {
|
|
||||||
parameters = NULL;
|
parameters = NULL;
|
||||||
|
globals = NULL;
|
||||||
containerX = 0;
|
containerX = 0;
|
||||||
containerY = 0;
|
containerY = 0;
|
||||||
containerWidth = 0;
|
containerWidth = 0;
|
||||||
containerHeight = 0;
|
containerHeight = 0;
|
||||||
globals = NULL;
|
}
|
||||||
|
|
||||||
|
cTemplatePixmapNode::~cTemplatePixmapNode() {
|
||||||
|
if (parameters)
|
||||||
|
delete parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cTemplatePixmapNode::SetParameters(vector<stringpair> ¶ms) {
|
||||||
|
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;
|
scrolling = false;
|
||||||
background = false;
|
background = false;
|
||||||
}
|
}
|
||||||
@ -19,21 +43,6 @@ cTemplatePixmap::~cTemplatePixmap() {
|
|||||||
for (vector<cTemplateFunction*>::iterator it = functions.begin(); it != functions.end(); it++) {
|
for (vector<cTemplateFunction*>::iterator it = functions.begin(); it != functions.end(); it++) {
|
||||||
delete (*it);
|
delete (*it);
|
||||||
}
|
}
|
||||||
if (parameters)
|
|
||||||
delete parameters;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cTemplatePixmap::SetParameters(vector<pair<string, string> > ¶ms) {
|
|
||||||
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) {
|
void cTemplatePixmap::SetWidth(int width) {
|
||||||
@ -76,6 +85,11 @@ void cTemplatePixmap::SetYPercent(double y) {
|
|||||||
parameters->SetYManually(absY);
|
parameters->SetYManually(absY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cTemplatePixmap::SetParameter(eParamType type, string value) {
|
||||||
|
parameters->SetParameter(type, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void cTemplatePixmap::ClearDynamicParameters(void) {
|
void cTemplatePixmap::ClearDynamicParameters(void) {
|
||||||
parameters->ClearDynamicParameters();
|
parameters->ClearDynamicParameters();
|
||||||
}
|
}
|
||||||
@ -180,7 +194,7 @@ bool cTemplatePixmap::CalculateParameters(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cTemplatePixmap::ClearDynamicFunctionParameters(void) {
|
void cTemplatePixmap::ClearDynamicFunctionParameters(void) {
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
func->ClearDynamicParameters();
|
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) {
|
void cTemplatePixmap::ParseDynamicFunctionParameters(map <string,string> *stringTokens, map <string,int> *intTokens, map < string, vector< map< string, string > > > *loopTokens) {
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
bool completelyParsed = true;
|
bool completelyParsed = true;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
@ -215,7 +229,7 @@ void cTemplatePixmap::ParseDynamicFunctionParameters(map <string,string> *string
|
|||||||
if (!replacedWidth && !replacedHeight && !replacedPosX && !replacedPosY)
|
if (!replacedWidth && !replacedHeight && !replacedPosX && !replacedPosY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
func = NULL;
|
func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->ParsedCompletely())
|
if (func->ParsedCompletely())
|
||||||
@ -249,7 +263,7 @@ bool cTemplatePixmap::CalculateDrawPortSize(cSize &size, map < string, vector< m
|
|||||||
}
|
}
|
||||||
} else if (orientation == orVertical) {
|
} else if (orientation == orVertical) {
|
||||||
//check "last" element height
|
//check "last" element height
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
cTemplateFunction *f = NULL;
|
cTemplateFunction *f = NULL;
|
||||||
int drawportHeight = 1;
|
int drawportHeight = 1;
|
||||||
while (f = GetNextFunction()) {
|
while (f = GetNextFunction()) {
|
||||||
@ -324,7 +338,7 @@ void cTemplatePixmap::SetScrollingTextWidth(void) {
|
|||||||
if (orientation != orHorizontal)
|
if (orientation != orHorizontal)
|
||||||
return;
|
return;
|
||||||
int pixWidth = parameters->GetNumericParameter(ptWidth);
|
int pixWidth = parameters->GetNumericParameter(ptWidth);
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -339,7 +353,7 @@ cTemplateFunction *cTemplatePixmap::GetScrollFunction(void) {
|
|||||||
string scrollElement = parameters->GetParameter(ptScrollElement);
|
string scrollElement = parameters->GetParameter(ptScrollElement);
|
||||||
if (scrollElement.size() == 0)
|
if (scrollElement.size() == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
InitIterator();
|
InitFunctionIterator();
|
||||||
cTemplateFunction *f = NULL;
|
cTemplateFunction *f = NULL;
|
||||||
while (f = GetNextFunction()) {
|
while (f = GetNextFunction()) {
|
||||||
string funcName = f->GetParameter(ptName);
|
string funcName = f->GetParameter(ptName);
|
||||||
@ -365,7 +379,7 @@ int cTemplatePixmap::GetNumericParameter(eParamType type) {
|
|||||||
return parameters->GetNumericParameter(type);
|
return parameters->GetNumericParameter(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cTemplatePixmap::InitIterator(void) {
|
void cTemplatePixmap::InitFunctionIterator(void) {
|
||||||
funcIt = functions.begin();
|
funcIt = functions.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,9 +407,26 @@ bool cTemplatePixmap::Ready(void) {
|
|||||||
return true;
|
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 cTemplatePixmap::ReplaceWidthFunctions(void) {
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
InitIterator();
|
bool found = false;
|
||||||
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->ParsedCompletely()) {
|
if (func->ParsedCompletely()) {
|
||||||
@ -411,6 +442,7 @@ bool cTemplatePixmap::ReplaceWidthFunctions(void) {
|
|||||||
cTemplateFunction *myFunc = *it;
|
cTemplateFunction *myFunc = *it;
|
||||||
string myFuncName = myFunc->GetParameter(ptName);
|
string myFuncName = myFunc->GetParameter(ptName);
|
||||||
if (!myFuncName.compare(label)) {
|
if (!myFuncName.compare(label)) {
|
||||||
|
found = true;
|
||||||
funcWidth = myFunc->GetWidth();
|
funcWidth = myFunc->GetWidth();
|
||||||
func->SetWidth(type, label, funcWidth);
|
func->SetWidth(type, label, funcWidth);
|
||||||
if (func->Updated()) {
|
if (func->Updated()) {
|
||||||
@ -418,6 +450,20 @@ bool cTemplatePixmap::ReplaceWidthFunctions(void) {
|
|||||||
} else {
|
} else {
|
||||||
replaced = true;
|
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 cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string, string > > > *loopTokens) {
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
InitIterator();
|
bool found = false;
|
||||||
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->ParsedCompletely()) {
|
if (func->ParsedCompletely()) {
|
||||||
@ -443,6 +490,7 @@ bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string,
|
|||||||
cTemplateFunction *myFunc = *it;
|
cTemplateFunction *myFunc = *it;
|
||||||
string myFuncName = myFunc->GetParameter(ptName);
|
string myFuncName = myFunc->GetParameter(ptName);
|
||||||
if (!myFuncName.compare(label)) {
|
if (!myFuncName.compare(label)) {
|
||||||
|
found = true;
|
||||||
funcHeight = myFunc->GetHeight(loopTokens);
|
funcHeight = myFunc->GetHeight(loopTokens);
|
||||||
func->SetHeight(type, label, funcHeight);
|
func->SetHeight(type, label, funcHeight);
|
||||||
if (func->Updated()) {
|
if (func->Updated()) {
|
||||||
@ -450,6 +498,20 @@ bool cTemplatePixmap::ReplaceHeightFunctions(map < string, vector< map< string,
|
|||||||
} else {
|
} else {
|
||||||
replaced = true;
|
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 cTemplatePixmap::ReplacePosXFunctions(void) {
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
InitIterator();
|
bool found = false;
|
||||||
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->ParsedCompletely()) {
|
if (func->ParsedCompletely()) {
|
||||||
@ -475,6 +538,7 @@ bool cTemplatePixmap::ReplacePosXFunctions(void) {
|
|||||||
cTemplateFunction *myFunc = *it;
|
cTemplateFunction *myFunc = *it;
|
||||||
string myFuncName = myFunc->GetParameter(ptName);
|
string myFuncName = myFunc->GetParameter(ptName);
|
||||||
if (!myFuncName.compare(label)) {
|
if (!myFuncName.compare(label)) {
|
||||||
|
found = true;
|
||||||
funcX = myFunc->GetNumericParameter(ptX);
|
funcX = myFunc->GetNumericParameter(ptX);
|
||||||
if (funcX > -1) {
|
if (funcX > -1) {
|
||||||
func->SetX(type, label, funcX);
|
func->SetX(type, label, funcX);
|
||||||
@ -484,6 +548,22 @@ bool cTemplatePixmap::ReplacePosXFunctions(void) {
|
|||||||
replaced = true;
|
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 cTemplatePixmap::ReplacePosYFunctions(void) {
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
InitIterator();
|
bool found = false;
|
||||||
|
InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = GetNextFunction()) {
|
while(func = GetNextFunction()) {
|
||||||
if (func->ParsedCompletely()) {
|
if (func->ParsedCompletely()) {
|
||||||
@ -509,6 +590,7 @@ bool cTemplatePixmap::ReplacePosYFunctions(void) {
|
|||||||
cTemplateFunction *myFunc = *it;
|
cTemplateFunction *myFunc = *it;
|
||||||
string myFuncName = myFunc->GetParameter(ptName);
|
string myFuncName = myFunc->GetParameter(ptName);
|
||||||
if (!myFuncName.compare(label)) {
|
if (!myFuncName.compare(label)) {
|
||||||
|
found = true;
|
||||||
funcY = myFunc->GetNumericParameter(ptY);
|
funcY = myFunc->GetNumericParameter(ptY);
|
||||||
if (funcY > -1) {
|
if (funcY > -1) {
|
||||||
func->SetY(type, label, funcY);
|
func->SetY(type, label, funcY);
|
||||||
@ -518,6 +600,22 @@ bool cTemplatePixmap::ReplacePosYFunctions(void) {
|
|||||||
replaced = true;
|
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();
|
(*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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -13,23 +13,46 @@
|
|||||||
|
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "templateloopfunction.h"
|
#include "templateloopfunction.h"
|
||||||
|
#include "../views/viewhelpers.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// --- cTemplatePixmap -------------------------------------------------------------
|
// --- cTemplatePixmapNode -------------------------------------------------------------
|
||||||
|
class cTemplatePixmapNode {
|
||||||
class cTemplatePixmap {
|
|
||||||
protected:
|
protected:
|
||||||
bool scrolling;
|
bool isContainer;
|
||||||
bool background;
|
cGlobals *globals;
|
||||||
cTemplateFunction *parameters;
|
cTemplateFunction *parameters;
|
||||||
vector<cTemplateFunction*> functions;
|
|
||||||
vector<cTemplateFunction*>::iterator funcIt;
|
|
||||||
int containerX;
|
int containerX;
|
||||||
int containerY;
|
int containerY;
|
||||||
int containerWidth;
|
int containerWidth;
|
||||||
int containerHeight;
|
int containerHeight;
|
||||||
cGlobals *globals;
|
public:
|
||||||
|
cTemplatePixmapNode(void);
|
||||||
|
virtual ~cTemplatePixmapNode(void);
|
||||||
|
void SetParameters(vector<stringpair> ¶ms);
|
||||||
|
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
|
//functions replacing {width(label)} and {height(label)} tokens
|
||||||
bool ReplaceWidthFunctions(void);
|
bool ReplaceWidthFunctions(void);
|
||||||
bool ReplaceHeightFunctions(map < string, vector< map< string, string > > > *loopTokens);
|
bool ReplaceHeightFunctions(map < string, vector< map< string, string > > > *loopTokens);
|
||||||
@ -42,8 +65,8 @@ public:
|
|||||||
cTemplatePixmap(void);
|
cTemplatePixmap(void);
|
||||||
virtual ~cTemplatePixmap(void);
|
virtual ~cTemplatePixmap(void);
|
||||||
//Setter Functions
|
//Setter Functions
|
||||||
|
void SetPixmapContainer(cTemplatePixmapContainer *pixContainer) { this->pixContainer = pixContainer; };
|
||||||
void SetScrolling(void) { scrolling = true; };
|
void SetScrolling(void) { scrolling = true; };
|
||||||
void SetParameters(vector<pair<string, string> > ¶ms);
|
|
||||||
void SetWidth(int width);
|
void SetWidth(int width);
|
||||||
void SetHeight(int height);
|
void SetHeight(int height);
|
||||||
void SetX(int x);
|
void SetX(int x);
|
||||||
@ -52,8 +75,7 @@ public:
|
|||||||
void SetHeightPercent(double height);
|
void SetHeightPercent(double height);
|
||||||
void SetXPercent(double x);
|
void SetXPercent(double x);
|
||||||
void SetYPercent(double y);
|
void SetYPercent(double y);
|
||||||
void SetContainer(int x, int y, int w, int h);
|
void SetParameter(eParamType type, string value);
|
||||||
void SetGlobals(cGlobals *globals) { this->globals = globals; };
|
|
||||||
void AddFunction(string name, vector<pair<string, string> > ¶ms);
|
void AddFunction(string name, vector<pair<string, string> > ¶ms);
|
||||||
void AddLoopFunction(cTemplateLoopFunction *lf);
|
void AddLoopFunction(cTemplateLoopFunction *lf);
|
||||||
//PreCache Parameters
|
//PreCache Parameters
|
||||||
@ -71,18 +93,40 @@ public:
|
|||||||
//Set max width for text in scrollarea
|
//Set max width for text in scrollarea
|
||||||
void SetScrollingTextWidth(void);
|
void SetScrollingTextWidth(void);
|
||||||
//Getter Functions
|
//Getter Functions
|
||||||
|
int NumPixmaps(void) { return 1; };
|
||||||
cRect GetPixmapSize(void);
|
cRect GetPixmapSize(void);
|
||||||
int GetNumericParameter(eParamType type);
|
int GetNumericParameter(eParamType type);
|
||||||
bool Scrolling(void) { return scrolling; };
|
bool Scrolling(void) { return scrolling; };
|
||||||
bool DoExecute(void) { return parameters->DoExecute(); };
|
|
||||||
bool DoDebug(void) { return parameters->DoDebug(); };
|
|
||||||
bool Ready(void);
|
bool Ready(void);
|
||||||
bool BackgroundArea(void) { return background; };
|
bool BackgroundArea(void) { return background; };
|
||||||
|
bool ParameterSet(eParamType type);
|
||||||
|
cTemplateFunction *GetFunction(string name);
|
||||||
//Traverse Functions
|
//Traverse Functions
|
||||||
void InitIterator(void);
|
void InitFunctionIterator(void);
|
||||||
cTemplateFunction *GetNextFunction(void);
|
cTemplateFunction *GetNextFunction(void);
|
||||||
//Debug
|
//Debug
|
||||||
void Debug(void);
|
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
|
#endif //__TEMPLATEPIXMAP_H
|
@ -349,10 +349,10 @@ void cTemplateView::Translate(void) {
|
|||||||
InitViewElementIterator();
|
InitViewElementIterator();
|
||||||
cTemplateViewElement *viewElement = NULL;
|
cTemplateViewElement *viewElement = NULL;
|
||||||
while(viewElement = GetNextViewElement()) {
|
while(viewElement = GetNextViewElement()) {
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pix = viewElement->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -385,10 +385,10 @@ void cTemplateView::Translate(void) {
|
|||||||
InitViewListIterator();
|
InitViewListIterator();
|
||||||
cTemplateViewList *viewList = NULL;
|
cTemplateViewList *viewList = NULL;
|
||||||
while(viewList = GetNextViewList()) {
|
while(viewList = GetNextViewList()) {
|
||||||
viewList->InitIterator();
|
viewList->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewList->GetNextPixmap()) {
|
while(pix = viewList->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -402,9 +402,9 @@ void cTemplateView::Translate(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cTemplateViewElement *listElement = viewList->GetListElement();
|
cTemplateViewElement *listElement = viewList->GetListElement();
|
||||||
listElement->InitIterator();
|
listElement->InitPixmapIterator();
|
||||||
while(pix = listElement->GetNextPixmap()) {
|
while(pix = listElement->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -420,9 +420,9 @@ void cTemplateView::Translate(void) {
|
|||||||
|
|
||||||
cTemplateViewElement *listElementCurrent = viewList->GetListElementCurrent();
|
cTemplateViewElement *listElementCurrent = viewList->GetListElementCurrent();
|
||||||
if (listElementCurrent) {
|
if (listElementCurrent) {
|
||||||
listElementCurrent->InitIterator();
|
listElementCurrent->InitPixmapIterator();
|
||||||
while(pix = listElementCurrent->GetNextPixmap()) {
|
while(pix = listElementCurrent->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -463,7 +463,7 @@ void cTemplateView::Translate(void) {
|
|||||||
if (translated) {
|
if (translated) {
|
||||||
viewTab->SetName(tabTrans);
|
viewTab->SetName(tabTrans);
|
||||||
}
|
}
|
||||||
viewTab->InitIterator();
|
viewTab->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = viewTab->GetNextFunction()) {
|
while(func = viewTab->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -496,10 +496,10 @@ void cTemplateView::Translate(void) {
|
|||||||
InitViewGridIterator();
|
InitViewGridIterator();
|
||||||
cTemplateViewGrid *viewGrid = NULL;
|
cTemplateViewGrid *viewGrid = NULL;
|
||||||
while(viewGrid = GetNextViewGrid()) {
|
while(viewGrid = GetNextViewGrid()) {
|
||||||
viewGrid->InitIterator();
|
viewGrid->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = viewGrid->GetNextPixmap()) {
|
while(pix = viewGrid->GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
if (func->GetType() == ftDrawText || func->GetType() == ftDrawTextBox || func->GetType() == ftDrawTextVertical) {
|
||||||
@ -696,6 +696,16 @@ void cTemplateView::SetFunctionDefinitions(void) {
|
|||||||
attributes.insert("debug");
|
attributes.insert("debug");
|
||||||
funcsAllowed.insert(pair< string, set<string> >(name, attributes));
|
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";
|
name = "area";
|
||||||
attributes.clear();
|
attributes.clear();
|
||||||
attributes.insert("debug");
|
attributes.insert("debug");
|
||||||
@ -998,7 +1008,7 @@ string cTemplateViewChannel::GetViewElementName(eViewElement ve) {
|
|||||||
return name;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -1040,7 +1050,6 @@ void cTemplateViewChannel::AddPixmap(string sViewElement, cTemplatePixmap *pix,
|
|||||||
} else if (!sViewElement.compare("customtokens")) {
|
} else if (!sViewElement.compare("customtokens")) {
|
||||||
ve = veCustomTokens;
|
ve = veCustomTokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ve == veUndefined) {
|
if (ve == veUndefined) {
|
||||||
esyslog("skindesigner: unknown ViewElement in displaychannel: %s", sViewElement.c_str());
|
esyslog("skindesigner: unknown ViewElement in displaychannel: %s", sViewElement.c_str());
|
||||||
return;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -1648,7 +1657,7 @@ string cTemplateViewMessage::GetViewElementName(eViewElement ve) {
|
|||||||
return name;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -1801,7 +1810,7 @@ string cTemplateViewReplay::GetViewElementName(eViewElement ve) {
|
|||||||
return name;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -1916,7 +1925,7 @@ string cTemplateViewVolume::GetViewElementName(eViewElement ve) {
|
|||||||
return name;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -2026,7 +2035,7 @@ string cTemplateViewAudioTracks::GetViewListName(eViewList vl) {
|
|||||||
return name;
|
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;
|
eViewElement ve = veUndefined;
|
||||||
|
|
||||||
if (!sViewElement.compare("background")) {
|
if (!sViewElement.compare("background")) {
|
||||||
@ -2133,7 +2142,7 @@ void cTemplateViewPlugin::AddSubView(string sSubView, cTemplateView *subView) {
|
|||||||
subViews.insert(pair< eSubView, cTemplateView* >((eSubView)subViewId, 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;
|
eViewElement ve = veUndefined;
|
||||||
string viewElementName = "";
|
string viewElementName = "";
|
||||||
int viewElementID = -1;
|
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 = "";
|
string gridName = "";
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (vector<pair<string, string> >::iterator it = gridAttributes.begin(); it != gridAttributes.end(); it++) {
|
for (vector<pair<string, string> >::iterator it = gridAttributes.begin(); it != gridAttributes.end(); it++) {
|
||||||
|
@ -76,8 +76,8 @@ public:
|
|||||||
virtual string GetViewListName(eViewList vl) { return ""; };
|
virtual string GetViewListName(eViewList vl) { return ""; };
|
||||||
virtual void AddSubView(string sSubView, cTemplateView *subView) {};
|
virtual void AddSubView(string sSubView, cTemplateView *subView) {};
|
||||||
virtual void AddPluginView(string plugName, int templNo, cTemplateView *plugView) {};
|
virtual void AddPluginView(string plugName, int templNo, cTemplateView *plugView) {};
|
||||||
virtual void AddPixmap(string sViewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes) {};
|
virtual void AddPixmap(string sViewElement, cTemplatePixmapNode *pix, vector<stringpair> &viewElementattributes) {};
|
||||||
virtual void AddPixmapGrid(cTemplatePixmap *pix, vector<pair<string, string> > &gridAttributes) {};
|
virtual void AddPixmapGrid(cTemplatePixmapNode *pix, vector<pair<string, string> > &gridAttributes) {};
|
||||||
virtual void AddViewList(string sViewList, cTemplateViewList *viewList) {};
|
virtual void AddViewList(string sViewList, cTemplateViewList *viewList) {};
|
||||||
virtual void AddViewTab(cTemplateViewTab *viewTab) {};
|
virtual void AddViewTab(cTemplateViewTab *viewTab) {};
|
||||||
//Setter Functions
|
//Setter Functions
|
||||||
@ -146,11 +146,12 @@ class cTemplateViewChannel : public cTemplateView {
|
|||||||
private:
|
private:
|
||||||
void SetViewElements(void);
|
void SetViewElements(void);
|
||||||
void SetViewLists(void);
|
void SetViewLists(void);
|
||||||
|
eViewElement GetViewElementID(string sViewElement);
|
||||||
public:
|
public:
|
||||||
cTemplateViewChannel(void);
|
cTemplateViewChannel(void);
|
||||||
virtual ~cTemplateViewChannel(void);
|
virtual ~cTemplateViewChannel(void);
|
||||||
string GetViewElementName(eViewElement ve);
|
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 -------------------------------------------------------------
|
// --- cTemplateViewMenu -------------------------------------------------------------
|
||||||
@ -168,7 +169,7 @@ public:
|
|||||||
string GetViewListName(eViewList vl);
|
string GetViewListName(eViewList vl);
|
||||||
void AddSubView(string sSubView, cTemplateView *subView);
|
void AddSubView(string sSubView, cTemplateView *subView);
|
||||||
void AddPluginView(string plugName, int templNo, cTemplateView *plugView);
|
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 AddViewList(string sViewList, cTemplateViewList *viewList);
|
||||||
void AddViewTab(cTemplateViewTab *viewTab);
|
void AddViewTab(cTemplateViewTab *viewTab);
|
||||||
};
|
};
|
||||||
@ -182,7 +183,7 @@ public:
|
|||||||
cTemplateViewMessage(void);
|
cTemplateViewMessage(void);
|
||||||
virtual ~cTemplateViewMessage(void);
|
virtual ~cTemplateViewMessage(void);
|
||||||
string GetViewElementName(eViewElement ve);
|
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 -------------------------------------------------------------
|
// --- cTemplateViewReplay -------------------------------------------------------------
|
||||||
@ -194,7 +195,7 @@ public:
|
|||||||
cTemplateViewReplay(void);
|
cTemplateViewReplay(void);
|
||||||
virtual ~cTemplateViewReplay(void);
|
virtual ~cTemplateViewReplay(void);
|
||||||
string GetViewElementName(eViewElement ve);
|
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 -------------------------------------------------------------
|
// --- cTemplateViewVolume -------------------------------------------------------------
|
||||||
@ -206,7 +207,7 @@ public:
|
|||||||
cTemplateViewVolume(void);
|
cTemplateViewVolume(void);
|
||||||
virtual ~cTemplateViewVolume(void);
|
virtual ~cTemplateViewVolume(void);
|
||||||
string GetViewElementName(eViewElement ve);
|
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 -------------------------------------------------------------
|
// --- cTemplateViewAudioTracks -------------------------------------------------------------
|
||||||
@ -220,7 +221,7 @@ public:
|
|||||||
virtual ~cTemplateViewAudioTracks(void);
|
virtual ~cTemplateViewAudioTracks(void);
|
||||||
string GetViewElementName(eViewElement ve);
|
string GetViewElementName(eViewElement ve);
|
||||||
string GetViewListName(eViewList vl);
|
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);
|
void AddViewList(string sViewList, cTemplateViewList *viewList);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -234,8 +235,8 @@ public:
|
|||||||
cTemplateViewPlugin(string pluginName, int viewID);
|
cTemplateViewPlugin(string pluginName, int viewID);
|
||||||
virtual ~cTemplateViewPlugin(void);
|
virtual ~cTemplateViewPlugin(void);
|
||||||
void AddSubView(string sSubView, cTemplateView *subView);
|
void AddSubView(string sSubView, cTemplateView *subView);
|
||||||
void AddPixmap(string viewElement, cTemplatePixmap *pix, vector<pair<string, string> > &viewElementattributes);
|
void AddPixmap(string viewElement, cTemplatePixmapNode *pix, vector<pair<string, string> > &viewElementattributes);
|
||||||
void AddPixmapGrid(cTemplatePixmap *pix, vector<pair<string, string> > &gridAttributes);
|
void AddPixmapGrid(cTemplatePixmapNode *pix, vector<pair<string, string> > &gridAttributes);
|
||||||
void AddViewTab(cTemplateViewTab *viewTab);
|
void AddViewTab(cTemplateViewTab *viewTab);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,12 +9,14 @@ cTemplateViewElement::cTemplateViewElement(void) {
|
|||||||
containerWidth = 0;
|
containerWidth = 0;
|
||||||
containerHeight = 0;
|
containerHeight = 0;
|
||||||
pixOffset = -1;
|
pixOffset = -1;
|
||||||
|
pixmapIterator = NULL;
|
||||||
|
currentNode = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cTemplateViewElement::~cTemplateViewElement(void) {
|
cTemplateViewElement::~cTemplateViewElement(void) {
|
||||||
if (parameters)
|
if (parameters)
|
||||||
delete 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);
|
delete (*it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +30,7 @@ void cTemplateViewElement::SetContainer(int x, int y, int width, int height) {
|
|||||||
|
|
||||||
void cTemplateViewElement::SetGlobals(cGlobals *globals) {
|
void cTemplateViewElement::SetGlobals(cGlobals *globals) {
|
||||||
this->globals = 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);
|
(*pix)->SetGlobals(globals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,7 +54,7 @@ bool cTemplateViewElement::CalculateParameters(void) {
|
|||||||
|
|
||||||
bool cTemplateViewElement::CalculatePixmapParameters(void) {
|
bool cTemplateViewElement::CalculatePixmapParameters(void) {
|
||||||
bool paramsValid = true;
|
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)->SetContainer(containerX, containerY, containerWidth, containerHeight);
|
||||||
(*pix)->SetGlobals(globals);
|
(*pix)->SetGlobals(globals);
|
||||||
paramsValid = paramsValid && (*pix)->CalculateParameters();
|
paramsValid = paramsValid && (*pix)->CalculateParameters();
|
||||||
@ -62,7 +64,7 @@ bool cTemplateViewElement::CalculatePixmapParameters(void) {
|
|||||||
|
|
||||||
bool cTemplateViewElement::CalculatePixmapParametersList(int orientation, int numElements) {
|
bool cTemplateViewElement::CalculatePixmapParametersList(int orientation, int numElements) {
|
||||||
bool paramsValid = true;
|
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)->SetContainer(containerX, containerY, containerWidth, containerHeight);
|
||||||
(*pix)->SetGlobals(globals);
|
(*pix)->SetGlobals(globals);
|
||||||
if (orientation == orHorizontal) {
|
if (orientation == orHorizontal) {
|
||||||
@ -87,23 +89,91 @@ int cTemplateViewElement::GetNumericParameter(eParamType type) {
|
|||||||
return parameters->GetNumericParameter(type);
|
return parameters->GetNumericParameter(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cTemplateViewElement::InitIterator(void) {
|
int cTemplateViewElement::GetNumPixmaps(void) {
|
||||||
pixIterator = viewPixmaps.begin();
|
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) {
|
cTemplatePixmapNode *cTemplateViewElement::GetNextPixmapNode(void) {
|
||||||
if (pixIterator == viewPixmaps.end())
|
if (pixmapNodeIterator == viewPixmapNodes.end())
|
||||||
return NULL;
|
return NULL;
|
||||||
cTemplatePixmap *pix = *pixIterator;
|
cTemplatePixmapNode *pix = *pixmapNodeIterator;
|
||||||
pixIterator++;
|
pixmapNodeIterator++;
|
||||||
return pix;
|
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) {
|
cTemplateFunction *cTemplateViewElement::GetFunction(string name) {
|
||||||
InitIterator();
|
InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while (pix = GetNextPixmap()) {
|
while (pix = GetNextPixmap()) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
if (func->GetType() == ftDrawText) {
|
if (func->GetType() == ftDrawText) {
|
||||||
@ -151,7 +221,7 @@ void cTemplateViewElement::Debug(void) {
|
|||||||
if (parameters)
|
if (parameters)
|
||||||
parameters->Debug();
|
parameters->Debug();
|
||||||
return;
|
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();
|
(*it)->Debug();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -91,24 +91,28 @@ protected:
|
|||||||
int containerY;
|
int containerY;
|
||||||
int containerWidth;
|
int containerWidth;
|
||||||
int containerHeight;
|
int containerHeight;
|
||||||
vector<cTemplatePixmap*> viewPixmaps;
|
vector<cTemplatePixmapNode*> viewPixmapNodes;
|
||||||
vector<cTemplatePixmap*>::iterator pixIterator;
|
vector<cTemplatePixmapNode*>::iterator pixmapNodeIterator;
|
||||||
|
cTemplatePixmap *pixmapIterator;
|
||||||
|
cTemplatePixmapContainer *currentNode;
|
||||||
int pixOffset;
|
int pixOffset;
|
||||||
public:
|
public:
|
||||||
cTemplateViewElement(void);
|
cTemplateViewElement(void);
|
||||||
virtual ~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> > ¶ms);
|
void SetParameters(vector<pair<string, string> > ¶ms);
|
||||||
bool CalculateParameters(void);
|
bool CalculateParameters(void);
|
||||||
virtual bool CalculatePixmapParameters(void);
|
virtual bool CalculatePixmapParameters(void);
|
||||||
bool CalculatePixmapParametersList(int orientation, int numElements);
|
bool CalculatePixmapParametersList(int orientation, int numElements);
|
||||||
|
void AddPixmap(cTemplatePixmapNode *pix) { viewPixmapNodes.push_back(pix); };
|
||||||
int GetNumericParameter(eParamType type);
|
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; };
|
void SetPixOffset(int offset) { pixOffset = offset; };
|
||||||
int GetPixOffset(void) { return pixOffset; };
|
int GetPixOffset(void) { return pixOffset; };
|
||||||
virtual int GetNumPixmaps(void) { return viewPixmaps.size(); };
|
virtual int GetNumPixmaps(void);
|
||||||
void InitIterator(void);
|
void InitPixmapNodeIterator(void);
|
||||||
|
cTemplatePixmapNode *GetNextPixmapNode(void);
|
||||||
|
void InitPixmapIterator(void);
|
||||||
cTemplatePixmap *GetNextPixmap(void);
|
cTemplatePixmap *GetNextPixmap(void);
|
||||||
cTemplateFunction *GetFunction(string name);
|
cTemplateFunction *GetFunction(string name);
|
||||||
bool Execute(void);
|
bool Execute(void);
|
||||||
|
@ -15,7 +15,7 @@ bool cTemplateViewGrid::CalculatePixmapParameters(void) {
|
|||||||
int gridWidth = parameters->GetNumericParameter(ptWidth);
|
int gridWidth = parameters->GetNumericParameter(ptWidth);
|
||||||
int gridHeight = parameters->GetNumericParameter(ptHeight);
|
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)->SetContainer(gridX, gridY, gridWidth, gridHeight);
|
||||||
(*pix)->SetGlobals(globals);
|
(*pix)->SetGlobals(globals);
|
||||||
paramsValid = paramsValid && (*pix)->CalculateParameters();
|
paramsValid = paramsValid && (*pix)->CalculateParameters();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -8,11 +8,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <libxml/parser.h>
|
|
||||||
#include <libxml/tree.h>
|
|
||||||
#include <libxml/xmlerror.h>
|
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
|
#include "../libcore/libxmlwrapper.h"
|
||||||
#include "templateview.h"
|
#include "templateview.h"
|
||||||
#include "templateviewlist.h"
|
#include "templateviewlist.h"
|
||||||
#include "templateviewgrid.h"
|
#include "templateviewgrid.h"
|
||||||
@ -23,45 +20,49 @@ using namespace std;
|
|||||||
|
|
||||||
// --- cXmlParser -------------------------------------------------------------
|
// --- cXmlParser -------------------------------------------------------------
|
||||||
|
|
||||||
class cXmlParser {
|
class cXmlParser : public cLibXMLWrapper {
|
||||||
private:
|
private:
|
||||||
cTemplateView *view;
|
cTemplateView *view;
|
||||||
cGlobals *globals;
|
cGlobals *globals;
|
||||||
cSkinSetup *skinSetup;
|
cSkinSetup *skinSetup;
|
||||||
xmlParserCtxtPtr ctxt;
|
//parsing views
|
||||||
xmlDocPtr doc;
|
bool ParseSubView(void);
|
||||||
xmlNodePtr root;
|
void ParseViewElement(cTemplateView *subView = NULL);
|
||||||
string GetPath(string xmlFile);
|
void ParseViewList(cTemplateView *subView = NULL);
|
||||||
void ParseSetupMenu(xmlNodePtr node);
|
void ParseViewTab(cTemplateView *subView);
|
||||||
void ParseSetupParameter(xmlNodePtr node);
|
void ParseGrid(void);
|
||||||
void ParseGlobalColors(xmlNodePtr node);
|
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 InsertColor(string name, string value);
|
||||||
void ParseGlobalVariables(xmlNodePtr node);
|
void ParseGlobalVariables(void);
|
||||||
void InsertVariable(string name, string type, string value);
|
void InsertVariable(string name, string type, string value);
|
||||||
void ParseGlobalFonts(xmlNodePtr node);
|
void ParseGlobalFonts(void);
|
||||||
void ParseTranslations(xmlNodePtr node);
|
void ParseTranslations(void);
|
||||||
bool ParseSubView(xmlNodePtr node);
|
//parsing skin setup
|
||||||
void ParseViewElement(const xmlChar * viewElement, xmlNodePtr node, vector<pair<string, string> > &attributes, cTemplateView *subView = NULL);
|
void ParseSetupMenu(void);
|
||||||
void ParseViewList(xmlNodePtr parentNode, cTemplateView *subView = NULL);
|
void ParseSetupParameter(void);
|
||||||
void ParseViewTab(xmlNodePtr parentNode, cTemplateView *subView);
|
//helpers
|
||||||
void ParseGrid(xmlNodePtr node, vector<pair<string, string> > &attributes);
|
void ValidateAttributes(const char *nodeName, vector<stringpair> &attributes);
|
||||||
void ParseFunctionCalls(xmlNodePtr node, cTemplatePixmap *pix);
|
string GetPath(string xmlFile);
|
||||||
void ParseLoopFunctionCalls(xmlNodePtr node, cTemplateLoopFunction *loopFunc);
|
|
||||||
bool ParseAttributes(xmlAttrPtr attr, xmlNodePtr node, vector<pair<string, string> > &attribs, bool isViewElement = false);
|
|
||||||
public:
|
public:
|
||||||
cXmlParser(void);
|
cXmlParser(void);
|
||||||
virtual ~cXmlParser(void);
|
virtual ~cXmlParser(void);
|
||||||
|
//reading views
|
||||||
bool ReadView(cTemplateView *view, string xmlFile);
|
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);
|
bool ParseView(void);
|
||||||
|
//reading plugin views
|
||||||
|
bool ReadPluginView(string plugName, int templateNumber, string templateName);
|
||||||
bool ParsePluginView(string plugName, int templateNumber);
|
bool ParsePluginView(string plugName, int templateNumber);
|
||||||
|
//reading globals
|
||||||
|
bool ReadGlobals(cGlobals *globals, string xmlFile);
|
||||||
bool ParseGlobals(void);
|
bool ParseGlobals(void);
|
||||||
|
//reading skin setups
|
||||||
|
bool ReadSkinSetup(cSkinSetup *skinSetup, string xmlFile);
|
||||||
bool ParseSkinSetup(string skin);
|
bool ParseSkinSetup(string skin);
|
||||||
void DeleteDocument(void);
|
|
||||||
static void InitLibXML();
|
|
||||||
static void CleanupLibXML();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__XMLPARSER_H
|
#endif //__XMLPARSER_H
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE displaychannel SYSTEM "../../../dtd/displaychannel.dtd">
|
<!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>
|
||||||
<!-- background infobar -->
|
<!-- background infobar -->
|
||||||
<area x="0" y="80%" width="100%" height="20%" layer="1">
|
<area x="0" y="80%" width="100%" height="20%" layer="1">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<menudefault x="0" y="0" width="100%" height="100%" fadetime="0">
|
<menudefault x="0" y="0" width="100%" height="100%" fadetime="0">
|
||||||
<background>
|
<background>
|
||||||
<!-- background Menu -->
|
<!-- background Menu -->
|
||||||
<area x="0" y="0" width="100%" height="100%" layer="1">
|
<area x="0" y="0" width="100%" height="100%" layer="1">
|
||||||
|
@ -61,64 +61,72 @@
|
|||||||
<fill condition="{separator}" color="{clrSemiTransBlack}" />
|
<fill condition="{separator}" color="{clrSemiTransBlack}" />
|
||||||
</area>
|
</area>
|
||||||
<!-- WHATSON -->
|
<!-- WHATSON -->
|
||||||
<areascroll condition="not{separator}++{whatson}++not{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="58%" layer="3">
|
<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}" />
|
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
|
||||||
</areascroll>
|
</areascroll>
|
||||||
<areascroll condition="not{separator}++{whatson}++{running}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="48%" layer="3">
|
<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}" />
|
<drawtext name="menutext" x="20" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
|
||||||
</areascroll>
|
</areascroll>
|
||||||
<area condition="not{separator}++{whatson}" x="1%" width="58%" layer="3">
|
<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="{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" />
|
<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 - 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 - 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}" />
|
<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>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- WHATSONNOW -->
|
<!-- WHATSONNOW -->
|
||||||
<area condition="not{separator}++{whatsonnow}" x="1%" width="6%" layer="3">
|
<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" />
|
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonnow}++{running}" x="8%" width="7%" layer="3">
|
<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="{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 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="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}" />
|
<drawrectangle x="4" y="{areaheight}/3 + 4" width="{areawidth} * {elapsed} / {duration} - 8" height="{areaheight}/3 - 8" color="{clrWhite}" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonnow}++{timerfull}" x="53%" width="6%" layer="4">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonnow}++{timerpartitial}" x="53%" width="6%" layer="5">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<areascroll condition="not{separator}++{whatsonnow}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="15%" width="44%" layer="4">
|
<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}" />
|
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
|
||||||
</areascroll>
|
</areascroll>
|
||||||
|
</areacontainer>
|
||||||
<!-- WHATSONNEXT -->
|
<!-- WHATSONNEXT -->
|
||||||
<area condition="not{separator}++{whatsonnext}" x="1%" width="6%" layer="3">
|
<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" />
|
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonnext}++{timerfull}" x="53%" width="6%" layer="4">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonnext}++{timerpartitial}" x="53%" width="6%" layer="5">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<areascroll condition="not{separator}++{whatsonnext}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
|
<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}" />
|
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
|
||||||
</areascroll>
|
</areascroll>
|
||||||
|
</areacontainer>
|
||||||
<!-- WHATSONFAVORITES -->
|
<!-- WHATSONFAVORITES -->
|
||||||
<area condition="not{separator}++{whatsonfavorites}" x="1%" width="6%" layer="3">
|
<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" />
|
<drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonfavorites}++{timerfull}" x="53%" width="6%" layer="4">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<area condition="not{separator}++{whatsonfavorites}++{timerpartitial}" x="53%" width="6%" layer="5">
|
<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" />
|
<drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" />
|
||||||
</area>
|
</area>
|
||||||
<areascroll condition="not{separator}++{whatsonfavorites}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4">
|
<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}" />
|
<drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" />
|
||||||
</areascroll>
|
</areascroll>
|
||||||
|
</areacontainer>
|
||||||
<!-- Separator -->
|
<!-- Separator -->
|
||||||
<area condition="{separator}" x="0" width="68%" layer="3">
|
<area condition="{separator}" x="0" width="68%" layer="3">
|
||||||
<drawtext x="20" valign="center" font="{light}" fontsize="95%" color="{clrBlueLight}" text="{title}" />
|
<drawtext x="20" valign="center" font="{light}" fontsize="95%" color="{clrBlueLight}" text="{title}" />
|
||||||
@ -177,7 +185,8 @@
|
|||||||
<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="{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}" />
|
<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>
|
||||||
<area condition="{whatsonnow}||{whatsonnext}" x="63%" y="0" width="36%" height="85%" layer="2">
|
<areacontainer condition="{whatsonnow}||{whatsonnext}">
|
||||||
|
<area x="63%" y="0" width="36%" height="85%" layer="2">
|
||||||
<!-- title -->
|
<!-- title -->
|
||||||
<drawtext align="center" y="0" font="{semibold}" width="{areawidth}-20" fontsize="10%" color="{clrWhite}" text="{title}" />
|
<drawtext align="center" y="0" font="{semibold}" width="{areawidth}-20" fontsize="10%" color="{clrWhite}" text="{title}" />
|
||||||
<!-- progress bar if event is running -->
|
<!-- progress bar if event is running -->
|
||||||
@ -193,12 +202,13 @@
|
|||||||
<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="{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}" />
|
<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>
|
</area>
|
||||||
<areascroll condition="{whatsonnow}||{whatsonnext}" mode="forthandback" orientation="vertical" delay="1000" scrollspeed="medium" x="63%" y="85%" width="36%" height="15%" layer="2">
|
<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:" />
|
<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">
|
<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]}" />
|
<drawtext x="10" font="{light}" width="{areawidth}-20" fontsize="30%" color="{clrWhite}" text="{schedule[start]} {schedule[title]}" />
|
||||||
</loop>
|
</loop>
|
||||||
</areascroll>
|
</areascroll>
|
||||||
|
</areacontainer>
|
||||||
</currentelement>
|
</currentelement>
|
||||||
</menuitems>
|
</menuitems>
|
||||||
<!-- Available Variables scrollbar:
|
<!-- Available Variables scrollbar:
|
||||||
|
@ -78,7 +78,8 @@
|
|||||||
{textyes} text to display on yes button
|
{textyes} text to display on yes button
|
||||||
{textno} text to display on no button
|
{textno} text to display on no button
|
||||||
-->
|
-->
|
||||||
<area condition="{buttonyesno}" layer="5">
|
<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="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="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="2%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
|
||||||
@ -86,10 +87,11 @@
|
|||||||
<drawrectangle condition="{current}++not{yes}" x="2%" 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}"/>
|
<drawrectangle condition="{current}++not{yes}" x="52%" y="5%" width="46%" height="90%" color="{clrTransBlueLight}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{buttonyesno}" layer="6">
|
<area layer="6">
|
||||||
<drawtext name="yestext" x="{areawidth}/4 - {width(yestext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textyes}" />
|
<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}" />
|
<drawtext name="notext" x="3*{areawidth}/4 - {width(notext)}/2" valign="center" font="{light}" fontsize="70%" color="{clrWhite}" text="{textno}" />
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Int Selector
|
<!-- Int Selector
|
||||||
{intselector} true
|
{intselector} true
|
||||||
{text} title of selector
|
{text} title of selector
|
||||||
@ -126,14 +128,16 @@
|
|||||||
{text} title of selector
|
{text} title of selector
|
||||||
{value} current value of selector, string
|
{value} current value of selector, string
|
||||||
-->
|
-->
|
||||||
<area condition="{textinput}" layer="6">
|
<areacontainer condition="{textinput}">
|
||||||
|
<area layer="6">
|
||||||
<drawtext x="1%" y="10%" font="{light}" fontsize="40%" color="{clrWhite}" text="{text}" />
|
<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="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}"/>
|
<drawrectangle condition="{editmode}" x="1%" y="55%" width="98%" height="40%" color="{clrRed}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{textinput}" layer="7">
|
<area layer="7">
|
||||||
<drawtext align="right" y="55%" font="{light}" fontsize="40%" color="{clrBlack}" text="{value} " />
|
<drawtext align="right" y="55%" font="{light}" fontsize="40%" color="{clrBlack}" text="{value} " />
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Time Selector
|
<!-- Time Selector
|
||||||
{timeselector} true
|
{timeselector} true
|
||||||
{text} title of selector
|
{text} title of selector
|
||||||
@ -174,7 +178,8 @@
|
|||||||
{day0abbr} ... {day6abbr} localized one character abbrevation for weekdays from Monday to Sunday
|
{day0abbr} ... {day6abbr} localized one character abbrevation for weekdays from Monday to Sunday
|
||||||
{day0set} ... {day6set} true if according weekday from Monday to Sunday is set
|
{day0set} ... {day6set} true if according weekday from Monday to Sunday is set
|
||||||
-->
|
-->
|
||||||
<area condition="{weekdayselector}" layer="6">
|
<areacontainer condition="{weekdayselector}">
|
||||||
|
<area layer="6">
|
||||||
<drawtext x="1%" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{text}" />
|
<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}" />
|
||||||
@ -200,7 +205,7 @@
|
|||||||
<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="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}" />
|
<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>
|
||||||
<area condition="{weekdayselector}" layer="7">
|
<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}, 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}, 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}, 2)" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{clrTransBlack}" />
|
||||||
@ -217,6 +222,7 @@
|
|||||||
<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="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}" />
|
<drawtext name="day6" x="{areawidth} - {areaheight}*1.0 + {areaheight}/4 - {width(day6)}/2" valign="center" font="{light}" fontsize="50%" color="{clrWhite}" text="{day6abbr}" />
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Directory Selector
|
<!-- Directory Selector
|
||||||
{directoryselector} true
|
{directoryselector} true
|
||||||
{text} title of selector
|
{text} title of selector
|
||||||
@ -238,17 +244,19 @@
|
|||||||
{overlapstartpercent} start of overlap in percent of total conflict time width
|
{overlapstartpercent} start of overlap in percent of total conflict time width
|
||||||
{overlapwidthpercent} width 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">
|
<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}" />
|
<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}"/>
|
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{timerconflictheader}" layer="6">
|
<area layer="6">
|
||||||
<drawtext x="{areawidth}*0.7" y="0" font="{light}" fontsize="50%" color="{clrBlack}" text="{conflictstart}" />
|
<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 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 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}" />
|
<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}"/>
|
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="50%" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="50%" color="{clrRedTrans}"/>
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Timerconflict
|
<!-- Timerconflict
|
||||||
{timerconflict} true
|
{timerconflict} true
|
||||||
{timertitle} title of timer
|
{timertitle} title of timer
|
||||||
@ -268,11 +276,12 @@
|
|||||||
{overlapstartpercent} start of overlap in percent of total conflict time width
|
{overlapstartpercent} start of overlap in percent of total conflict time width
|
||||||
{overlapwidthpercent} width 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">
|
<areacontainer condition="{timerconflict}">
|
||||||
|
<area layer="5">
|
||||||
<drawimage condition="not{current}" imagetype="skinpart" path="menubutton" x="0" y="0" width="70%" height="100%"/>
|
<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%"/>
|
<drawimage condition="{current}" imagetype="skinpart" path="menubuttonactive" x="0" y="0" width="70%" height="100%"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{timerconflict}" layer="6">
|
<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="{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="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="{current}++{deleteactive}" imagetype="icon" path="ico_delete_active" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
|
||||||
@ -287,9 +296,10 @@
|
|||||||
<drawrectangle x="70%" y="0" width="30%" height="100%" color="{clrWhite}"/>
|
<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}"/>
|
<drawrectangle x="{areawidth}*0.7 + {timerstartpercent}*{areawidth}*0.3/100" y="30%" width="{timerwidthpercent}*{areawidth}*0.3/100" height="40%" color="{clrBlack}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{timerconflict}" layer="7">
|
<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}"/>
|
<drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="0" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="100%" color="{clrRedTrans}"/>
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Event
|
<!-- Event
|
||||||
{event} true
|
{event} true
|
||||||
{title} title of event
|
{title} title of event
|
||||||
@ -367,7 +377,8 @@
|
|||||||
{eventstart} start time of according event
|
{eventstart} start time of according event
|
||||||
{eventstop} end time of according event
|
{eventstop} end time of according event
|
||||||
-->
|
-->
|
||||||
<area condition="{timelineheader}" layer="5">
|
<areacontainer condition="{timelineheader}">
|
||||||
|
<area layer="5">
|
||||||
<drawtext align="center" y="1%" font="{regular}" fontsize="35%" color="{clrWhite}" text="Timer for {date}" />
|
<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.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.0875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
|
||||||
@ -394,7 +405,7 @@
|
|||||||
<drawrectangle x="{areawidth}*0.875" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrBlack}"/>
|
<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}"/>
|
<drawrectangle x="{areawidth}*0.9125" y="80%" width="{areawidth}*0.0375" height="20%" color="{clrWhite}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{timelineheader}" layer="6">
|
<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="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="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="text2" x="{areawidth}*0.125 + {areawidth}*0.0375/2 - {width(text2)}/2" y="80%" font="{regular}" fontsize="20%" color="{clrWhite}" text="2"/>
|
||||||
@ -420,25 +431,28 @@
|
|||||||
<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="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"/>
|
<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>
|
||||||
<area condition="{timelineheader}++{timerset}" layer="6">
|
<area condition="{timerset}" layer="6">
|
||||||
<drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="1%" y="30%" width="{areaheight}*0.5" height="{areaheight}*0.5" />
|
<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 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="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}"/>
|
<drawtext x="{areaheight}*0.8" y="57%" width="{areawidth}-{areaheight}" font="{light}" fontsize="25%" color="{clrWhite}" text="{eventtitle} - {eventshorttext}"/>
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Timeline Timer
|
<!-- Timeline Timer
|
||||||
{timelinetimer} true
|
{timelinetimer} true
|
||||||
{timerstart} start of timer in tenth percent of complete 24h width
|
{timerstart} start of timer in tenth percent of complete 24h width
|
||||||
{timerwidth} width 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">
|
<areacontainer condition="{timelinetimer}">
|
||||||
|
<area layer="5">
|
||||||
<drawrectangle condition="{current}" x="5%" y="0" width="90%" height="100%" color="{clrTransBlueLight}"/>
|
<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 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}"/>
|
<drawrectangle x="5%" y="{areaheight}-1" width="90%" height="1" color="{clrBlack}"/>
|
||||||
</area>
|
</area>
|
||||||
<area condition="{timelinetimer}" layer="6">
|
<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}"/>
|
<drawrectangle x="{areawidth}*0.05 + {timerstart}*{areawidth}*0.9/1000" y="25%" width="{timerwidth}*{areawidth}*0.9/1000" height="50%" color="{clrBlack}"/>
|
||||||
</area>
|
</area>
|
||||||
|
</areacontainer>
|
||||||
<!-- Favorites
|
<!-- Favorites
|
||||||
{favorite} true
|
{favorite} true
|
||||||
{favdesc} description of favorite
|
{favdesc} description of favorite
|
||||||
|
211
views/view.c
211
views/view.c
@ -130,26 +130,54 @@ void cView::DrawViewElement(eViewElement ve, map <string,string> *stringTokens,
|
|||||||
int pixCurrent = viewElement->GetPixOffset();
|
int pixCurrent = viewElement->GetPixOffset();
|
||||||
if (pixCurrent < 0)
|
if (pixCurrent < 0)
|
||||||
return;
|
return;
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapNodeIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmapNode *pixNode = NULL;
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pixNode = viewElement->GetNextPixmapNode()) {
|
||||||
//check if already drawn background area, this can be skipped
|
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
|
||||||
if (PixmapExists(pixCurrent) && pix->BackgroundArea()) {
|
if (pix) {
|
||||||
|
bool draw = PreparePixmap(ve, pixCurrent, pix, stringTokens, intTokens, loopTokens);
|
||||||
|
if (draw)
|
||||||
|
DrawPixmap(pixCurrent, pix, loopTokens);
|
||||||
pixCurrent++;
|
pixCurrent++;
|
||||||
|
} else {
|
||||||
|
cTemplatePixmapContainer *pixContainer = dynamic_cast<cTemplatePixmapContainer*>(pixNode);
|
||||||
|
pixContainer->ParseDynamicParameters(stringTokens, intTokens);
|
||||||
|
if (pixContainer->DoDebug()) {
|
||||||
|
pixContainer->Debug();
|
||||||
|
}
|
||||||
|
if (!pixContainer->DoExecute()) {
|
||||||
|
pixCurrent += pixContainer->NumPixmaps();
|
||||||
continue;
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
//reset Template
|
||||||
pix->ClearDynamicParameters();
|
pix->ClearDynamicParameters();
|
||||||
//create Pixmap if already fully parsed
|
//create Pixmap if already fully parsed
|
||||||
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
|
if (!PixmapExists(num) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
CreateViewPixmap(num, pix);
|
||||||
}
|
}
|
||||||
//check if pixmap needs dynamic parameters
|
//check if pixmap needs dynamic parameters
|
||||||
if ((!pix->Ready() || !pix->DoExecute()) && !pix->Scrolling()) {
|
if ((!pix->Ready() || !pix->DoExecute()) && !pix->Scrolling()) {
|
||||||
//parse dynamic parameters and initiate functions
|
//parse dynamic parameters and initiate functions
|
||||||
pix->ParseDynamicParameters(stringTokens, intTokens, true);
|
pix->ParseDynamicParameters(stringTokens, intTokens, true);
|
||||||
if (pix->Ready() && pix->DoExecute()) {
|
if (pix->Ready() && pix->DoExecute()) {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
CreateViewPixmap(num, pix);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//parse dynamic parameters but not initiate functions
|
//parse dynamic parameters but not initiate functions
|
||||||
@ -157,41 +185,36 @@ void cView::DrawViewElement(eViewElement ve, map <string,string> *stringTokens,
|
|||||||
}
|
}
|
||||||
//if pixmap still not valid, skip
|
//if pixmap still not valid, skip
|
||||||
if (!pix->Ready() && !pix->Scrolling()) {
|
if (!pix->Ready() && !pix->Scrolling()) {
|
||||||
pixCurrent++;
|
return false;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
//if condition for pixmap set, check if cond is true
|
//if condition for pixmap set, check if cond is true
|
||||||
if (!pix->DoExecute()) {
|
if (!pix->DoExecute()) {
|
||||||
pixCurrent++;
|
return false;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
//parse dynamic tokens of pixmap functions
|
//parse dynamic tokens of pixmap functions
|
||||||
pix->ClearDynamicFunctionParameters();
|
pix->ClearDynamicFunctionParameters();
|
||||||
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, loopTokens);
|
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, loopTokens);
|
||||||
|
|
||||||
if (!PixmapExists(pixCurrent) && pix->Scrolling()) {
|
if (!PixmapExists(num) && pix->Scrolling()) {
|
||||||
cSize drawportSize;
|
cSize drawportSize;
|
||||||
scrolling = pix->CalculateDrawPortSize(drawportSize, loopTokens);
|
scrolling = pix->CalculateDrawPortSize(drawportSize, loopTokens);
|
||||||
if (scrolling) {
|
if (scrolling) {
|
||||||
CreateScrollingPixmap(pixCurrent, pix, drawportSize);
|
CreateScrollingPixmap(num, pix, drawportSize);
|
||||||
pix->SetScrollingTextWidth();
|
pix->SetScrollingTextWidth();
|
||||||
veScroll = ve;
|
veScroll = ve;
|
||||||
scrollingPix = pixCurrent;
|
scrollingPix = num;
|
||||||
scrollOrientation = pix->GetNumericParameter(ptOrientation);
|
scrollOrientation = pix->GetNumericParameter(ptOrientation);
|
||||||
scrollMode = pix->GetNumericParameter(ptScrollMode);
|
scrollMode = pix->GetNumericParameter(ptScrollMode);
|
||||||
scrollDelay = pix->GetNumericParameter(ptDelay);
|
scrollDelay = pix->GetNumericParameter(ptDelay);
|
||||||
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
|
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
|
||||||
} else {
|
} else {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
CreateViewPixmap(num, pix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pix->DoDebug()) {
|
if (pix->DoDebug()) {
|
||||||
pix->Debug();
|
pix->Debug();
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
DrawPixmap(pixCurrent, pix, loopTokens);
|
|
||||||
pixCurrent++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cView::ClearViewElement(eViewElement ve) {
|
void cView::ClearViewElement(eViewElement ve) {
|
||||||
@ -217,7 +240,7 @@ void cView::ClearViewElement(eViewElement ve) {
|
|||||||
if (pixCurrent < 0)
|
if (pixCurrent < 0)
|
||||||
return;
|
return;
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapIterator();
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pix = viewElement->GetNextPixmap()) {
|
||||||
if (!pix->BackgroundArea()) {
|
if (!pix->BackgroundArea()) {
|
||||||
Fill(pixCurrent, clrTransparent);
|
Fill(pixCurrent, clrTransparent);
|
||||||
@ -237,7 +260,7 @@ void cView::DestroyViewElement(eViewElement ve) {
|
|||||||
if (pixCurrent < 0)
|
if (pixCurrent < 0)
|
||||||
return;
|
return;
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
viewElement->InitIterator();
|
viewElement->InitPixmapIterator();
|
||||||
while(pix = viewElement->GetNextPixmap()) {
|
while(pix = viewElement->GetNextPixmap()) {
|
||||||
DestroyPixmap(pixCurrent);
|
DestroyPixmap(pixCurrent);
|
||||||
pixCurrent++;
|
pixCurrent++;
|
||||||
@ -299,7 +322,7 @@ void cView::ActivateScrolling(void) {
|
|||||||
int pixCurrent = scrollViewElement->GetPixOffset();
|
int pixCurrent = scrollViewElement->GetPixOffset();
|
||||||
if (pixCurrent < 0)
|
if (pixCurrent < 0)
|
||||||
return;
|
return;
|
||||||
scrollViewElement->InitIterator();
|
scrollViewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
while(pix = scrollViewElement->GetNextPixmap()) {
|
while(pix = scrollViewElement->GetNextPixmap()) {
|
||||||
DrawPixmap(pixCurrent, pix);
|
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) {
|
void cView::DrawPixmap(int num, cTemplatePixmap *pix, map < string, vector< map< string, string > > > *loopTokens, bool flushPerLoop) {
|
||||||
pix->InitIterator();
|
pix->InitFunctionIterator();
|
||||||
cTemplateFunction *func = NULL;
|
cTemplateFunction *func = NULL;
|
||||||
while(func = pix->GetNextFunction()) {
|
while(func = pix->GetNextFunction()) {
|
||||||
eFuncType type = func->GetType();
|
eFuncType type = func->GetType();
|
||||||
@ -1200,59 +1223,86 @@ cRect cViewListItem::DrawListItem(map <string,string> *stringTokens, map <string
|
|||||||
DebugTokens("ListItem", stringTokens, intTokens);
|
DebugTokens("ListItem", stringTokens, intTokens);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmplViewElement->InitIterator();
|
tmplViewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
|
||||||
int pixCurrent = 0;
|
int pixCurrent = 0;
|
||||||
|
cTemplatePixmapNode *pixNode = NULL;
|
||||||
while(pix = tmplViewElement->GetNextPixmap()) {
|
while(pixNode = tmplViewElement->GetNextPixmapNode()) {
|
||||||
|
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
|
||||||
|
if (pix) {
|
||||||
SetListElementPosition(pix);
|
SetListElementPosition(pix);
|
||||||
if (pixCurrent == 0) {
|
if (pixCurrent == 0) {
|
||||||
posItem = pix->GetPixmapSize();
|
posItem = pix->GetPixmapSize();
|
||||||
}
|
}
|
||||||
if (!PixmapExists(pixCurrent)) {
|
bool draw = PrepareListItemPixmap(pixCurrent, pix, stringTokens, intTokens);
|
||||||
|
if (draw) {
|
||||||
|
DrawPixmap(pixCurrent, pix);
|
||||||
|
}
|
||||||
|
pixCurrent++;
|
||||||
|
} else {
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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);
|
pix->ParseDynamicParameters(stringTokens, intTokens, true);
|
||||||
} else {
|
} else {
|
||||||
pix->ParseDynamicParameters(stringTokens, intTokens, false);
|
pix->ParseDynamicParameters(stringTokens, intTokens, false);
|
||||||
}
|
}
|
||||||
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
|
if (!PixmapExists(num) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
CreateViewPixmap(num, pix);
|
||||||
}
|
}
|
||||||
//if pixmap still not valid, skip
|
//if pixmap still not valid, skip
|
||||||
if (!pix->Ready() && !pix->Scrolling()) {
|
if (!pix->Ready() && !pix->Scrolling()) {
|
||||||
pixCurrent++;
|
return false;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
//if condition for pixmap set, check if cond is true
|
//if condition for pixmap set, check if cond is true
|
||||||
if (!pix->DoExecute()) {
|
if (!pix->DoExecute()) {
|
||||||
pixCurrent++;
|
return false;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pix->ClearDynamicFunctionParameters();
|
pix->ClearDynamicFunctionParameters();
|
||||||
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, NULL);
|
pix->ParseDynamicFunctionParameters(stringTokens, intTokens, NULL);
|
||||||
|
|
||||||
if (!PixmapExists(pixCurrent) && pix->Scrolling()) {
|
if (!PixmapExists(num) && pix->Scrolling()) {
|
||||||
cSize drawportSize;
|
cSize drawportSize;
|
||||||
scrolling = pix->CalculateDrawPortSize(drawportSize);
|
scrolling = pix->CalculateDrawPortSize(drawportSize);
|
||||||
pix->SetScrollingTextWidth();
|
pix->SetScrollingTextWidth();
|
||||||
if (scrolling) {
|
if (scrolling) {
|
||||||
CreateScrollingPixmap(pixCurrent, pix, drawportSize);
|
CreateScrollingPixmap(num, pix, drawportSize);
|
||||||
scrollingPix = pixCurrent;
|
scrollingPix = num;
|
||||||
scrollOrientation = pix->GetNumericParameter(ptOrientation);
|
scrollOrientation = pix->GetNumericParameter(ptOrientation);
|
||||||
scrollMode = pix->GetNumericParameter(ptScrollMode);
|
scrollMode = pix->GetNumericParameter(ptScrollMode);
|
||||||
scrollDelay = pix->GetNumericParameter(ptDelay);
|
scrollDelay = pix->GetNumericParameter(ptDelay);
|
||||||
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
|
scrollSpeed = pix->GetNumericParameter(ptScrollSpeed);
|
||||||
} else {
|
} else {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
CreateViewPixmap(num, pix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pix->DoDebug()) {
|
if (pix->DoDebug()) {
|
||||||
pix->Debug();
|
pix->Debug();
|
||||||
}
|
}
|
||||||
DrawPixmap(pixCurrent, pix);
|
return true;
|
||||||
pixCurrent++;
|
|
||||||
}
|
|
||||||
return posItem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cViewListItem::ClearListItem(void) {
|
void cViewListItem::ClearListItem(void) {
|
||||||
@ -1352,7 +1402,7 @@ void cGrid::SetCurrent(bool current) {
|
|||||||
void cGrid::Move(void) {
|
void cGrid::Move(void) {
|
||||||
if (!tmplViewElement)
|
if (!tmplViewElement)
|
||||||
return;
|
return;
|
||||||
tmplViewElement->InitIterator();
|
tmplViewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
cTemplatePixmap *pix = NULL;
|
||||||
int pixCurrent = 0;
|
int pixCurrent = 0;
|
||||||
|
|
||||||
@ -1374,42 +1424,73 @@ void cGrid::Draw(void) {
|
|||||||
DebugTokens("Grid", &stringTokens, &intTokens);
|
DebugTokens("Grid", &stringTokens, &intTokens);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmplViewElement->InitIterator();
|
tmplViewElement->InitPixmapIterator();
|
||||||
cTemplatePixmap *pix = NULL;
|
|
||||||
int pixCurrent = 0;
|
int pixCurrent = 0;
|
||||||
|
cTemplatePixmapNode *pixNode = NULL;
|
||||||
while(pix = tmplViewElement->GetNextPixmap()) {
|
while(pixNode = tmplViewElement->GetNextPixmapNode()) {
|
||||||
|
cTemplatePixmap *pix = dynamic_cast<cTemplatePixmap*>(pixNode);
|
||||||
|
if (pix) {
|
||||||
PositionPixmap(pix);
|
PositionPixmap(pix);
|
||||||
if (!PixmapExists(pixCurrent)) {
|
bool draw = PrepareGridPixmap(pixCurrent, pix);
|
||||||
pix->ParseDynamicParameters(&stringTokens, &intTokens, true);
|
if (pix->DoDebug())
|
||||||
|
pix->Debug();
|
||||||
|
if (draw) {
|
||||||
|
DrawPixmap(pixCurrent, pix);
|
||||||
|
}
|
||||||
|
pixCurrent++;
|
||||||
} else {
|
} else {
|
||||||
pix->ParseDynamicParameters(&stringTokens, &intTokens, false);
|
cTemplatePixmapContainer *pixContainer = dynamic_cast<cTemplatePixmapContainer*>(pixNode);
|
||||||
|
pixContainer->ParseDynamicParameters(&stringTokens, &intTokens);
|
||||||
|
if (pixContainer->DoDebug()) {
|
||||||
|
pixContainer->Debug();
|
||||||
}
|
}
|
||||||
if (!PixmapExists(pixCurrent) && pix->Ready() && pix->DoExecute() && !pix->Scrolling()) {
|
if (!pixContainer->DoExecute()) {
|
||||||
CreateViewPixmap(pixCurrent, pix);
|
pixCurrent += pixContainer->NumPixmaps();
|
||||||
}
|
|
||||||
//if pixmap still not valid, skip
|
|
||||||
if (!pix->Ready() && !pix->Scrolling()) {
|
|
||||||
pixCurrent++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//if condition for pixmap set, check if cond is true
|
pixContainer->InitIterator();
|
||||||
if (!pix->DoExecute()) {
|
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++;
|
pixCurrent++;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pix->ClearDynamicFunctionParameters();
|
|
||||||
pix->ParseDynamicFunctionParameters(&stringTokens, &intTokens, NULL);
|
}
|
||||||
//pix->Debug();
|
|
||||||
DrawPixmap(pixCurrent, pix);
|
|
||||||
pixCurrent++;
|
|
||||||
}
|
}
|
||||||
dirty = false;
|
dirty = false;
|
||||||
resized = false;
|
resized = false;
|
||||||
moved = 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) {
|
void cGrid::Clear(void) {
|
||||||
int pixMax = NumPixmaps();
|
int pixMax = NumPixmaps();
|
||||||
for (int pixCurrent = 0; pixCurrent < pixMax; pixCurrent++) {
|
for (int pixCurrent = 0; pixCurrent < pixMax; pixCurrent++) {
|
||||||
|
@ -56,6 +56,7 @@ protected:
|
|||||||
int scrollSpeed;
|
int scrollSpeed;
|
||||||
int animCat;
|
int animCat;
|
||||||
void DrawViewElement(eViewElement ve, map <string,string> *stringTokens = NULL, map <string,int> *intTokens = NULL, map < string, vector< map< string, string > > > *loopTokens = NULL);
|
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 ClearViewElement(eViewElement ve);
|
||||||
void DestroyViewElement(eViewElement ve);
|
void DestroyViewElement(eViewElement ve);
|
||||||
void DestroyDetachedViewElement(eViewElement ve);
|
void DestroyDetachedViewElement(eViewElement ve);
|
||||||
@ -112,6 +113,7 @@ protected:
|
|||||||
int align;
|
int align;
|
||||||
int listOrientation;
|
int listOrientation;
|
||||||
void SetListElementPosition(cTemplatePixmap *pix);
|
void SetListElementPosition(cTemplatePixmap *pix);
|
||||||
|
bool PrepareListItemPixmap(int num, cTemplatePixmap *pix, map <string,string> *stringTokens, map <string,int> *intTokens);
|
||||||
public:
|
public:
|
||||||
cViewListItem(cTemplateViewElement *tmplItem);
|
cViewListItem(cTemplateViewElement *tmplItem);
|
||||||
virtual ~cViewListItem();
|
virtual ~cViewListItem();
|
||||||
@ -132,6 +134,7 @@ protected:
|
|||||||
map <string,string> stringTokens;
|
map <string,string> stringTokens;
|
||||||
map <string,int> intTokens;
|
map <string,int> intTokens;
|
||||||
void PositionPixmap(cTemplatePixmap *pix);
|
void PositionPixmap(cTemplatePixmap *pix);
|
||||||
|
bool PrepareGridPixmap(int num, cTemplatePixmap *pix);
|
||||||
public:
|
public:
|
||||||
cGrid(cTemplateViewElement *tmplGrid);
|
cGrid(cTemplateViewElement *tmplGrid);
|
||||||
virtual ~cGrid();
|
virtual ~cGrid();
|
||||||
|
@ -221,7 +221,8 @@ bool cViewHelpers::SetSystemMemory(bool forced, stringmap &stringTokens, intmap
|
|||||||
|
|
||||||
bool cViewHelpers::SetSystemTemperatures(bool forced, stringmap &stringTokens, intmap &intTokens) {
|
bool cViewHelpers::SetSystemTemperatures(bool forced, stringmap &stringTokens, intmap &intTokens) {
|
||||||
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/temperatures\"", SCRIPTFOLDER, SCRIPTFOLDER);
|
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/temperatures\"", SCRIPTFOLDER, SCRIPTFOLDER);
|
||||||
system(*execCommand);
|
int ok = system(*execCommand);
|
||||||
|
if (ok) {}
|
||||||
|
|
||||||
string tempCPU, tempGPU;
|
string tempCPU, tempGPU;
|
||||||
int cpu, gpu;
|
int cpu, gpu;
|
||||||
@ -261,7 +262,8 @@ bool cViewHelpers::SetSystemTemperatures(bool forced, stringmap &stringTokens, i
|
|||||||
|
|
||||||
bool cViewHelpers::SetVDRStats(bool forced, stringmap &stringTokens, intmap &intTokens) {
|
bool cViewHelpers::SetVDRStats(bool forced, stringmap &stringTokens, intmap &intTokens) {
|
||||||
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/vdrstats\"", SCRIPTFOLDER, SCRIPTFOLDER);
|
cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/vdrstats\"", SCRIPTFOLDER, SCRIPTFOLDER);
|
||||||
system(*execCommand);
|
int ok = system(*execCommand);
|
||||||
|
if (ok) {}
|
||||||
|
|
||||||
string vdrCPU = "";
|
string vdrCPU = "";
|
||||||
string vdrMEM = "";
|
string vdrMEM = "";
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
typedef map<string,string> stringmap;
|
typedef map<string,string> stringmap;
|
||||||
typedef map<string,int> intmap;
|
typedef map<string,int> intmap;
|
||||||
|
typedef pair<string,string> stringpair;
|
||||||
|
|
||||||
class cViewHelpers {
|
class cViewHelpers {
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user