wxArt2D

wxLua

As scripting language in wxArt2D, wxLua was chosen. wxLua is used to wrap commands in wxArt2D as functions in wxLua. The great thing about wxLua is that it becomes part of the executable. There is no libraries are install problems, its just completely integrated with your application. Wrapping as also very easy. You have to create a wrapfile.i containing prototypes of the classes and functions you need. Next a few scripts will take care of generating all the C++ code needed to wrap your functions. After compiling this will give you a library in case of wxArt2D. But you can directly make it part of your application. In the end, inside your main or wxApp class you initialize your wrapping module. Next you setup a wxLua interpreter, and with that you can load wxLua scripts containing commands/functions to do something in wxArt2D. So you can automate things in wxArt2D. It can e.g. be used to make extremely flexible configuration files. You can also make a commandline ineterface to your application, where user can call commands directly, or load scripts to execute. The scripts can contain complicated dialogs and ask information from the users. You can even draw objects from the scripts to fill a2dCanvasDocuments.

In the future, it will be possible to have a2dCanvasObject`s which have a drawing based on a wxLua script. Parameters will be interfaced to wxLua, which will draw the objects based on the current parameters. That way you can make libraries of objects, which are in principle defined with wxLua scripts.

wxArt2D: wxLua (last edited 2008-08-15 10:00:36 by KlaasHolwerda)