3 #include <unordered_map>
19 using std::unordered_map;
72 static const string getRootNode(
const string& pathName,
const string& fileName);
92 static GUIScreenNode*
parse(
const string& pathName,
const string& fileName,
const unordered_map<string, string>& variables = {},
const EngineMiniScript::ScriptVariable& miniScriptArguments = EngineMiniScript::ScriptVariable(),
Context* context =
nullptr);
106 static GUIScreenNode*
parse(
const string& xml,
const unordered_map<string, string>& variables = {},
const string& pathName = string(),
const string& fileName = string(),
const EngineMiniScript::ScriptVariable& miniScriptArguments = EngineMiniScript::ScriptVariable(),
Context* context =
nullptr);
116 static void parse(
GUIParentNode* parentNode,
const string& pathName,
const string& fileName);
207 static int parseInteger(
const string& value,
int defaultValue);
223 static const string getInnerXml(
const string& xml);
230 static const string unescape(
const string& str);
237 static const string escape(
const string& str);
static void parseEffects(GUINode *guiNode, TiXmlElement *xmlParentNode)
Parse GUI effect.
static void parseInnerXML(GUIParentNode *guiParentNode, const string &parentElementId, TiXmlElement *node, const string &innerXML, const unordered_map< string, string > &attributes, GUIElement *guiElement)
Parse inner XML.
static const string getInnerXml(TiXmlElement *node)
Get inner XML.
static const string unescape(const string &str)
Unescape quotes and other special html characters.
static void initialize()
Initialize GUI elements.
static GUIScreenNode * parse(const string &xml, const unordered_map< string, string > &variables={}, const string &pathName=string(), const string &fileName=string(), const EngineMiniScript::ScriptVariable &miniScriptArguments=EngineMiniScript::ScriptVariable(), Context *context=nullptr)
Parses a GUI XML content.
static const Properties * getEngineThemeProperties()
static STATIC_DLL_IMPEXT Properties projectThemeProperties
static const Properties * getProjectThemeProperties()
static void addElement(GUIElement *guiElement)
Add GUI element.
static int parseInteger(const string &value, int defaultValue)
Parse integer.
static STATIC_DLL_IMPEXT unordered_map< string, GUIElement * > elements
static int parseFactor(GUIParentNode *guiParentNode, const string &factor)
Parse factor.
static void parseGUINode(GUIParentNode *guiParentNode, const string &parentElementId, TiXmlElement *xmlParentNode, GUIElement *guiElement)
Parse GUI node.
static const string escape(const string &str)
Escape quotes and other special html characters.
static void dispose()
Dispose GUI elements.
static GUIScreenNode * parse(const string &pathName, const string &fileName, const unordered_map< string, string > &variables={}, const EngineMiniScript::ScriptVariable &miniScriptArguments=EngineMiniScript::ScriptVariable(), Context *context=nullptr)
Parses a GUI XML file.
static const string getRootNode(const string &pathName, const string &fileName)
Parses a XML file and returns root node as string.
static void loadProjectThemeProperties(const string &pathName)
Load project theme properties.
static void parseTemplate(GUIParentNode *guiParentNode, const string &parentElementId, TiXmlElement *node, const string &templateXML, const unordered_map< string, string > &attributes, GUIElement *guiElement)
Parse template.
static constexpr int FONTSIZE_FALLBACK
static const vector< TiXmlElement * > getChildrenByTagName(TiXmlElement *parent, const char *name)
Returns immediate children tags.
static STATIC_DLL_IMPEXT Properties engineThemeProperties
static unordered_map< string, string > parseTemplateAttributes(const string &templateXML)
Parse template attributes.
static void parseEffect(GUINode *guiNode, const string &effectPrefix, bool requiresCondition, TiXmlElement *node)
Parse GUI effect.
GUI parent node base class thats supporting child nodes.
GUI screen node that represents a screen that can be rendered via GUI system.
Properties class, which helps out with storeing or loading key value pairs from/to property files.
The element is a container class.
#define STATIC_DLL_IMPEXT