aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeParser.h
diff options
context:
space:
mode:
authorVicent Marti2008-06-18 00:15:21 +0000
committerVicent Marti2008-06-18 00:15:21 +0000
commit42036e7fd332a25cb902a220aa020e82cb0794ef (patch)
treeec3300ec270aed74b7a510fee5b390aec7e4c695 /gui/ThemeParser.h
parent6932c836cfb5f02565feb4700f42633ed5c84d68 (diff)
downloadscummvm-rg350-42036e7fd332a25cb902a220aa020e82cb0794ef.tar.gz
scummvm-rg350-42036e7fd332a25cb902a220aa020e82cb0794ef.tar.bz2
scummvm-rg350-42036e7fd332a25cb902a220aa020e82cb0794ef.zip
Expanded parser.
Added regex support for Common::String Changed drawstep state saving. svn-id: r32729
Diffstat (limited to 'gui/ThemeParser.h')
-rw-r--r--gui/ThemeParser.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/ThemeParser.h b/gui/ThemeParser.h
index 956a6d1df2..c5ee55dbbf 100644
--- a/gui/ThemeParser.h
+++ b/gui/ThemeParser.h
@@ -34,6 +34,8 @@
#include "common/hash-str.h"
#include "common/stack.h"
+#include "graphics/VectorRenderer.h"
+
/**
*********************************************
** Theme Description File format overview. **
@@ -302,10 +304,13 @@ func = "fill"
namespace GUI {
+using namespace Graphics;
+
class ThemeParser {
static const int kParserMaxDepth = 4;
typedef void (ThemeParser::*ParserCallback)();
+ typedef void (VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, const DrawStep &);
public:
ThemeParser() {
@@ -337,6 +342,8 @@ protected:
void parseActiveKey(bool closed);
void parserError(const char *errorString);
+ Graphics::DrawStep *newDrawStep();
+
inline bool skipSpaces() {
if (!isspace(_text[_pos]))
return false;
@@ -395,7 +402,9 @@ protected:
};
Common::FixedStack<ParserNode*, kParserMaxDepth> _activeKey;
+
Common::HashMap<Common::String, ParserCallback, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _callbacks;
+ Common::HashMap<Common::String, DrawingFunctionCallback, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _drawFunctions;
};
}