Abstract interface required for all scripting support modules to be used with the CEGUI system.
More...
+ Inheritance diagram for CEGUI::ScriptModule:
+ Collaboration diagram for CEGUI::ScriptModule:
Public Member Functions
Execute a scripted global function. The function should not take any parameters and should return an integer.
More...
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.
More...
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.
More...
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.
More...
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.
More...
Subscribes the specified group of the named
Event to a scripted funtion.
More...
Static Public Member Functions
Sets the default resource group to be used when loading script files.
More...
Returns the default resource group used when loading script files.
More...
Protected Attributes
String that holds some id information about the module.
Static Protected Attributes
holds the default resource group ID for loading script files.
Detailed Description
Abstract interface required for all scripting support modules to be used with the CEGUI system.
Member Function Documentation
virtual void CEGUI::ScriptModule::createBindings
(
void
)
inlinevirtual
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.
- Returns
- Nothing.
Reimplemented in CEGUI::LuaScriptModule.
virtual void CEGUI::ScriptModule::destroyBindings
(
void
)
inlinevirtual
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.
- Returns
- Nothing.
Reimplemented in CEGUI::LuaScriptModule.
virtual bool CEGUI::ScriptModule::executeScriptedEventHandler
(
const
String &
handler_name,
)
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.
- Parameters
-
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.
- Returns
- true if the event was handled.
- false if the event was not handled.
Implemented in CEGUI::LuaScriptModule.
virtual void CEGUI::ScriptModule::executeScriptFile
(
const
String &
filename,
const
String &
resourceGroup =
""
)
pure virtual
Execute a script file.
- Parameters
-
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.
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.
- Parameters
-
function_name
String object holding the name of the function, in the global script environment, that is to be executed.
- Returns
- The integer value returned from the script function.
Implemented in CEGUI::LuaScriptModule.
virtual void CEGUI::ScriptModule::executeString
(
const
String &
str )
pure virtual
static const
String& CEGUI::ScriptModule::getDefaultResourceGroup
(
void
)
inlinestatic
Returns the default resource group used when loading script files.
- Returns
- String describing the default resource group identifier..
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.
- Returns
- String object holding a string that identifies the ScriptModule in use.
static void CEGUI::ScriptModule::setDefaultResourceGroup
(
const
String &
resourceGroup )
inlinestatic
Sets the default resource group to be used when loading script files.
- Parameters
-
resourceGroup
String describing the default resource group identifier to be used.
- Returns
- Nothing.
const
String &
subscriber_name
)
pure virtual
Subscribes the named Event to a scripted funtion.
- Parameters
-
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.
- Returns
- Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event.
- Exceptions
-
Implemented in CEGUI::LuaScriptModule.
const
String &
subscriber_name
)
pure virtual
Subscribes the specified group of the named Event to a scripted funtion.
- Parameters
-
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.
- Returns
- Connection object that can be used to check the status of the Event connection and to disconnect (unsubscribe) from the Event.
- Exceptions
-
Implemented in CEGUI::LuaScriptModule.