18 #ifndef INCLUDED_GUIMANAGER 19 #define INCLUDED_GUIMANAGER 21 #include <boost/unordered_set.hpp> 76 void PushPage(
const CStrW& pageName, shared_ptr<ScriptInterface::StructuredClone> initData);
83 void PopPageCB(shared_ptr<ScriptInterface::StructuredClone> args);
88 void DisplayMessageBox(
int width,
int height,
const CStrW& title,
const CStrW& message);
164 shared_ptr<ScriptInterface::StructuredClone>
initData;
172 shared_ptr<CGUI>
top()
const;
188 #endif // INCLUDED_GUIMANAGER An entity initialisation parameter node.
Definition: ParamNode.h:148
JSContext * cx
Definition: GUIManager.h:163
Template loader: Handles the loading of entity template files for:
Definition: TemplateLoader.h:45
void LoadPage(SGUIPage &page)
Definition: GUIManager.cpp:181
shared_ptr< ScriptInterface > GetScriptInterface()
Definition: GUIManager.h:54
void PopPage()
Unload the currently active GUI page, and make the previous page active.
Definition: GUIManager.cpp:105
PageStackType m_PageStack
Definition: GUIManager.h:179
CStrW name
Definition: GUIManager.h:160
Definition: GUIManager.h:158
Status ReloadAllPages()
Called when we should reload all pages (e.g.
Definition: GUIManager.cpp:296
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
Definition: IGUIObject.h:117
void RestoreSavedGameData(const std::string &jsonData)
Definition: GUIManager.cpp:322
boost::unordered_set< VfsPath > inputs
Definition: GUIManager.h:161
void UpdateResolution()
See CGUI::UpdateResolution; applies to all loaded pages.
Definition: GUIManager.cpp:425
std::vector< SGUIPage > PageStackType
Definition: GUIManager.h:178
The main object that represents a whole GUI page.
Definition: CGUI.h:75
shared_ptr< ScriptRuntime > GetRuntime()
Definition: GUIManager.h:58
~CGUIManager()
Definition: GUIManager.cpp:72
std::string GetSavedGameData()
Calls the current page's script function getSavedGameData() and returns the result.
Definition: GUIManager.cpp:310
output
Definition: tests.py:116
bool TemplateExists(const std::string &templateName) const
Check if a template with this name exists.
Definition: GUIManager.cpp:431
IGUIObject * FindObjectByName(const CStr &name) const
See CGUI::FindObjectByName; applies to the currently active page.
Definition: GUIManager.cpp:383
shared_ptr< ScriptInterface > m_ScriptInterface
Definition: GUIManager.h:176
void PopPageCB(shared_ptr< ScriptInterface::StructuredClone > args)
Definition: GUIManager.cpp:116
void TickObjects()
See CGUI::TickObjects; applies to all loaded pages.
Definition: GUIManager.cpp:398
i64 Status
Error handling system.
Definition: status.h:171
const CParamNode & GetTemplate(const std::string &templateName)
Retrieve the requested template, used for displaying faction specificities.
Definition: GUIManager.cpp:436
void DisplayMessageBox(int width, int height, const CStrW &title, const CStrW &message)
Display a modal message box with an "OK" button.
Definition: GUIManager.cpp:164
void ResetCursor()
Sets the default mouse pointer.
Definition: GUIManager.cpp:305
CStrW callbackPageName
Definition: GUIManager.h:165
CGUIManager * g_GUI
Definition: GUIManager.cpp:33
bool GetPreDefinedColor(const CStr &name, CColor &output) const
See CGUI::GetPreDefinedColor; applies to the currently active page.
Definition: GUIManager.cpp:378
void SendEventToAll(const CStr &eventName) const
See CGUI::SendEventToAll; applies to the currently active page.
Definition: GUIManager.cpp:393
Definition: GUIbase.h:144
void PushPage(const CStrW &pageName, shared_ptr< ScriptInterface::StructuredClone > initData)
Load a new GUI page and make it active.
Definition: GUIManager.cpp:95
shared_ptr< ScriptRuntime > m_ScriptRuntime
Definition: GUIManager.h:175
Abstraction around a SpiderMonkey JSContext.
Definition: ScriptInterface.h:71
void Draw()
See CGUI::Draw; applies to all loaded pages.
Definition: GUIManager.cpp:417
shared_ptr< CGUI > gui
Definition: GUIManager.h:167
void SwitchPage(const CStrW &name, ScriptInterface *srcScriptInterface, JS::HandleValue initData)
Load a new GUI page and make it active.
Definition: GUIManager.cpp:82
shared_ptr< CGUI > top() const
Definition: GUIManager.cpp:448
External interface to the GUI system.
Definition: GUIManager.h:47
shared_ptr< CGUI > m_CurrentGUI
Definition: GUIManager.h:174
CTemplateLoader m_TemplateLoader
Definition: GUIManager.h:181
CGUIManager()
Definition: GUIManager.cpp:57
bool HasPages()
Returns whether there are any current pages.
Definition: GUIManager.cpp:77
shared_ptr< ScriptInterface::StructuredClone > initData
Definition: GUIManager.h:164
Status ReloadChangedFile(const VfsPath &path)
Called when a file has been modified, to hotload changes.
Definition: GUIManager.cpp:283
InReaction HandleEvent(const SDL_Event_ *ev)
Pass input events to the currently active GUI page.
Definition: GUIManager.cpp:334
InReaction gui_handler(const SDL_Event_ *ev)
Definition: GUIManager.cpp:46
shared_ptr< CGUI > GetActiveGUI()
Definition: GUIManager.h:59