From 780cd39e422943f7c46be84de5494ae7045e1a5e Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 21 Jul 2014 15:24:39 -0500 Subject: 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 --- gui/pages.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gui/pages.hpp') diff --git a/gui/pages.hpp b/gui/pages.hpp index a9cc0c1d0..c384cf0d7 100644 --- a/gui/pages.hpp +++ b/gui/pages.hpp @@ -35,7 +35,7 @@ class HardwareKeyboard; class Page { public: - Page(xml_node<>* page, xml_node<>* templates = NULL); + Page(xml_node<>* page, std::vector*> *templates = NULL); virtual ~Page(); std::string GetName(void) { return mName; } @@ -61,7 +61,7 @@ protected: COLOR mBackground; protected: - bool ProcessNode(xml_node<>* page, xml_node<>* templates = NULL, int depth = 0); + bool ProcessNode(xml_node<>* page, std::vector*> *templates = NULL, int depth = 0); }; class PageSet @@ -72,6 +72,7 @@ public: 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 @@ public: 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 @@ protected: xml_document<> mDoc; ResourceManager* mResources; std::vector mPages; + std::vector*> templates; Page* mCurrentPage; Page* mOverlayPage; // This is a special case, used for "locking" the screen }; -- cgit v1.2.3