Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/IGUIObject.h
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | class IGUIObject | ||||
friend class CGUI; | friend class CGUI; | ||||
friend class IGUIScrollBar; | friend class IGUIScrollBar; | ||||
friend class GUITooltip; | friend class GUITooltip; | ||||
// Allow getProperty to access things like GetParent() | // Allow getProperty to access things like GetParent() | ||||
friend bool JSI_IGUIObject::getProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp); | friend bool JSI_IGUIObject::getProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, JS::MutableHandleValue vp); | ||||
friend bool JSI_IGUIObject::setProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, bool UNUSED(strict), JS::MutableHandleValue vp); | friend bool JSI_IGUIObject::setProperty(JSContext* cx, JS::HandleObject obj, JS::HandleId id, bool UNUSED(strict), JS::MutableHandleValue vp); | ||||
friend bool JSI_IGUIObject::getComputedSize(JSContext* cx, uint argc, JS::Value* vp); | friend bool JSI_IGUIObject::getComputedSize(JSContext* cx, uint argc, JS::Value* vp); | ||||
friend bool JSI_IGUIObject::getTextSize(JSContext* cx, uint argc, JS::Value* vp); | |||||
public: | public: | ||||
IGUIObject(CGUI* pGUI); | IGUIObject(CGUI* pGUI); | ||||
virtual ~IGUIObject(); | virtual ~IGUIObject(); | ||||
/** | /** | ||||
* Checks if mouse is hovering this object. | * Checks if mouse is hovering this object. | ||||
* The mouse position is cached in CGUI. | * The mouse position is cached in CGUI. | ||||
▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | public: | ||||
CGUI* GetGUI() { return m_pGUI; } | CGUI* GetGUI() { return m_pGUI; } | ||||
const CGUI* GetGUI() const { return m_pGUI; } | const CGUI* GetGUI() const { return m_pGUI; } | ||||
/** | /** | ||||
* Take focus! | * Take focus! | ||||
*/ | */ | ||||
void SetFocus(); | void SetFocus(); | ||||
/** | |||||
* Workaround to avoid a dynamic_cast which can be 80 times slower than this. | |||||
*/ | |||||
virtual void* GetTextOwner() { return nullptr; } | |||||
protected: | protected: | ||||
/** | /** | ||||
* Check if object is focused. | * Check if object is focused. | ||||
*/ | */ | ||||
bool IsFocused() const; | bool IsFocused() const; | ||||
/** | /** | ||||
* <b>NOTE!</b> This will not just return m_pParent, when that is | * <b>NOTE!</b> This will not just return m_pParent, when that is | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator