From: John L. <jr...@us...> - 2006-05-14 00:40:59
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31140/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: add more docs add LuaDoString to math the other LuaDo functions rename EVT_LUA_CONSOLE to EVT_LUA_PRINT but use #defines for backwards compat Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** wxlstate.h 4 May 2006 02:47:34 -0000 1.45 --- wxlstate.h 14 May 2006 00:40:56 -0000 1.46 *************** *** 308,311 **** --- 308,312 ---- // else nresults is LUA_MULTRET to leave all of them on the stack int LuaCall(int narg, int clear); + int LuaDoString(const wxString &script, const wxString& name = wxEmptyString) { return RunString(script, name); } int LuaDoFile(const wxString &filename) { return RunFile(filename); } int LuaDoBuffer(const char *buffer, size_t len, const char *name) { return RunBuffer((const unsigned char*)buffer, len, lua2wx(name)); } *************** *** 835,839 **** BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_CREATION, 0) // a wxLuaState is being created ! DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_CONSOLE, 0) // print statements and such, check GetString() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_ERROR, 0) // error occurred, check GetString() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_DEBUG_HOOK, 0) // see LuaDebugHook function --- 836,840 ---- BEGIN_DECLARE_EVENT_TYPES() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_CREATION, 0) // a wxLuaState is being created ! DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_PRINT, 0) // print statements and such, check GetString() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_ERROR, 0) // error occurred, check GetString() DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_WXLUA, wxEVT_LUA_DEBUG_HOOK, 0) // see LuaDebugHook function *************** *** 845,849 **** #define EVT_LUA_CREATION(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_CREATION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), ! #define EVT_LUA_CONSOLE(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_CONSOLE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), #define EVT_LUA_ERROR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_ERROR, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), #define EVT_LUA_DEBUG_HOOK(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_DEBUG_HOOK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), --- 846,850 ---- #define EVT_LUA_CREATION(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_CREATION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), ! #define EVT_LUA_PRINT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_PRINT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), #define EVT_LUA_ERROR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_ERROR, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), #define EVT_LUA_DEBUG_HOOK(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_DEBUG_HOOK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), *************** *** 851,853 **** --- 852,857 ---- #define EVT_LUA_DEBUGGERATTACHED(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_LUA_DEBUGGERATTACHED, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (wxLuaEventFunction) & fn, (wxObject *) NULL ), + #define wxEVT_LUA_CONSOLE wxEVT_LUA_PRINT + #define EVT_LUA_CONSOLE EVT_LUA_PRINT + #endif // _WXLSTATE_H_ |