Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CGUI.h
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | public: | ||||
* Resolve the predefined color if it exists, otherwise throws an exception. | * Resolve the predefined color if it exists, otherwise throws an exception. | ||||
*/ | */ | ||||
const CGUIColor& GetPreDefinedColor(const CStr& name) const { return m_PreDefinedColors.at(name); } | const CGUIColor& GetPreDefinedColor(const CStr& name) const { return m_PreDefinedColors.at(name); } | ||||
GUIProxyProps* GetProxyData(const js::BaseProxyHandler* ptr) { return m_ProxyData.at(ptr).get(); } | GUIProxyProps* GetProxyData(const js::BaseProxyHandler* ptr) { return m_ProxyData.at(ptr).get(); } | ||||
shared_ptr<ScriptInterface> GetScriptInterface() { return m_ScriptInterface; }; | shared_ptr<ScriptInterface> GetScriptInterface() { return m_ScriptInterface; }; | ||||
/** | |||||
* The CGUI creates the object and adds it as a child to parent. | |||||
* To the created object, this is the same as being created on page open (same events, etc.) | |||||
*/ | |||||
IGUIObject* CreateChild(const XMBData& file, const XMBElement& element, IGUIObject* parent); | |||||
/** | |||||
* Detach the object from its parent and delete it. | |||||
* The object must have a parent - use PopPage to delete the root page object. | |||||
*/ | |||||
void DetachAndDeleteChild(IGUIObject* child); | |||||
private: | private: | ||||
/** | /** | ||||
* The CGUI takes ownership of the child object and links the parent with the child. | * The CGUI takes ownership of the child object and links the parent with the child. | ||||
* Returns false on failure to take over ownership of the child object. | * Returns false on failure to take over ownership of the child object. | ||||
*/ | */ | ||||
bool AddObject(IGUIObject& parent, IGUIObject& child); | bool AddObject(IGUIObject& parent, IGUIObject& child); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 425 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator