18 #ifndef INCLUDED_GUIMANAGER
19 #define INCLUDED_GUIMANAGER
21 #include <boost/unordered_set.hpp>
80 void DisplayMessageBox(
int width,
int height,
const CStrW& title,
const CStrW& message);
156 shared_ptr<CGUI>
top()
const;
170 #endif // INCLUDED_GUIMANAGER
void LoadPage(SGUIPage &page)
InReaction gui_handler(const SDL_Event_ *ev)
void PopPage()
Unload the currently active GUI page, and make the previous page active.
PageStackType m_PageStack
CGUIManager(ScriptInterface &scriptInterface)
void PushPage(const CStrW &name, CScriptVal initData)
Load a new GUI page and make it active.
A trivial wrapper around a jsval.
bool GetPreDefinedColor(const CStr &name, CColor &output)
See CGUI::GetPreDefinedColor; applies to the currently active page.
Base settings, all objects possess these settings in their m_BaseSettings Instructions can be found i...
CScriptValRooted initData
boost::unordered_set< VfsPath > inputs
void UpdateResolution()
See CGUI::UpdateResolution; applies to all loaded pages.
std::vector< SGUIPage > PageStackType
The main object that represents a whole GUI page.
CScriptVal GetSavedGameData()
Calls the current page's script function getSavedGameData() and returns the result.
bool IconExists(const CStr &str) const
See CGUI::IconExists; applies to the currently active page.
SGUIIcon GetIcon(const CStr &str) const
See CGUI::GetIcon; applies to the currently active page.
IGUIObject * FindObjectByName(const CStr &name) const
See CGUI::FindObjectByName; applies to the currently active page.
JSObject * GetScriptObject()
See CGUI::GetScriptObject; applies to the currently active page.
void TickObjects()
See CGUI::TickObjects; applies to all loaded pages.
i64 Status
Error handling system.
void DisplayMessageBox(int width, int height, const CStrW &title, const CStrW &message)
Display a modal message box with an "OK" button.
ScriptInterface & GetScriptInterface()
void SwitchPage(const CStrW &name, CScriptVal initData)
Load a new GUI page and make it active.
Abstraction around a SpiderMonkey JSContext.
ScriptInterface & m_ScriptInterface
void Draw()
See CGUI::Draw; applies to all loaded pages.
shared_ptr< CGUI > top() const
External interface to the GUI system.
shared_ptr< CGUI > m_CurrentGUI
bool HasPages()
Returns whether there are any current pages.
InReaction HandleEvent(const SDL_Event_ *ev)
Pass input events to the currently active GUI page.
void SendEventToAll(const CStr &eventName)
See CGUI::SendEventToAll; applies to the currently active page.
Status ReloadChangedFiles(const VfsPath &path)
Call when a file has bee modified, to hotload pages if their .xml files changed.