summaryrefslogtreecommitdiffstats
path: root/gui/pages.hpp
diff options
context:
space:
mode:
authorthat <github@that.at>2016-03-13 17:51:28 +0100
committerDees Troy <dees_troy@teamw.in>2016-03-29 20:38:30 +0200
commit6a89459ec1210c9bff33f2e08f7d1c9712869b89 (patch)
tree116f48f80345bdeb4ed10a52457be3846e52ce07 /gui/pages.hpp
parentAllow restoring to read-only file system (diff)
downloadandroid_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar.gz
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar.bz2
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar.lz
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar.xz
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.tar.zst
android_bootable_recovery-6a89459ec1210c9bff33f2e08f7d1c9712869b89.zip
Diffstat (limited to '')
-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