summaryrefslogtreecommitdiff
path: root/xml/parser.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-19 22:03:02 +0000
committerlordjaxom <lordjaxom>2004-12-19 22:03:02 +0000
commit9aeb43d010d2452890d2c04832f1dfda8d963c4d (patch)
tree4907fb636d40fc14a8f4d53ce33540afab3119cb /xml/parser.c
parentac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d (diff)
downloadvdr-plugin-text2skin-9aeb43d010d2452890d2c04832f1dfda8d963c4d.tar.gz
vdr-plugin-text2skin-9aeb43d010d2452890d2c04832f1dfda8d963c4d.tar.bz2
Initial revision
Diffstat (limited to 'xml/parser.c')
-rw-r--r--xml/parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xml/parser.c b/xml/parser.c
index 62cc69c..71c9453 100644
--- a/xml/parser.c
+++ b/xml/parser.c
@@ -1,5 +1,5 @@
/*
- * $Id: parser.c,v 1.7 2004/12/14 20:02:31 lordjaxom Exp $
+ * $Id: parser.c,v 1.1 2004/12/19 22:03:27 lordjaxom Exp $
*/
#include "xml/parser.h"
@@ -84,6 +84,7 @@ static cxSkin *skin = NULL;
static cxDisplay *display = NULL;
static cxObject *parent = NULL;
static cxObject *object = NULL;
+static uint mindex = 0;
bool xStartElem(const std::string &name, std::map<std::string,std::string> &attrs) {
//Dprintf("start element: %s\n", name.c_str());
@@ -146,10 +147,13 @@ bool xStartElem(const std::string &name, std::map<std::string,std::string> &attr
ATTRIB_MAN_FUNC ("path", object->mPath.Parse);
}
else if (name == "text"
+ || name == "marquee"
|| name == "scrolltext") {
ATTRIB_OPT_STRING("color", object->mFg);
ATTRIB_OPT_FUNC ("align", object->ParseAlignment);
ATTRIB_OPT_FUNC ("font", object->ParseFontFace);
+
+ object->mIndex = mindex++;
}
else if (name == "rectangle") {
ATTRIB_OPT_STRING("color", object->mFg);
@@ -197,6 +201,7 @@ bool xCharData(const std::string &text) {
if (end - start + 1 > 0) {
//Dprintf("context: %s\n", context[context.size() - 1].c_str());
if (context[context.size() - 1] == "text"
+ || context[context.size() - 1] == "marquee"
|| context[context.size() - 1] == "scrolltext") {
if (!object->mText.Parse(text.substr(start, end - start + 1)))
return false;
@@ -212,6 +217,7 @@ bool xEndElem(const std::string &name) {
if (name == "display") {
skin->mDisplays[display->Type()] = display;
display = NULL;
+ mindex = 0;
}
else if (object != NULL || parent != NULL) {
if (object == NULL) {