Allow ui.xml to include additional xml files to read
Use common portrait and landscape xml files based on resolution
defined by the device.
Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
diff --git a/gui/pages.hpp b/gui/pages.hpp
index a9cc0c1..c384cf0 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -35,7 +35,7 @@
class Page
{
public:
- Page(xml_node<>* page, xml_node<>* templates = NULL);
+ Page(xml_node<>* page, std::vector<xml_node<>*> *templates = NULL);
virtual ~Page();
std::string GetName(void) { return mName; }
@@ -61,7 +61,7 @@
COLOR mBackground;
protected:
- bool ProcessNode(xml_node<>* page, xml_node<>* templates = NULL, int depth = 0);
+ bool ProcessNode(xml_node<>* page, std::vector<xml_node<>*> *templates = NULL, int depth = 0);
};
class PageSet
@@ -72,6 +72,7 @@
public:
int Load(ZipArchive* package);
+ int CheckInclude(ZipArchive* package, xml_document<> *parentDoc);
Page* FindPage(std::string name);
int SetPage(std::string page);
@@ -91,7 +92,7 @@
int NotifyVarChange(std::string varName, std::string value);
protected:
- int LoadPages(xml_node<>* pages, xml_node<>* templates = NULL);
+ int LoadPages(xml_node<>* pages);
int LoadVariables(xml_node<>* vars);
protected:
@@ -99,6 +100,7 @@
xml_document<> mDoc;
ResourceManager* mResources;
std::vector<Page*> mPages;
+ std::vector<xml_node<>*> templates;
Page* mCurrentPage;
Page* mOverlayPage; // This is a special case, used for "locking" the screen
};