summaryrefslogtreecommitdiffstats
path: root/gui/pages.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/pages.hpp')
-rw-r--r--gui/pages.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gui/pages.hpp b/gui/pages.hpp
index 927f3fc01..4bfd5b0e5 100644
--- a/gui/pages.hpp
+++ b/gui/pages.hpp
@@ -88,16 +88,18 @@ protected:
bool ProcessNode(xml_node<>* page, std::vector<xml_node<>*> *templates, int depth);
};
+struct LoadingContext;
+
class PageSet
{
public:
- PageSet(const char* xmlFile);
+ PageSet();
virtual ~PageSet();
public:
+ int Load(LoadingContext& ctx, const std::string& filename);
int LoadLanguage(char* languageFile, ZipArchive* package);
- int Load(ZipArchive* package, char* xmlFile, char* languageFile, char* baseLanguageFile);
- int CheckInclude(ZipArchive* package, xml_document<> *parentDoc);
+ void MakeEmergencyConsoleIfNeeded();
Page* FindPage(std::string name);
int SetPage(std::string page);
@@ -117,17 +119,16 @@ public:
int SetKeyBoardFocus(int inFocus);
int NotifyVarChange(std::string varName, std::string value);
- std::vector<xml_node<>*> styles;
void AddStringResource(std::string resource_source, std::string resource_name, std::string value);
protected:
- int LoadPages(xml_node<>* pages);
+ int LoadDetails(LoadingContext& ctx, xml_node<>* root);
+ int LoadPages(LoadingContext& ctx, xml_node<>* pages);
int LoadVariables(xml_node<>* vars);
protected:
ResourceManager* mResources;
std::vector<Page*> mPages;
- std::vector<xml_node<>*> templates;
Page* mCurrentPage;
std::vector<Page*> mOverlays; // Special case for popup dialogs and the lock screen
};
@@ -187,6 +188,7 @@ protected:
static HardwareKeyboard *mHardwareKeyboard;
static bool mReloadTheme;
static std::string mStartPage;
+ static LoadingContext* currentLoadingContext;
};
#endif // _PAGES_HEADER_HPP