| Categories: wrapper,miscellaneous | Status: BETA |  |
| Author: Francesco Montorsi | wxWidgets supported ports: all |
| Current maintainer: Francesco Montorsi | wxWidgets supported versions: 2.4, 2.5, 2.6 |
| Latest version: 1.0 | Build system: Bakefile-based |
| Programming language: C++ | Samples provided: 2 |
| External dependencies: python, lua and tolua, underc, cint (all optional) | Documentation: doxygen |
|
| Description: A set of abstract classes to add a script-interpreter support to your wxWidgets applications/libraries. The implementation of these interfaces for the Lua, Python, UnderC and CINT interpreters (these two are C/C++ intepreters) are provided.
The advantage of a single basic interface makes extremely easy for the programmer not only to add scripting support to its program but also to give the user multi-scripting languages support, learning how to use a single set of powerful classes: wxPython, wxLua, wxUnderC and wxCINT.
These classes are easily extensible and they support Unicode as well. |
|
| Links for wxScript: › Website | › Screenshots | › Documentation | › Browse Subversion | › Download | › Edit this component's info (for maintainers only) |
wxScript usage sample | ^ TOP |
wxString filename(basepath + wxT("myscript"));
wxScriptFile *pf = wxScriptInterpreter::Load(filename, wxRECOGNIZE_FROM_EXTENSION);
if (pf == NULL) {
wxPrintf(wxT(">Failed to load '%s'.\n"), filename.c_str());
return;
}
wxScriptFunctionArray arr;
wxScriptInterpreter::GetTotalFunctionList(arr);
wxScriptFunction *func = arr.Get(wxT("main"));
if (func == NULL) return;
wxScriptVar result;
wxScriptVar args[2];
args[0].Set(wxT("char*"), wxT("my string"));
if (!func->Exec(result, args)) return;
wxString str(result.GetContentString());
The doxygen-generated documentation for this component is available online
here. Please let me know if you think something is missing.
None. To submit a bug report please look at wxCode FAQ.
None. To submit a feature request please look at wxCode FAQ.