Changeset View
Changeset View
Standalone View
Standalone View
source/gui/IGUIObject.cpp
Show First 20 Lines • Show All 446 Lines • ▼ Show 20 Lines | |||||
bool IGUIObject::IsFocused() const | bool IGUIObject::IsFocused() const | ||||
{ | { | ||||
return m_pGUI->GetFocusedObject() == this; | return m_pGUI->GetFocusedObject() == this; | ||||
} | } | ||||
bool IGUIObject::IsRootObject() const | bool IGUIObject::IsRootObject() const | ||||
{ | { | ||||
return m_pParent == m_pGUI->GetBaseObject(); | return m_pParent == &m_pGUI->GetBaseObject(); | ||||
} | } | ||||
void IGUIObject::TraceMember(JSTracer* trc) | void IGUIObject::TraceMember(JSTracer* trc) | ||||
{ | { | ||||
// Please ensure to adapt the Tracer enabling and disabling in accordance with the GC things traced! | // Please ensure to adapt the Tracer enabling and disabling in accordance with the GC things traced! | ||||
for (std::pair<const CStr, JS::Heap<JSObject*>>& handler : m_ScriptHandlers) | for (std::pair<const CStr, JS::Heap<JSObject*>>& handler : m_ScriptHandlers) | ||||
JS_CallObjectTracer(trc, &handler.second, "IGUIObject::m_ScriptHandlers"); | JS_CallObjectTracer(trc, &handler.second, "IGUIObject::m_ScriptHandlers"); | ||||
} | } | ||||
// Instantiate templated functions: | // Instantiate templated functions: | ||||
#define TYPE(T) template void IGUIObject::AddSetting<T>(const CStr& Name); | #define TYPE(T) template void IGUIObject::AddSetting<T>(const CStr& Name); | ||||
#include "GUItypes.h" | #include "GUItypes.h" | ||||
#undef TYPE | #undef TYPE |
Wildfire Games · Phabricator