Public Member Functions | |
ScriptModule (void) | |
Constructor for ScriptModule base class. | |
virtual | ~ScriptModule (void) |
Destructor for ScriptModule base class. | |
virtual void | executeScriptFile (const String &filename, const String &resourceGroup="")=0 |
Execute a script file. | |
virtual int | executeScriptGlobal (const String &function_name)=0 |
Execute a scripted global function. The function should not take any parameters and should return an integer. | |
virtual bool | executeScriptedEventHandler (const String &handler_name, const EventArgs &e)=0 |
Execute a scripted global 'event handler' function. The function should take some kind of EventArgs like parameter that the concrete implementation of this function can create from the passed EventArgs based object. The function should not return anything. | |
virtual void | executeString (const String &str)=0 |
Execute script code contained in the given CEGUI::String object. | |
virtual void | createBindings (void) |
Method called during system initialisation, prior to running any scripts via the ScriptModule, to enable the ScriptModule to perform any operations required to complete initialisation or binding of the script language to the gui system objects. | |
virtual void | destroyBindings (void) |
Method called during system destruction, after all scripts have been run via the ScriptModule, to enable the ScriptModule to perform any operations required to cleanup bindings of the script language to the gui system objects, as set-up in the earlier createBindings call. | |
const String & | getIdentifierString () const |
Return identification string for the ScriptModule. If the internal id string has not been set by the ScriptModule creator, a generic string of "Unknown scripting module" will be returned. | |
const String & | getLanguage () const |
Return an string which identifies the language of this module. /return String object holding a string that identifies the languge of the module. | |
virtual Event::Connection | subscribeEvent (EventSet *target, const String &name, const String &subscriber_name)=0 |
Subscribes the named Event to a scripted funtion. | |
virtual Event::Connection | subscribeEvent (EventSet *target, const String &name, Event::Group group, const String &subscriber_name)=0 |
Subscribes the specified group of the named Event to a scripted funtion. | |
Static Public Member Functions | |
static void | setDefaultResourceGroup (const String &resourceGroup) |
Sets the default resource group to be used when loading script files. | |
static const String & | getDefaultResourceGroup () |
Returns the default resource group used when loading script files. | |
Protected Attributes | |
String | d_identifierString |
String that holds some id information about the module. | |
String | d_language |
String that holds a string containing the languge of the scripting modue. | |
Static Protected Attributes | |
static String | d_defaultResourceGroup |
holds the default resource group ID for loading script files. |
virtual void CEGUI::ScriptModule::createBindings | ( | void | ) | [inline, virtual] |
Method called during system initialisation, prior to running any scripts via the ScriptModule, to enable the ScriptModule to perform any operations required to complete initialisation or binding of the script language to the gui system objects.
Reimplemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::System::setScriptingModule(), and CEGUI::System::System().
virtual void CEGUI::ScriptModule::destroyBindings | ( | void | ) | [inline, virtual] |
Method called during system destruction, after all scripts have been run via the ScriptModule, to enable the ScriptModule to perform any operations required to cleanup bindings of the script language to the gui system objects, as set-up in the earlier createBindings call.
Reimplemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::System::setScriptingModule(), and CEGUI::System::~System().
virtual bool CEGUI::ScriptModule::executeScriptedEventHandler | ( | const String & | handler_name, | |
const EventArgs & | e | |||
) | [pure virtual] |
Execute a scripted global 'event handler' function. The function should take some kind of EventArgs like parameter that the concrete implementation of this function can create from the passed EventArgs based object. The function should not return anything.
handler_name | String object holding the name of the scripted handler function. | |
e | EventArgs based object that should be passed, by any appropriate means, to the scripted function. |
Implemented in CEGUI::LuaScriptModule.
virtual void CEGUI::ScriptModule::executeScriptFile | ( | const String & | filename, | |
const String & | resourceGroup = "" | |||
) | [pure virtual] |
Execute a script file.
filename | String object holding the filename of the script file that is to be executed | |
resourceGroup | Resource group idendifier to be passed to the ResourceProvider when loading the script file. |
Implemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::System::executeScriptFile().
virtual int CEGUI::ScriptModule::executeScriptGlobal | ( | const String & | function_name | ) | [pure virtual] |
Execute a scripted global function. The function should not take any parameters and should return an integer.
function_name | String object holding the name of the function, in the global script environment, that is to be executed. |
Implemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::System::executeScriptGlobal().
virtual void CEGUI::ScriptModule::executeString | ( | const String & | str | ) | [pure virtual] |
Execute script code contained in the given CEGUI::String object.
str | String object holding the valid script code that should be executed. |
Implemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::System::executeScriptString().
static const String& CEGUI::ScriptModule::getDefaultResourceGroup | ( | void | ) | [inline, static] |
Returns the default resource group used when loading script files.
const String & CEGUI::ScriptModule::getIdentifierString | ( | ) | const |
Return identification string for the ScriptModule. If the internal id string has not been set by the ScriptModule creator, a generic string of "Unknown scripting module" will be returned.
References d_identifierString.
Referenced by CEGUI::System::setScriptingModule().
static void CEGUI::ScriptModule::setDefaultResourceGroup | ( | const String & | resourceGroup | ) | [inline, static] |
Sets the default resource group to be used when loading script files.
resourceGroup | String describing the default resource group identifier to be used. |
virtual Event::Connection CEGUI::ScriptModule::subscribeEvent | ( | EventSet * | target, | |
const String & | name, | |||
Event::Group | group, | |||
const String & | subscriber_name | |||
) | [pure virtual] |
Subscribes the specified group of the named Event to a scripted funtion.
target | The target EventSet for the subscription. | |
name | String object containing the name of the Event to subscribe to. | |
group | Group which is to be subscribed to. Subscription groups are called in ascending order. | |
subscriber_name | String object containing the name of the script funtion that is to be subscribed to the Event. |
UnknownObjectException | Thrown if an Event named name is not in the EventSet |
Implemented in CEGUI::LuaScriptModule.
virtual Event::Connection CEGUI::ScriptModule::subscribeEvent | ( | EventSet * | target, | |
const String & | name, | |||
const String & | subscriber_name | |||
) | [pure virtual] |
Subscribes the named Event to a scripted funtion.
target | The target EventSet for the subscription. | |
name | String object containing the name of the Event to subscribe to. | |
subscriber_name | String object containing the name of the script funtion that is to be subscribed to the Event. |
UnknownObjectException | Thrown if an Event named name is not in the EventSet |
Implemented in CEGUI::LuaScriptModule.
Referenced by CEGUI::EventSet::subscribeScriptedEvent().