Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectBases/IGUIObject.h
Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | protected: | ||||
* | * | ||||
* @param eventName Name of action | * @param eventName Name of action | ||||
*/ | */ | ||||
void ScriptEvent(const CStr& eventName); | void ScriptEvent(const CStr& eventName); | ||||
/** | /** | ||||
* Execute the script for a particular action. | * Execute the script for a particular action. | ||||
* Does nothing if no script has been registered for that action. | * Does nothing if no script has been registered for that action. | ||||
* The mouse coordinates will be passed as the first argument. | |||||
* | |||||
* @param eventName Name of action | |||||
* | |||||
* @return True if the script returned something truthy. | |||||
*/ | |||||
bool ScriptEventWithReturn(const CStr& eventName); | |||||
/** | |||||
* Execute the script for a particular action. | |||||
* Does nothing if no script has been registered for that action. | |||||
* | * | ||||
* @param eventName Name of action | * @param eventName Name of action | ||||
* @param paramData JS::HandleValueArray arguments to pass to the event. | * @param paramData JS::HandleValueArray arguments to pass to the event. | ||||
*/ | */ | ||||
void ScriptEvent(const CStr& eventName, const JS::HandleValueArray& paramData); | void ScriptEvent(const CStr& eventName, const JS::HandleValueArray& paramData); | ||||
/** | /** | ||||
* Execute the script for a particular action. | |||||
* Does nothing if no script has been registered for that action. | |||||
* | |||||
* @param eventName Name of action | |||||
* @param paramData JS::HandleValueArray arguments to pass to the event. | |||||
* | |||||
* @return True if the script returned something truthy. | |||||
*/ | |||||
bool ScriptEventWithReturn(const CStr& eventName, const JS::HandleValueArray& paramData); | |||||
/** | |||||
* Assigns a JS function to the event name. | * Assigns a JS function to the event name. | ||||
*/ | */ | ||||
void SetScriptHandler(const CStr& eventName, JS::HandleObject Function); | void SetScriptHandler(const CStr& eventName, JS::HandleObject Function); | ||||
/** | /** | ||||
* Deletes an event handler assigned to the given name, if such a handler exists. | * Deletes an event handler assigned to the given name, if such a handler exists. | ||||
*/ | */ | ||||
void UnsetScriptHandler(const CStr& eventName); | void UnsetScriptHandler(const CStr& eventName); | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator