#include <jsscripting.h>

Public Member Functions | |
| JSScriptingModule (const MODULE_ID &_id, const wxString &_name, EventHandler *msgSink) | |
| Class constructor. | |
| virtual | ~JSScriptingModule () |
| Class destructor - deinitialize data. | |
| virtual wxString | GetDesc () const |
| Always overload method giving description for your module. | |
Protected Member Functions | |
| virtual void | processEvent (wxCommandEvent &evt) |
| Events processing. | |
| virtual void | kernelRun () |
| Actions in the kernel loop. | |
Protected Attributes | |
| unsigned | scriptActivation |
| The script activity flag. | |
| JSHandler * | handler |
| JS processing class. | |
| SCENE_ID | sceneID |
| The scene identification number for script. | |
| wxString | scriptPath |
| The Script path. | |
| Parameter::ParameterIdentificator | sceneParamID |
Parameter scene. | |
| Parameter::ParameterIdentificator | pathParamID |
Parameter path. | |
| Parameter::ParameterIdentificator | runParamID |
Parameter run. | |
Friends | |
| class | JSHandler |
Definition at line 25 of file jsscripting.h.
| JSScriptingModule::JSScriptingModule | ( | const MODULE_ID & | _id, | |
| const wxString & | _name, | |||
| EventHandler * | msgSink | |||
| ) |
Class constructor.
Create JSHandler for executing the script
Registering params
Registering all events listening
Definition at line 21 of file jsscripting.cpp.
00022 : 00023 KernelModule(_id, _name, 0, msgSink) 00024 { 00026 handler = new JSHandler(this); 00027 00029 sceneID = 0; 00030 scriptPath = wxT("../modules/scripting/scripts/test.js"); 00031 REGISTER_PARAM_GUI_TEXTCONTROL(sceneParamID, wxT("sceneID"), wxT("0"), wxT("ID of scene to handle.")); 00032 REGISTER_PARAM_GUI_TEXTCONTROL(pathParamID, wxT("scriptPath"), scriptPath, wxT("Path of the script.")); 00033 REGISTER_PARAM_GUI_BUTTON(runParamID, wxT("runScript"), wxT("runScript")); 00034 00036 kernelMsgSink->UnregisterListener(GetID()); 00037 REGISTER_LISTENER(Event::EVT_ALL); 00038 //REGISTER_LISTENER(Event::EVT_SCENE_NODE_INSERTED); 00039 }
| JSScriptingModule::~JSScriptingModule | ( | ) | [virtual] |
Class destructor - deinitialize data.
Class destructor.
Definition at line 42 of file jsscripting.cpp.
00043 { 00044 delete handler; 00045 }
| void JSScriptingModule::processEvent | ( | wxCommandEvent & | evt | ) | [protected, virtual] |
Events processing.
Calling the base method
Calling script synchronizer - checking waiting for event
Reimplemented from VRUT::Module.
Definition at line 48 of file jsscripting.cpp.
00049 { 00051 Module::processEvent(evt); 00052 00054 handler->ProcessEvent(evt); 00055 while (handler->RunScript()) 00056 continue; 00057 00058 }
| void JSScriptingModule::kernelRun | ( | ) | [protected, virtual] |
Actions in the kernel loop.
Kernel thread method.
Implements VRUT::KernelModule.
Definition at line 62 of file jsscripting.cpp.
| virtual wxString VRUT::JSScriptingModule::GetDesc | ( | ) | const [inline, virtual] |
Always overload method giving description for your module.
Implements VRUT::Module.
Definition at line 62 of file jsscripting.h.
friend class JSHandler [friend] |
Definition at line 68 of file jsscripting.h.
unsigned VRUT::JSScriptingModule::scriptActivation [protected] |
JSHandler* VRUT::JSScriptingModule::handler [protected] |
SCENE_ID VRUT::JSScriptingModule::sceneID [protected] |
wxString VRUT::JSScriptingModule::scriptPath [protected] |
1.5.5