You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2007-06-25 19:45:29
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26860/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxlstate.h Log Message: Rename wxluabind_get/setTableFunction to what it really is wxluabind_index/newindex_wxLuaBindClass Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** wxlbind.h 17 Jun 2007 18:36:28 -0000 1.53 --- wxlbind.h 25 Jun 2007 19:44:50 -0000 1.54 *************** *** 23,32 **** // ---------------------------------------------------------------------------- ! // memory deallocation function, lua's __gc ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind_garbageCollect(lua_State *L); ! // lua 'set table' tag method handler, lua's __newindex ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind_setTableFunc(lua_State *L); ! // lua 'get table' tag method handler, lua's __index ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind_getTableFunc(lua_State *L); // If there is a special userdata upvalue, remove 1 value if !only_check // (hack to remove the table lua pushes onto the stack when calling the --- 23,32 ---- // ---------------------------------------------------------------------------- ! // memory deallocation function for created wxLuaBindClass defined objects, lua's __gc ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind_gc_wxLuaBindClass(lua_State *L); ! // lua 'set table' function for created wxLuaBindClass defined objects, lua's __newindex ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind__newindex_wxLuaBindClass(lua_State *L); ! // lua 'get table' function for created wxLuaBindClass defined objects, lua's __index ! WXDLLIMPEXP_WXLUA int LUACALL wxluabind_index_wxLuaBindClass(lua_State *L); // If there is a special userdata upvalue, remove 1 value if !only_check // (hack to remove the table lua pushes onto the stack when calling the Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** wxlstate.h 25 Jun 2007 16:07:58 -0000 1.82 --- wxlstate.h 25 Jun 2007 19:44:50 -0000 1.83 *************** *** 88,92 **** // ---------------------------------------------------------------------------- ! // Push a special number into lua, defines to make sure it's always done the same. // // Note we do not push a human readable string for these because lua always makes --- 88,92 ---- // ---------------------------------------------------------------------------- ! // Push a special key into lua, defines to make sure it's always done the same. // // Note we do not push a human readable string for these because lua always makes |
From: John L. <jr...@us...> - 2007-06-25 19:45:02
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26860/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Rename wxluabind_get/setTableFunction to what it really is wxluabind_index/newindex_wxLuaBindClass Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** wxlstate.cpp 25 Jun 2007 16:07:58 -0000 1.116 --- wxlstate.cpp 25 Jun 2007 19:44:54 -0000 1.117 *************** *** 40,49 **** #include "wx/tokenzr.h" ! int wxlua_lreg_references_key = WXLUA_LREG_REFERENCES; ! int wxlua_lreg_classes_key = WXLUA_LREG_CLASSES; ! int wxlua_lreg_derivedmethods_key = WXLUA_LREG_DERIVED_METHODS; int wxlua_lreg_wxluastaterefdata_key = WXLUA_LREG_WXLUASTATEREFDATA; ! int wxlua_lreg_metatable_tag_key = WXLUA_METATABLE_TAG; ! int wxlua_lreg_metatable_class_key = WXLUA_METATABLE_CLASS; wxLuaState wxNullLuaState(false); --- 40,49 ---- #include "wx/tokenzr.h" ! int wxlua_lreg_references_key = WXLUA_LREG_REFERENCES; ! int wxlua_lreg_classes_key = WXLUA_LREG_CLASSES; ! int wxlua_lreg_derivedmethods_key = WXLUA_LREG_DERIVED_METHODS; int wxlua_lreg_wxluastaterefdata_key = WXLUA_LREG_WXLUASTATEREFDATA; ! int wxlua_lreg_metatable_tag_key = WXLUA_METATABLE_TAG; ! int wxlua_lreg_metatable_class_key = WXLUA_METATABLE_CLASS; wxLuaState wxNullLuaState(false); Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** wxlbind.cpp 18 Jun 2007 21:40:52 -0000 1.79 --- wxlbind.cpp 25 Jun 2007 19:44:53 -0000 1.80 *************** *** 245,252 **** // ---------------------------------------------------------------------------- ! // wxluabind_garbageCollect - if the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_garbageCollect(lua_State *L) { wxLuaBindClass *wxlClass = (wxLuaBindClass *)lua_touserdata(L, lua_upvalueindex(1)); --- 245,252 ---- // ---------------------------------------------------------------------------- ! // If the class defines a gc function, then call it. // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_gc_wxLuaBindClass(lua_State *L) { wxLuaBindClass *wxlClass = (wxLuaBindClass *)lua_touserdata(L, lua_upvalueindex(1)); *************** *** 259,263 **** void* key = wxlua_ttouserdata(L, 1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxluabind_garbageCollect")); wxlState.RemoveTrackedObject(key, true); --- 259,263 ---- void* key = wxlua_ttouserdata(L, 1, true); ! wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxluabind_gc_wxLuaBindClass")); wxlState.RemoveTrackedObject(key, true); *************** *** 269,274 **** // ---------------------------------------------------------------------------- - // wxluabind_getTableFunc - // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). --- 269,272 ---- *************** *** 278,282 **** // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_getTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 276,280 ---- // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_index_wxLuaBindClass(lua_State *L) { wxLuaState wxlState(L); *************** *** 376,386 **** // ---------------------------------------------------------------------------- - // wxluabind_setTableFunc - // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // ---------------------------------------------------------------------------- ! int LUACALL wxluabind_setTableFunc(lua_State *L) { wxLuaState wxlState(L); --- 374,382 ---- // ---------------------------------------------------------------------------- // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // ---------------------------------------------------------------------------- ! int LUACALL wxluabind__newindex_wxLuaBindClass(lua_State *L) { wxLuaState wxlState(L); *************** *** 686,692 **** static const luaL_reg s_funcTable[] = { ! {"__gc", wxluabind_garbageCollect }, ! {"__index", wxluabind_getTableFunc }, ! {"__newindex", wxluabind_setTableFunc } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); --- 682,688 ---- static const luaL_reg s_funcTable[] = { ! {"__gc", wxluabind_gc_wxLuaBindClass }, ! {"__index", wxluabind_index_wxLuaBindClass }, ! {"__newindex", wxluabind__newindex_wxLuaBindClass } }; static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); |
From: John L. <jr...@us...> - 2007-06-25 19:45:01
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26860/wxLua/samples Modified Files: controls.wx.lua Log Message: Rename wxluabind_get/setTableFunction to what it really is wxluabind_index/newindex_wxLuaBindClass Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** controls.wx.lua 25 Jun 2007 16:07:58 -0000 1.8 --- controls.wx.lua 25 Jun 2007 19:44:56 -0000 1.9 *************** *** 871,875 **** imageList:delete() if taskbarIcon then ! taskbarIcon:RemoveIcon() taskbarIcon:delete() -- must delete() it for program to exit in MSW end --- 871,878 ---- imageList:delete() if taskbarIcon then ! if taskbarIcon:IsIconInstalled() then ! taskbarIcon:RemoveIcon() ! end ! taskbarIcon:delete() -- must delete() it for program to exit in MSW end |
From: John L. <jr...@us...> - 2007-06-25 16:08:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxldebug.cpp 16 Jun 2007 06:21:47 -0000 1.35 --- wxldebug.cpp 25 Jun 2007 16:07:58 -0000 1.36 *************** *** 428,432 **** const void *pItem = lua_topointer(L, index); ! wxString s = wxString::Format(wxT("%p"), pItem); if (nItems > 0) --- 428,432 ---- const void *pItem = lua_topointer(L, index); ! wxString s = wxString::Format(wxT("0x%p"), pItem); if (nItems > 0) *************** *** 445,449 **** lua_State* L = wxlState.GetLuaState(); ! wxString s = wxString::Format(wxT("%p"), lua_touserdata(L, index)); if (full) --- 445,466 ---- lua_State* L = wxlState.GetLuaState(); ! wxString s = wxString::Format(wxT("0x%p"), lua_touserdata(L, index)); ! ! void* udata = lua_touserdata(L, index); ! ! // Convert our known keys to something more readable ! if (udata == &wxlua_lreg_references_key) ! s += wxT(" - wxLua References"); ! else if (udata == &wxlua_lreg_classes_key) ! s += wxT(" - wxLuaBindClasses"); ! else if (udata == &wxlua_lreg_derivedmethods_key) ! s += wxT(" - wxLua Derived Class Methods"); ! else if (udata == &wxlua_lreg_wxluastaterefdata_key) ! s += wxT(" - wxLuaStateRefData"); ! ! else if (udata == &wxlua_lreg_metatable_tag_key) ! s += wxT(" - wxLua Metatable Class Tag"); ! else if (udata == &wxlua_lreg_metatable_class_key) ! s += wxT(" - wxLua Metatable wxLuaBindClass"); if (full) |
From: John L. <jr...@us...> - 2007-06-25 16:08:16
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/bindings/wxwidgets Modified Files: appframe.i Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** appframe.i 25 Jun 2007 03:19:37 -0000 1.42 --- appframe.i 25 Jun 2007 16:07:57 -0000 1.43 *************** *** 488,492 **** %include "wx/taskbar.h" ! %class wxTaskBarIcon, wxEvtHandler wxTaskBarIcon() --- 488,492 ---- %include "wx/taskbar.h" ! %class %delete wxTaskBarIcon, wxEvtHandler wxTaskBarIcon() |
From: John L. <jr...@us...> - 2007-06-25 16:08:15
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/modules/wxbind/src Modified Files: appframe.cpp Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** appframe.cpp 25 Jun 2007 03:19:40 -0000 1.60 --- appframe.cpp 25 Jun 2007 16:07:58 -0000 1.61 *************** *** 3312,3315 **** --- 3312,3331 ---- #endif // (wxLUA_USE_wxIcon) && (wxLUA_USE_wxTaskBarIcon && defined (wxHAS_TASK_BAR_ICON )) + static wxLuaArgTag s_wxluatagArray_wxLua_wxTaskBarIcon_delete[] = { &s_wxluatag_wxTaskBarIcon, NULL }; + static int LUACALL wxLua_wxTaskBarIcon_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTaskBarIcon_delete[1] = {{ wxLua_wxTaskBarIcon_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTaskBarIcon_delete }}; + static int LUACALL wxLua_wxTaskBarIcon_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxTaskBarIcon * self = (wxTaskBarIcon *)wxlState.GetUserDataType(1, s_wxluatag_wxTaskBarIcon); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxTaskBarIcon_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxTaskBarIcon_constructor[1] = {{ wxLua_wxTaskBarIcon_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3322,3327 **** // call constructor returns = new wxTaskBarIcon(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTaskBarIcon, returns); --- 3338,3343 ---- // call constructor returns = new wxTaskBarIcon(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTaskBarIcon, returns); *************** *** 3347,3350 **** --- 3363,3367 ---- #endif // (wxLUA_USE_wxIcon) && (wxLUA_USE_wxTaskBarIcon && defined (wxHAS_TASK_BAR_ICON )) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTaskBarIcon_delete, 1, NULL }, { "wxTaskBarIcon", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTaskBarIcon_constructor, 1, NULL }, |
From: John L. <jr...@us...> - 2007-06-25 16:08:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wxldebug.h 25 Jun 2007 03:32:35 -0000 1.37 --- wxldebug.h 25 Jun 2007 16:07:58 -0000 1.38 *************** *** 84,88 **** } ! private: wxString m_itemName; wxString m_itemType; --- 84,89 ---- } ! // implementation ! wxString m_itemName; wxString m_itemType; |
From: John L. <jr...@us...> - 2007-06-25 16:08:13
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/samples Modified Files: controls.wx.lua Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** controls.wx.lua 25 Jun 2007 03:19:51 -0000 1.7 --- controls.wx.lua 25 Jun 2007 16:07:58 -0000 1.8 *************** *** 870,874 **** textCtrl = nil -- stop processing events imageList:delete() ! if taskbarIcon then taskbarIcon:RemoveIcon() end end) --- 870,877 ---- textCtrl = nil -- stop processing events imageList:delete() ! if taskbarIcon then ! taskbarIcon:RemoveIcon() ! taskbarIcon:delete() -- must delete() it for program to exit in MSW ! end end) |
From: John L. <jr...@us...> - 2007-06-25 16:08:11
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** wxlstate.h 25 Jun 2007 03:19:49 -0000 1.81 --- wxlstate.h 25 Jun 2007 16:07:58 -0000 1.82 *************** *** 95,125 **** // ---------------------------------------------------------------------------- ! #define WXLUA_LREG_REFERENCES -100000 ! #define WXLUA_LREG_CLASSES -100001 ! #define WXLUA_LREG_DERIVED_METHODS -100002 ! #define WXLUA_LREG_WXLUASTATEREFDATA -100003 ! #define WXLUA_METATABLE_TAG 0 ! #define WXLUA_METATABLE_CLASS 1 // Push a key that is index in the LUA_REGISTRYINDEX table that is a table indexed // on the "tags" and each item is a metatable for classes // or a reference to an object we want to keep a handle to. ! #define wxlua_pushkey_wxLuaReferences(L) lua_pushnumber(L, WXLUA_LREG_REFERENCES) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table // t[wxLuaBindClass.name] = wxLuaBindClass, where the wxLuaBindClass is a lightuserdata. ! #define wxlua_pushkey_wxLuaClasses(L) lua_pushnumber(L, WXLUA_LREG_CLASSES) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table // t[lightuserdata object] = {["derived func/value name"] = wxLuaObject(lua function/value), ...} ! #define wxlua_pushkey_wxLuaDerivedMethods(L) lua_pushnumber(L, WXLUA_LREG_DERIVED_METHODS) // Push a key of an index of the LUA_REGISTRYINDEX table that is a lightuserdata of the // wxLuaStateRefData for this lua_State. ! #define wxlua_pushkey_wxLuaStateRefData(L) lua_pushnumber(L, WXLUA_LREG_WXLUASTATEREFDATA) // Push a key of an index into the metatable of a wxLua userdata for the "tag" // in the wxLuaReferences table. ! #define wxlua_pushkey_metatableTag(L) lua_pushnumber(L, WXLUA_METATABLE_TAG) // Push a key of an index into the metatable of a wxLua userdata for the wxLuaBindClass // in the wxLuaReferences table. ! #define wxlua_pushkey_metatableClass(L) lua_pushnumber(L, WXLUA_METATABLE_CLASS) //---------------------------------------------------------------------------- --- 95,137 ---- // ---------------------------------------------------------------------------- ! #define WXLUA_LREG_REFERENCES 1 ! #define WXLUA_LREG_CLASSES 2 ! #define WXLUA_LREG_DERIVED_METHODS 3 ! #define WXLUA_LREG_WXLUASTATEREFDATA 4 ! #define WXLUA_METATABLE_TAG 5 ! #define WXLUA_METATABLE_CLASS 6 ! ! // Light user data used as keys in the lua registry table for wxLua items. ! // Note that even though these have values, they're not used, just the memory address. ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_references_key; // WXLUA_LREG_REFERENCES ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_classes_key; // WXLUA_LREG_CLASSES ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_derivedmethods_key; // WXLUA_LREG_DERIVED_METHODS ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_wxluastaterefdata_key; // WXLUA_LREG_WXLUASTATEREFDATA ! ! // Light user data used as keys in the metatables created for the class userdata objects. ! // Note that even though these have values, they're not used, just the memory address. ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_metatable_tag_key; // WXLUA_METATABLE_TAG ! extern WXDLLIMPEXP_DATA_WXLUA(int) wxlua_lreg_metatable_class_key; // WXLUA_METATABLE_CLASS // Push a key that is index in the LUA_REGISTRYINDEX table that is a table indexed // on the "tags" and each item is a metatable for classes // or a reference to an object we want to keep a handle to. ! #define wxlua_pushkey_wxLuaReferences(L) lua_pushlightuserdata(L, &wxlua_lreg_references_key) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table // t[wxLuaBindClass.name] = wxLuaBindClass, where the wxLuaBindClass is a lightuserdata. ! #define wxlua_pushkey_wxLuaClasses(L) lua_pushlightuserdata(L, &wxlua_lreg_classes_key) // Push a key that is an index in the LUA_REGISTRYINDEX table that is a table // t[lightuserdata object] = {["derived func/value name"] = wxLuaObject(lua function/value), ...} ! #define wxlua_pushkey_wxLuaDerivedMethods(L) lua_pushlightuserdata(L, &wxlua_lreg_derivedmethods_key) // Push a key of an index of the LUA_REGISTRYINDEX table that is a lightuserdata of the // wxLuaStateRefData for this lua_State. ! #define wxlua_pushkey_wxLuaStateRefData(L) lua_pushlightuserdata(L, &wxlua_lreg_wxluastaterefdata_key) // Push a key of an index into the metatable of a wxLua userdata for the "tag" // in the wxLuaReferences table. ! #define wxlua_pushkey_metatableTag(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_tag_key) // Push a key of an index into the metatable of a wxLua userdata for the wxLuaBindClass // in the wxLuaReferences table. ! #define wxlua_pushkey_metatableClass(L) lua_pushlightuserdata(L, &wxlua_lreg_metatable_class_key) //---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-25 16:08:10
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9840/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Allow the wxTaskBarIcon to be delete()ed since you have to in MSW for the program to exit Change the keys in the lua registry table to be lightuserdata to avoid collisions Display what the keys are in the registry table in the stack dialog Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** wxlstate.cpp 25 Jun 2007 03:19:50 -0000 1.115 --- wxlstate.cpp 25 Jun 2007 16:07:58 -0000 1.116 *************** *** 40,43 **** --- 40,50 ---- #include "wx/tokenzr.h" + int wxlua_lreg_references_key = WXLUA_LREG_REFERENCES; + int wxlua_lreg_classes_key = WXLUA_LREG_CLASSES; + int wxlua_lreg_derivedmethods_key = WXLUA_LREG_DERIVED_METHODS; + int wxlua_lreg_wxluastaterefdata_key = WXLUA_LREG_WXLUASTATEREFDATA; + int wxlua_lreg_metatable_tag_key = WXLUA_METATABLE_TAG; + int wxlua_lreg_metatable_class_key = WXLUA_METATABLE_CLASS; + wxLuaState wxNullLuaState(false); |
From: John L. <jr...@us...> - 2007-06-25 03:32:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6003/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: Allow loading luamodule from same dir as wx.dll fix exporting data in wxldebug.h Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wxldebug.h 16 Jun 2007 06:21:47 -0000 1.36 --- wxldebug.h 25 Jun 2007 03:32:35 -0000 1.37 *************** *** 106,110 **** // an invalid wxLuaState for comparison (like wxNullBitmap) ! extern WXDLLIMPEXP_DATA_WXLUA(wxLuaDebugData) wxNullLuaDebugData; class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData : public wxObject --- 106,110 ---- // an invalid wxLuaState for comparison (like wxNullBitmap) ! extern WXDLLIMPEXP_DATA_WXLUADEBUG(wxLuaDebugData) wxNullLuaDebugData; class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData : public wxObject |
From: John L. <jr...@us...> - 2007-06-25 03:32:39
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6003/wxLua/samples Modified Files: luamodule.wx.lua Log Message: Allow loading luamodule from same dir as wx.dll fix exporting data in wxldebug.h Index: luamodule.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/luamodule.wx.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** luamodule.wx.lua 31 May 2007 17:18:55 -0000 1.4 --- luamodule.wx.lua 25 Jun 2007 03:32:35 -0000 1.5 *************** *** 16,20 **** -- wxLua has been compiled in shared mode (--enable-shared on Unix, -- SHARED=1 on Windows) ! package.cpath = ";;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" require("wx") --- 16,20 ---- -- wxLua has been compiled in shared mode (--enable-shared on Unix, -- SHARED=1 on Windows) ! package.cpath = ";;../lib/?.so;./?.dll;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" require("wx") |
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/bindings/wxwidgets Modified Files: appframe.i clipdrag.i config.i controls.i data.i datetime.i defsutil.i dialogs.i event.i file.i gdi.i geometry.i grid.i help.i html.i image.i mdi.i menutool.i override.hpp picker.i print.i regex.i sizer.i socket.i thread.i wave.i windows.i wx_datatypes.lua wxlua.i xml.i Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wave.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wave.i,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wave.i 18 Jun 2007 02:56:24 -0000 1.20 --- wave.i 25 Jun 2007 03:19:38 -0000 1.21 *************** *** 17,21 **** wxUSE_SOUND|(%msw&wxUSE_WAVE) %define wxSOUND_LOOP ! %if %wxchkver_2_6 & wxUSE_SOUND %include "wx/sound.h" --- 17,21 ---- wxUSE_SOUND|(%msw&wxUSE_WAVE) %define wxSOUND_LOOP ! %if %wxchkver_2_6 && wxUSE_SOUND %include "wx/sound.h" *************** *** 25,31 **** wxSound(const wxString& fileName, bool isResource = false) //wxSound(int size, const wxByte* data) - bool Create(const wxString& fileName, bool isResource = false) //bool Create(int size, const wxByte* data) bool IsOk() const !%win static bool IsPlaying() const --- 25,31 ---- wxSound(const wxString& fileName, bool isResource = false) //wxSound(int size, const wxByte* data) bool Create(const wxString& fileName, bool isResource = false) //bool Create(int size, const wxByte* data) + bool IsOk() const !%win static bool IsPlaying() const *************** *** 35,44 **** %endclass ! %endif // %wxchkver_2_6 & wxUSE_SOUND // --------------------------------------------------------------------------- // wxWave ! %if %msw & !%wxchkver_2_6 & wxUSE_WAVE %include "wx/wave.h" --- 35,44 ---- %endclass ! %endif // %wxchkver_2_6 && wxUSE_SOUND // --------------------------------------------------------------------------- // wxWave ! %if %msw && !%wxchkver_2_6 && wxUSE_WAVE %include "wx/wave.h" *************** *** 47,52 **** wxWave() wxWave(const wxString& fileName, bool isResource = false) - bool Create(const wxString& fileName, bool isResource = false) bool IsOk() const !%wxchkver_2_6 bool Play(bool async = true, bool looped = false) const --- 47,52 ---- wxWave() wxWave(const wxString& fileName, bool isResource = false) bool Create(const wxString& fileName, bool isResource = false) + bool IsOk() const !%wxchkver_2_6 bool Play(bool async = true, bool looped = false) const *************** *** 54,58 **** %endclass ! %endif // %msw & !%wxchkver_2_6 & wxUSE_WAVE %endif //wxLUA_USE_wxWave --- 54,58 ---- %endclass ! %endif // %msw && !%wxchkver_2_6 && wxUSE_WAVE %endif //wxLUA_USE_wxWave *************** *** 61,65 **** // wxMediaCtrl ! %if wxLUA_USE_wxMediaCtrl & wxUSE_MEDIACTRL %include "wx/mediactrl.h" --- 61,65 ---- // wxMediaCtrl ! %if wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL %include "wx/mediactrl.h" *************** *** 88,93 **** wxMediaCtrl() wxMediaCtrl( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) - bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) wxFileOffset GetDownloadProgress() // DirectShow only wxFileOffset GetDownloadTotal() // DirectShow only --- 88,93 ---- wxMediaCtrl() wxMediaCtrl( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) + wxFileOffset GetDownloadProgress() // DirectShow only wxFileOffset GetDownloadTotal() // DirectShow only *************** *** 134,143 **** %endclass ! %endif //wxLUA_USE_wxMediaCtrl & wxUSE_MEDIACTRL // --------------------------------------------------------------------------- // wxJoystick ! %if wxLUA_USE_wxJoystick & wxUSE_JOYSTICK %include "wx/joystick.h" --- 134,143 ---- %endclass ! %endif //wxLUA_USE_wxMediaCtrl && wxUSE_MEDIACTRL // --------------------------------------------------------------------------- // wxJoystick ! %if wxLUA_USE_wxJoystick && wxUSE_JOYSTICK %include "wx/joystick.h" *************** *** 228,231 **** %endclass ! %endif //wxLUA_USE_wxJoystick & wxUSE_JOYSTICK --- 228,231 ---- %endclass ! %endif //wxLUA_USE_wxJoystick && wxUSE_JOYSTICK Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** menutool.i 18 Jun 2007 02:56:24 -0000 1.22 --- menutool.i 25 Jun 2007 03:19:37 -0000 1.23 *************** *** 11,15 **** // wxMenu ! %if wxLUA_USE_wxMenu & wxUSE_MENUS %include "wx/menu.h" --- 11,15 ---- // wxMenu ! %if wxLUA_USE_wxMenu && wxUSE_MENUS %include "wx/menu.h" *************** *** 26,30 **** %define wxMENU_TEAROFF ! %class wxMenu, wxEvtHandler wxMenu(const wxString& title = "", long style = 0) --- 26,30 ---- %define wxMENU_TEAROFF ! %class %delete wxMenu, wxEvtHandler wxMenu(const wxString& title = "", long style = 0) *************** *** 34,39 **** wxMenuItem* Append(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Append(int id, const wxString& item, wxMenu *subMenu, const wxString& helpString = "") ! wxMenuItem* Append(wxMenuItem* menuItem) wxMenuItem* AppendCheckItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* AppendRadioItem(int id, const wxString& item, const wxString& helpString = "") --- 34,39 ---- wxMenuItem* Append(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Append(int id, const wxString& item, %ungc wxMenu *subMenu, const wxString& helpString = "") ! wxMenuItem* Append(%ungc wxMenuItem* menuItem) wxMenuItem* AppendCheckItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* AppendRadioItem(int id, const wxString& item, const wxString& helpString = "") *************** *** 59,63 **** wxString GetTitle() const wxMenuItem* Insert(size_t pos, int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Insert(size_t pos, wxMenuItem *item) wxMenuItem* InsertCheckItem(size_t pos, int id, const wxString& item, const wxString& helpString = "") wxMenuItem* InsertRadioItem(size_t pos, int id, const wxString& item, const wxString& helpString = "") --- 59,63 ---- wxString GetTitle() const wxMenuItem* Insert(size_t pos, int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Insert(size_t pos, %ungc wxMenuItem *item) wxMenuItem* InsertCheckItem(size_t pos, int id, const wxString& item, const wxString& helpString = "") wxMenuItem* InsertRadioItem(size_t pos, int id, const wxString& item, const wxString& helpString = "") *************** *** 66,75 **** bool IsEnabled(int id) const wxMenuItem* Prepend(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Prepend(wxMenuItem *item) wxMenuItem* PrependCheckItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* PrependRadioItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* PrependSeparator() ! wxMenuItem* Remove(wxMenuItem *item) ! wxMenuItem* Remove(int id) void SetHelpString(int id, const wxString& helpString) void SetLabel(int id, const wxString& label) --- 66,75 ---- bool IsEnabled(int id) const wxMenuItem* Prepend(int id, const wxString& item, const wxString& helpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxMenuItem* Prepend(%ungc wxMenuItem *item) wxMenuItem* PrependCheckItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* PrependRadioItem(int id, const wxString& item, const wxString& helpString = "") wxMenuItem* PrependSeparator() ! %gc wxMenuItem* Remove(wxMenuItem *item) ! %gc wxMenuItem* Remove(int id) void SetHelpString(int id, const wxString& helpString) void SetLabel(int id, const wxString& label) *************** *** 85,89 **** // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) ! bool Append(wxMenu *menu, const wxString& title) void Check(int id, bool check) void Enable(int id, bool enable) --- 85,89 ---- // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) ! bool Append(%ungc wxMenu *menu, const wxString& title) void Check(int id, bool check) void Enable(int id, bool enable) *************** *** 97,106 **** wxMenu* GetMenu(int menuIndex) const int GetMenuCount() const ! bool Insert(size_t pos, wxMenu *menu, const wxString& title) bool IsChecked(int id) const bool IsEnabled(int id) const void Refresh() ! wxMenu* Remove(size_t pos) ! wxMenu* Replace(size_t pos, wxMenu *menu, const wxString& title) void SetHelpString(int id, const wxString& helpString) void SetLabel(int id, const wxString& label) --- 97,106 ---- wxMenu* GetMenu(int menuIndex) const int GetMenuCount() const ! bool Insert(size_t pos, %ungc wxMenu *menu, const wxString& title) bool IsChecked(int id) const bool IsEnabled(int id) const void Refresh() ! %gc wxMenu* Remove(size_t pos) ! %gc wxMenu* Replace(size_t pos, %ungc wxMenu *menu, const wxString& title) void SetHelpString(int id, const wxString& helpString) void SetLabel(int id, const wxString& label) *************** *** 112,120 **** // --------------------------------------------------------------------------- // wxMenuItem %include "wx/menuitem.h" ! %class wxMenuItem, wxObject ! wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = "", const wxString& help = "", wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = NULL) void Check(bool check) --- 112,124 ---- // --------------------------------------------------------------------------- // wxMenuItem + // + // Note: this is almost always owned by a wxMenu, however you can get an + // unattached one from wxMenu::Remove() so that's why we gc collect it. + %include "wx/menuitem.h" ! %class %delete wxMenuItem, wxObject ! %ungc_this wxMenuItem(wxMenu *parentMenu = NULL, int id = wxID_SEPARATOR, const wxString& text = "", const wxString& help = "", wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = NULL) void Check(bool check) *************** *** 145,149 **** void SetHelp(const wxString& helpString) const //%win void SetMarginWidth(int width) const ! void SetMenu(wxMenu* menu) void SetSubMenu(wxMenu* menu) void SetText(const wxString& text) --- 149,153 ---- void SetHelp(const wxString& helpString) const //%win void SetMarginWidth(int width) const ! //void SetMenu(wxMenu* menu) void SetSubMenu(wxMenu* menu) void SetText(const wxString& text) *************** *** 178,182 **** %endclass ! %endif //wxLUA_USE_wxMenu & wxUSE_MENUS // --------------------------------------------------------------------------- --- 182,186 ---- %endclass ! %endif //wxLUA_USE_wxMenu && wxUSE_MENUS // --------------------------------------------------------------------------- *************** *** 206,210 **** wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxBitmap& bitmap2 = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelpString = "", const wxString& longHelpString = "", wxObject* clientData = NULL) wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxString& shortHelpString = "", wxItemKind kind = wxITEM_NORMAL) ! wxToolBarToolBase* AddTool(wxToolBarToolBase* tool) wxToolBarToolBase *AddCheckTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL) wxToolBarToolBase *AddRadioTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL) --- 210,214 ---- wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxBitmap& bitmap2 = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelpString = "", const wxString& longHelpString = "", wxObject* clientData = NULL) wxToolBarToolBase* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxString& shortHelpString = "", wxItemKind kind = wxITEM_NORMAL) ! //wxToolBarToolBase* AddTool(wxToolBarToolBase* tool) wxToolBarToolBase *AddCheckTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL) wxToolBarToolBase *AddRadioTool(int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *data = NULL) *************** *** 233,237 **** wxToolBarToolBase* InsertTool(size_t pos, int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, bool isToggle = false, wxObject *clientData = NULL, const wxString& shortHelpString = "", const wxString& longHelpString = "") wxToolBarToolBase* InsertTool(size_t pos, int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *clientData = NULL) ! wxToolBarToolBase * InsertTool(size_t pos, wxToolBarToolBase* tool) wxToolBarToolBase* RemoveTool(int id) bool Realize() --- 237,241 ---- wxToolBarToolBase* InsertTool(size_t pos, int id, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, bool isToggle = false, wxObject *clientData = NULL, const wxString& shortHelpString = "", const wxString& longHelpString = "") wxToolBarToolBase* InsertTool(size_t pos, int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled = wxNullBitmap, wxItemKind kind = wxITEM_NORMAL, const wxString& shortHelp = "", const wxString& longHelp = "", wxObject *clientData = NULL) ! //wxToolBarToolBase * InsertTool(size_t pos, wxToolBarToolBase* tool) wxToolBarToolBase* RemoveTool(int id) bool Realize() *************** *** 258,263 **** wxToolBar() wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar") - bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar") %endclass --- 262,267 ---- wxToolBar() wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar") + bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = "wxToolBar") %endclass *************** *** 272,278 **** wxToolBarSimple() wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr) - bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr) - wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) %endclass --- 276,281 ---- wxToolBarSimple() wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr) + bool Create(wxWindow *parent,wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER | wxTB_HORIZONTAL, const wxString &name = wxToolBarNameStr) %endclass Index: clipdrag.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/clipdrag.i,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** clipdrag.i 18 Jun 2007 02:56:23 -0000 1.29 --- clipdrag.i 25 Jun 2007 03:19:37 -0000 1.30 *************** *** 11,15 **** // wxClipboard ! %if wxLUA_USE_wxClipboard & wxUSE_CLIPBOARD %include "wx/clipbrd.h" --- 11,15 ---- // wxClipboard ! %if wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD %include "wx/clipbrd.h" *************** *** 19,25 **** %wxchkver_2_6 static wxClipboard *Get() ! // wxClipboard() use global clipboard only ! bool AddData( wxDataObject *data ) void Clear() void Close() --- 19,25 ---- %wxchkver_2_6 static wxClipboard *Get() ! // No constructor, use global clipboard from static Get() function only ! bool AddData( %ungc wxDataObject *data ) void Clear() void Close() *************** *** 29,33 **** bool IsSupported( const wxDataFormat& format ) bool Open() ! bool SetData( wxDataObject *data ) void UsePrimarySelection( bool primary = true ) %endclass --- 29,33 ---- bool IsSupported( const wxDataFormat& format ) bool Open() ! bool SetData( %ungc wxDataObject *data ) void UsePrimarySelection( bool primary = true ) %endclass *************** *** 58,67 **** %endif //%wxchkver_2_8 ! %endif //wxLUA_USE_wxClipboard & wxUSE_CLIPBOARD // --------------------------------------------------------------------------- // wxDataFormat ! %if wxLUA_USE_wxDataObject & wxUSE_DATAOBJ %include "wx/dataobj.h" --- 58,67 ---- %endif //%wxchkver_2_8 ! %endif //wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD // --------------------------------------------------------------------------- // wxDataFormat ! %if wxLUA_USE_wxDataObject && wxUSE_DATAOBJ %include "wx/dataobj.h" *************** *** 159,163 **** wxDataObjectComposite() ! void Add(wxDataObjectSimple *dataObject, bool preferred = false) %wxchkver_2_8 wxDataFormat GetReceivedFormat() const %endclass --- 159,163 ---- wxDataObjectComposite() ! void Add(%ungc wxDataObjectSimple *dataObject, bool preferred = false) %wxchkver_2_8 wxDataFormat GetReceivedFormat() const %endclass *************** *** 176,180 **** // wxTextDataObject ! %class %noclassinfo %encapsulate wxTextDataObject, wxDataObjectSimple wxTextDataObject(const wxString& text = "") --- 176,180 ---- // wxTextDataObject ! %class %delete %noclassinfo %encapsulate wxTextDataObject, wxDataObjectSimple wxTextDataObject(const wxString& text = "") *************** *** 187,191 **** // wxBitmapDataObject ! %class %noclassinfo %encapsulate wxBitmapDataObject, wxDataObjectSimple wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap) --- 187,191 ---- // wxBitmapDataObject ! %class %delete %noclassinfo %encapsulate wxBitmapDataObject, wxDataObjectSimple wxBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap) *************** *** 195,199 **** // --------------------------------------------------------------------------- ! // wxCustomDataObject //%class %noclassinfo %encapsulate wxCustomDataObject, wxDataObjectSimple --- 195,199 ---- // --------------------------------------------------------------------------- ! // wxCustomDataObject - FIXME implement this? //%class %noclassinfo %encapsulate wxCustomDataObject, wxDataObjectSimple *************** *** 213,217 **** %if %wxchkver_2_8 ! %class %noclassinfo %encapsulate wxURLDataObject, wxTextDataObject wxURLDataObject(const wxString& url = "") --- 213,217 ---- %if %wxchkver_2_8 ! %class %delete %noclassinfo %encapsulate wxURLDataObject, wxTextDataObject wxURLDataObject(const wxString& url = "") *************** *** 222,231 **** %endif //%wxchkver_2_8 ! %endif //wxLUA_USE_wxDataObject & wxUSE_DATAOBJ // --------------------------------------------------------------------------- // wxDropTarget ! %if wxLUA_USE_wxDragDrop & wxUSE_DRAG_AND_DROP %include "wx/dnd.h" --- 222,231 ---- %endif //%wxchkver_2_8 ! %endif //wxLUA_USE_wxDataObject && wxUSE_DATAOBJ // --------------------------------------------------------------------------- // wxDropTarget ! %if wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP %include "wx/dnd.h" *************** *** 315,324 **** %endclass ! %endif //wxLUA_USE_wxDragDrop & wxUSE_DRAG_AND_DROP // --------------------------------------------------------------------------- // wxMetafile ! %if wxLUA_USE_wxMetafile & wxUSE_METAFILE & (%msw|%mac|%os2) %include "wx/metafile.h" --- 315,324 ---- %endclass ! %endif //wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP // --------------------------------------------------------------------------- // wxMetafile ! %if wxLUA_USE_wxMetafile && wxUSE_METAFILE && (%msw|%mac|%os2) %include "wx/metafile.h" *************** *** 326,330 **** //%function bool wxMakeMetafilePlaceable(const wxString& filename, int minX, int minY, int maxX, int maxY, float scale = 1.0) ! %class %noclassinfo wxMetafile, wxObject wxMetafile(const wxString& filename = "") --- 326,330 ---- //%function bool wxMakeMetafilePlaceable(const wxString& filename, int minX, int minY, int maxX, int maxY, float scale = 1.0) ! %class %delete %noclassinfo wxMetafile, wxObject wxMetafile(const wxString& filename = "") *************** *** 339,346 **** wxMetafileDC(const wxString& filename = "") ! %win wxMetafile* Close() %endclass %endif ! %endif //wxLUA_USE_wxMetafile & wxUSE_METAFILE & (%msw|%mac|%os2) --- 339,346 ---- wxMetafileDC(const wxString& filename = "") ! %win %gc wxMetafile* Close() %endclass %endif ! %endif //wxLUA_USE_wxMetafile && wxUSE_METAFILE && (%msw|%mac|%os2) Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** data.i 18 Jun 2007 19:51:26 -0000 1.36 --- data.i 25 Jun 2007 03:19:37 -0000 1.37 *************** *** 14,18 **** // functions that return wxStrings actually return lua strings. ! %class %noclassinfo %encapsulate wxString wxString(const wxString& str = "") --- 14,18 ---- // functions that return wxStrings actually return lua strings. ! %class %delete %noclassinfo %encapsulate wxString wxString(const wxString& str = "") *************** *** 56,59 **** --- 56,62 ---- // --------------------------------------------------------------------------- // wxClientData + // + // No %delete since the container will delete it and you should only create one + // of these if you plan on attaching it to a container to avoid a memory leak. //%enum wxClientDataType - used internally so we don't need it *************** *** 70,73 **** --- 73,79 ---- // --------------------------------------------------------------------------- // wxStringClientData + // + // No %delete since the container will delete it and you should only create one + // of these if you plan on attaching it to a container to avoid a memory leak. %class %noclassinfo wxStringClientData, wxClientData *************** *** 99,103 **** %include "wx/object.h" ! %function wxObject * wxCreateDynamicObject(const wxString& className) %class %delete wxObject --- 105,109 ---- %include "wx/object.h" ! %function wxObject* wxCreateDynamicObject(const wxString& className) %class %delete wxObject *************** *** 119,123 **** %endclass ! %class %noclassinfo wxObjectRefData int GetRefCount() const %endclass --- 125,129 ---- %endclass ! %class %noclassinfo wxObjectRefData // no %delete since this should be from a wxObject int GetRefCount() const %endclass *************** *** 132,136 **** %include "wx/object.h" ! %class %noclassinfo wxClassInfo // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) --- 138,142 ---- %include "wx/object.h" ! %class %noclassinfo wxClassInfo // no %delete since we're always getting a static instance // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) *************** *** 157,161 **** // wxValidator ! %if wxLUA_USE_wxValidator & wxUSE_VALIDATORS %include "wx/validate.h" --- 163,167 ---- // wxValidator ! %if wxLUA_USE_wxValidator && wxUSE_VALIDATORS %include "wx/validate.h" *************** *** 245,254 **** %endif //wxLUA_USE_wxGenericValidator ! %endif //wxLUA_USE_wxValidator & wxUSE_VALIDATORS // --------------------------------------------------------------------------- // wxList ! %if wxLUA_USE_wxList & !wxUSE_STL %include "wx/list.h" --- 251,260 ---- %endif //wxLUA_USE_wxGenericValidator ! %endif //wxLUA_USE_wxValidator && wxUSE_VALIDATORS // --------------------------------------------------------------------------- // wxList ! %if wxLUA_USE_wxList && !wxUSE_STL %include "wx/list.h" *************** *** 260,264 **** %endenum ! %class wxList, wxObject wxList() --- 266,270 ---- %endenum ! %class %delete wxList, wxObject wxList() *************** *** 288,292 **** // wxNode - wxList ! %class %noclassinfo wxNode // no constructor, just use this from a wxList --- 294,298 ---- // wxNode - wxList ! %class %noclassinfo wxNode // no %delete since we get this from a wxList // no constructor, just use this from a wxList *************** *** 315,322 **** %endclass ! %endif //wxLUA_USE_wxList & !wxUSE_STL // --------------------------------------------------------------------------- ! // wxArray - can't implement is not really a class, here's the list of generic functions //%class %noclassinfo wxArray --- 321,329 ---- %endclass ! %endif //wxLUA_USE_wxList && !wxUSE_STL // --------------------------------------------------------------------------- ! // wxArray - Can't implement this since it's not really a class. ! // Here's the list of generic functions. //%class %noclassinfo wxArray *************** *** 356,362 **** int GetCount() const bool IsEmpty() const ! int Index(int n, bool searchFromEnd = false) void Insert( int num, int n, int copies = 1 ) ! int Item( int n ) void Remove(int n) void RemoveAt(size_t index) --- 363,369 ---- int GetCount() const bool IsEmpty() const ! int Index(int n, bool searchFromEnd = false) void Insert( int num, int n, int copies = 1 ) ! int Item( int n ) void Remove(int n) void RemoveAt(size_t index) *************** *** 387,392 **** void Clear() void Empty() ! int GetCount() const ! int Index(const wxString &sz, bool bCase = true, bool bFromEnd = false) void Insert(const wxString& str, int nIndex, size_t copies = 1) bool IsEmpty() --- 394,399 ---- void Clear() void Empty() ! int GetCount() const ! int Index(const wxString &sz, bool bCase = true, bool bFromEnd = false) void Insert(const wxString& str, int nIndex, size_t copies = 1) bool IsEmpty() *************** *** 410,414 **** %class %delete %noclassinfo %encapsulate wxSortedArrayString, wxArrayString wxSortedArrayString() ! wxSortedArrayString(const wxArrayString& src) // have to have this constructor since they're not derived wxSortedArrayString(const wxSortedArrayString& src) --- 417,421 ---- %class %delete %noclassinfo %encapsulate wxSortedArrayString, wxArrayString wxSortedArrayString() ! wxSortedArrayString(const wxArrayString& src) // have to have this constructor since they're not actually derived wxSortedArrayString(const wxSortedArrayString& src) *************** *** 457,461 **** // %wxchkver_2_6 wxHashTable::Node * Next() // void Put(long key, wxObject *object) ! // void Put(const wxString & key, wxObject *object) // int GetCount() const //%endclass --- 464,468 ---- // %wxchkver_2_6 wxHashTable::Node * Next() // void Put(long key, wxObject *object) ! // void Put(const wxString& key, wxObject *object) // int GetCount() const //%endclass *************** *** 464,469 **** // --------------------------------------------------------------------------- ! // wxLongLong - FIXME it's a typedef so %encapsulate fails on class wxLongLong ! // Works in GCC %if wxUSE_LONGLONG --- 471,475 ---- // --------------------------------------------------------------------------- ! // wxLongLong %if wxUSE_LONGLONG *************** *** 471,475 **** %include "wx/longlong.h" ! %class %encapsulate %delete %noclassinfo wxLongLong wxLongLong(long hi = 0, unsigned long lo = 0) --- 477,481 ---- %include "wx/longlong.h" ! %class %delete %encapsulate %noclassinfo wxLongLong wxLongLong(long hi = 0, unsigned long lo = 0) *************** *** 492,496 **** // wxULongLong ! %class %encapsulate %delete %noclassinfo wxULongLong wxULongLong(unsigned long hi = 0, unsigned long lo = 0) --- 498,502 ---- // wxULongLong ! %class %delete %encapsulate %noclassinfo wxULongLong wxULongLong(unsigned long hi = 0, unsigned long lo = 0) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** wx_datatypes.lua 20 Jun 2007 22:57:34 -0000 1.76 --- wx_datatypes.lua 25 Jun 2007 03:19:38 -0000 1.77 *************** *** 284,294 **** Name = "wxArrayString", }, - wxArrayTreeItemIds = { - Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", - DefType = "class", - Encapsulate = true, - IsNumber = false, - Name = "wxArrayTreeItemIds", - }, wxArrayVideoModes = { Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", --- 284,287 ---- *************** *** 501,504 **** --- 494,498 ---- Condition = "wxLUA_USE_wxCaret && wxUSE_CARET", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCaret", *************** *** 693,696 **** --- 687,691 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfig", *************** *** 699,702 **** --- 694,698 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfigBase", *************** *** 804,807 **** --- 800,804 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataInputStream", *************** *** 838,841 **** --- 835,839 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataOutputStream", *************** *** 1142,1145 **** --- 1140,1144 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileConfig", *************** *** 1185,1188 **** --- 1184,1188 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileInputStream", *************** *** 1210,1213 **** --- 1210,1214 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileOutputStream", *************** *** 1246,1249 **** --- 1247,1251 ---- }, wxFindReplaceData = { + BaseClass = "wxObject", Condition = "wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog", DefType = "class", *************** *** 1671,1674 **** --- 1673,1677 ---- Condition = "wxLUA_USE_wxGrid && wxUSE_GRID", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGridTableMessage", *************** *** 2243,2246 **** --- 2246,2250 ---- }, wxLogNull = { + BaseClass = "wxLog", Condition = "wxUSE_LOG", DefType = "class", *************** *** 2361,2364 **** --- 2365,2369 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxMemoryConfig", *************** *** 2699,2703 **** wxPlatformInfo = { DefType = "class", - Encapsulate = true, IsNumber = false, Name = "wxPlatformInfo", --- 2704,2707 ---- *************** *** 3255,3259 **** Condition = "wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxStandardPaths", DefType = "class", - Encapsulate = true, IsNumber = false, Name = "wxStandardPaths", --- 3259,3262 ---- *************** *** 3635,3644 **** Name = "wxTreeEvent", }, - wxTreeItemAttr = { - Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", - DefType = "class", - IsNumber = false, - Name = "wxTreeItemAttr", - }, wxTreeItemData = { BaseClass = "wxClientData", --- 3638,3641 ---- *************** *** 3793,3796 **** --- 3790,3794 ---- wxVisualAttributes = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxVisualAttributes", Index: print.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/print.i,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** print.i 18 Jun 2007 02:56:24 -0000 1.20 --- print.i 25 Jun 2007 03:19:38 -0000 1.21 *************** *** 8,12 **** // =========================================================================== ! %if wxLUA_USE_wxPrint & wxUSE_PRINTING_ARCHITECTURE %typedef wxPreviewWindow wxScrolledWindow --- 8,12 ---- // =========================================================================== ! %if wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE %typedef wxPreviewWindow wxScrolledWindow *************** *** 533,536 **** %endif // %msw|%mac ! %endif //wxLUA_USE_wxPrint & wxUSE_PRINTING_ARCHITECTURE --- 533,536 ---- %endif // %msw|%mac ! %endif //wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE Index: file.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/file.i,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** file.i 18 Jun 2007 02:56:24 -0000 1.26 --- file.i 25 Jun 2007 03:19:37 -0000 1.27 *************** *** 159,162 **** --- 159,163 ---- void Clear() void ClearExt() + // Use AssignTempFileName(...) equivalents //!%wxchkver_2_8 static wxString CreateTempFileName(const wxString& prefix, wxFile *fileTemp = NULL) *************** *** 164,167 **** --- 165,169 ---- //%wxchkver_2_8&&wxUSE_FILE static wxString CreateTempFileName(const wxString& prefix, wxFile *fileTemp) //%wxchkver_2_8&&wxUSE_FFILE static wxString CreateTempFileName(const wxString& prefix, wxFFile *fileTemp); + bool DirExists() static bool DirExists(const wxString& dir) *************** *** 194,199 **** static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE) wxString GetShortPath() const ! %wxchkver_2_8 wxULongLong GetSize() const ! //%wxchkver_2_8 static wxULongLong GetSize(const wxString &file) // %override [bool, wxDateTime dtAccess, wxDateTime dtMod, wxDateTime dtCreate] wxFileName::GetTimes() --- 196,204 ---- static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE) wxString GetShortPath() const ! ! %if %wxchkver_2_8 ! wxULongLong GetSize() const ! static wxULongLong GetSize(const wxString &file) ! %endif // %wxchkver_2_8 // %override [bool, wxDateTime dtAccess, wxDateTime dtMod, wxDateTime dtCreate] wxFileName::GetTimes() *************** *** 213,226 **** bool IsRelative(wxPathFormat format = wxPATH_NATIVE) bool IsDir() const ! %wxchkver_2_8 bool IsDirWritable() const ! //%wxchkver_2_8 static bool IsDirWritable(const wxString &path) ! %wxchkver_2_8 bool IsDirReadable() const ! //%wxchkver_2_8 static bool IsDirReadable(const wxString &path) ! %wxchkver_2_8 bool IsFileWritable() const ! //%wxchkver_2_8 static bool IsFileWritable(const wxString &path) ! %wxchkver_2_8 bool IsFileReadable() const ! //%wxchkver_2_8 static bool IsFileReadable(const wxString &path) ! %wxchkver_2_8 bool IsFileExecutable() const ! //%wxchkver_2_8 static bool IsFileExecutable(const wxString &path) //static bool MacFindDefaultTypeAndCreator(const wxString& ext, wxUint32* type, wxUint32* creator) //bool MacSetDefaultTypeAndCreator() --- 218,235 ---- bool IsRelative(wxPathFormat format = wxPATH_NATIVE) bool IsDir() const ! ! %if %wxchkver_2_8 ! bool IsDirWritable() const ! static bool IsDirWritable(const wxString &path) ! bool IsDirReadable() const ! static bool IsDirReadable(const wxString &path) ! bool IsFileWritable() const ! static bool IsFileWritable(const wxString &path) ! bool IsFileReadable() const ! static bool IsFileReadable(const wxString &path) ! bool IsFileExecutable() const ! static bool IsFileExecutable(const wxString &path) ! %endif // %wxchkver_2_8 ! //static bool MacFindDefaultTypeAndCreator(const wxString& ext, wxUint32* type, wxUint32* creator) //bool MacSetDefaultTypeAndCreator() *************** *** 267,271 **** // wxFile ! %if wxLUA_USE_wxFile & wxUSE_FILE %include "wx/file.h" --- 276,280 ---- // wxFile ! %if wxLUA_USE_wxFile && wxUSE_FILE %include "wx/file.h" *************** *** 349,353 **** %include "wx/file.h" ! %class %noclassinfo %encapsulate %delete wxTempFile wxTempFile() // associates the temp file with the file to be replaced and opens it --- 358,362 ---- %include "wx/file.h" ! %class %delete %noclassinfo %encapsulate wxTempFile wxTempFile() // associates the temp file with the file to be replaced and opens it *************** *** 377,381 **** %endclass ! %endif //wxLUA_USE_wxFile & wxUSE_FILE // --------------------------------------------------------------------------- --- 386,390 ---- %endclass ! %endif //wxLUA_USE_wxFile && wxUSE_FILE // --------------------------------------------------------------------------- *************** *** 417,422 **** bool Open(const wxString& dir) ! %wxchkver_2_8 static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT) ! %wxchkver_2_8 static wxULongLong GetTotalSize(const wxString &dir) //, wxArrayString *filesSkipped = NULL) FIXME override // We don't need wxDirTraverser, just use wxDir methods GetFirst, GetNext. --- 426,433 ---- bool Open(const wxString& dir) ! %if %wxchkver_2_8 ! static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT) ! static wxULongLong GetTotalSize(const wxString &dir) //, wxArrayString *filesSkipped = NULL) FIXME override ! %endif // %wxchkver_2_8 // We don't need wxDirTraverser, just use wxDir methods GetFirst, GetNext. *************** *** 647,651 **** %class %noclassinfo wxOutputStream, wxStreamBase ! // wxOutputStream() this os only a base class bool Close() --- 658,662 ---- %class %noclassinfo wxOutputStream, wxStreamBase ! // wxOutputStream() this is only a base class bool Close() *************** *** 667,671 **** %include "wx/wfstream.h" ! %class %noclassinfo wxFileInputStream, wxInputStream wxFileInputStream(const wxString& fileName) wxFileInputStream(wxFile& file) --- 678,682 ---- %include "wx/wfstream.h" ! %class %delete %noclassinfo %encapsulate wxFileInputStream, wxInputStream wxFileInputStream(const wxString& fileName) wxFileInputStream(wxFile& file) *************** *** 678,682 **** // wxFileOutputStream ! %class %noclassinfo wxFileOutputStream, wxOutputStream wxFileOutputStream(const wxString& fileName) wxFileOutputStream(wxFile& file) --- 689,693 ---- // wxFileOutputStream ! %class %delete %noclassinfo %encapsulate wxFileOutputStream, wxOutputStream wxFileOutputStream(const wxString& fileName) wxFileOutputStream(wxFile& file) *************** *** 691,701 **** %include "wx/datstrm.h" ! %class %noclassinfo wxDataInputStream ! //%if wxUSE_UNICODE ! // wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto()); ! //%endif // wxUSE_UNICODE ! //%if !wxUSE_UNICODE wxDataInputStream(wxInputStream& s) - //%endif // !wxUSE_UNICODE bool IsOk() --- 702,708 ---- %include "wx/datstrm.h" ! %class %delete %noclassinfo %encapsulate wxDataInputStream ! // wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataInputStream(wxInputStream& s) bool IsOk() *************** *** 738,747 **** %include "wx/datstrm.h" ! %class %noclassinfo wxDataOutputStream ! //#if wxUSE_UNICODE ! // wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto()); ! //#else wxDataOutputStream(wxOutputStream& s); - //#endif bool IsOk() --- 745,751 ---- %include "wx/datstrm.h" ! %class %delete %noclassinfo %encapsulate wxDataOutputStream ! // wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataOutputStream(wxOutputStream& s); bool IsOk() Index: regex.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/regex.i,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** regex.i 17 Jun 2007 17:17:37 -0000 1.10 --- regex.i 25 Jun 2007 03:19:38 -0000 1.11 *************** *** 11,15 **** // wxRegEx - Regular expression support ! %if wxLUA_USE_wxRegEx & wxUSE_REGEX %include "wx/regex.h" --- 11,15 ---- // wxRegEx - Regular expression support ! %if wxLUA_USE_wxRegEx && wxUSE_REGEX %include "wx/regex.h" *************** *** 59,62 **** %endclass ! %endif //wxLUA_USE_wxRegEx & wxUSE_REGEX --- 59,62 ---- %endclass ! %endif //wxLUA_USE_wxRegEx && wxUSE_REGEX Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** dialogs.i 19 Jun 2007 22:26:46 -0000 1.36 --- dialogs.i 25 Jun 2007 03:19:37 -0000 1.37 *************** *** 95,103 **** wxDialog() wxDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") //void Centre(int direction = wxBOTH) - see wxWindow - bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") wxUSE_BUTTON wxSizer* CreateButtonSizer(long flags) ! %wxchkver_2_8&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) wxUSE_BUTTON wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags) wxUSE_STATTEXT wxSizer *CreateTextSizer( const wxString &message ) --- 95,103 ---- wxDialog() wxDialog(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") + bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "wxDialog") //void Centre(int direction = wxBOTH) - see wxWindow wxUSE_BUTTON wxSizer* CreateButtonSizer(long flags) ! %wxchkver_2_8&&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) wxUSE_BUTTON wxStdDialogButtonSizer* CreateStdDialogButtonSizer(long flags) wxUSE_STATTEXT wxSizer *CreateTextSizer( const wxString &message ) *************** *** 124,132 **** // wxAboutDialog ! %if %wxchkver_2_8 & wxUSE_ABOUTDLG & wxLUA_USE_wxAboutDialog %include "wx/aboutdlg.h" ! %class %noclassinfo %encapsulate %delete wxAboutDialogInfo wxAboutDialogInfo() --- 124,132 ---- // wxAboutDialog ! %if %wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog %include "wx/aboutdlg.h" ! %class %delete %noclassinfo %encapsulate wxAboutDialogInfo wxAboutDialogInfo() *************** *** 189,198 **** %function void wxAboutBox(const wxAboutDialogInfo& info) ! %endif //%wxchkver_2_8 & wxUSE_ABOUTDLG & wxLUA_USE_wxAboutDialog // --------------------------------------------------------------------------- // wxColourDialog ! %if wxLUA_USE_wxColourDialog & wxUSE_COLOURDLG %include "wx/colordlg.h" --- 189,198 ---- %function void wxAboutBox(const wxAboutDialogInfo& info) ! %endif //%wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog // --------------------------------------------------------------------------- // wxColourDialog ! %if wxLUA_USE_wxColourDialog && wxUSE_COLOURDLG %include "wx/colordlg.h" *************** *** 223,232 **** %endclass ! %endif // wxLUA_USE_wxColourDialog & wxUSE_COLOURDLG // --------------------------------------------------------------------------- // wxFileDialog ! %if wxLUA_USE_wxFileDialog & wxUSE_FILEDLG %include "wx/filedlg.h" --- 223,232 ---- %endclass ! %endif // wxLUA_USE_wxColourDialog && wxUSE_COLOURDLG // --------------------------------------------------------------------------- // wxFileDialog ! %if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG %include "wx/filedlg.h" *************** *** 239,245 **** %not_overload !%wxchkver_2_8 wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition) %not_overload %wxchkver_2_8 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") - - // since there's no default constructor in MSW you can't call this so it's best to not have it at all //%wxchkver_2_8 bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") wxString GetDirectory() const wxString GetFilename() const --- 239,244 ---- %not_overload !%wxchkver_2_8 wxFileDialog(wxWindow* parent, const wxString& message = "Choose a file", const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildcard = "*.*", long style = 0, const wxPoint& pos = wxDefaultPosition) %not_overload %wxchkver_2_8 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") //%wxchkver_2_8 bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") + wxString GetDirectory() const wxString GetFilename() const *************** *** 269,278 **** %endclass ! %endif //wxLUA_USE_wxFileDialog & wxUSE_FILEDLG // --------------------------------------------------------------------------- // wxDirDialog ! %if wxLUA_USE_wxDirDialog & wxUSE_DIRDLG %include "wx/dirdlg.h" --- 268,277 ---- %endclass ! %endif //wxLUA_USE_wxFileDialog && wxUSE_FILEDLG // --------------------------------------------------------------------------- // wxDirDialog ! %if wxLUA_USE_wxDirDialog && wxUSE_DIRDLG %include "wx/dirdlg.h" *************** *** 295,307 **** %endclass ! %endif //wxLUA_USE_wxDirDialog & wxUSE_DIRDLG // --------------------------------------------------------------------------- // wxMessageDialog ! %if wxLUA_USE_wxMessageDialog & wxUSE_MSGDLG ! ! //%win %class wxMessageDialog, wxDialog FIXME need this for < 2.6 does 2.4 have it? ! //%gtk|%mac %class %noclassinfo wxMessageDialog, wxDialog %class wxMessageDialog, wxDialog --- 294,303 ---- %endclass ! %endif //wxLUA_USE_wxDirDialog && wxUSE_DIRDLG // --------------------------------------------------------------------------- // wxMessageDialog ! %if wxLUA_USE_wxMessageDialog && wxUSE_MSGDLG %class wxMessageDialog, wxDialog *************** *** 311,320 **** %endclass ! %endif //wxLUA_USE_wxMessageDialog & wxUSE_MSGDLG // --------------------------------------------------------------------------- // wxMultiChoiceDialog - use wxGetMultipleChoices ! %if wxUSE_CHOICEDLG & wxLUA_USE_wxMultiChoiceDialog %class wxMultiChoiceDialog, wxDialog --- 307,316 ---- %endclass ! %endif //wxLUA_USE_wxMessageDialog && wxUSE_MSGDLG // --------------------------------------------------------------------------- // wxMultiChoiceDialog - use wxGetMultipleChoices ! %if wxUSE_CHOICEDLG && wxLUA_USE_wxMultiChoiceDialog %class wxMultiChoiceDialog, wxDialog *************** *** 326,340 **** %endclass ! %endif //wxUSE_CHOICEDLG & wxLUA_USE_wxMultiChoiceDialog // --------------------------------------------------------------------------- // wxSingleChoiceDialog - use wxGetSingleChoice or wxGetSingleChoiceIndex ! %if wxUSE_CHOICEDLG & wxLUA_USE_wxSingleChoiceDialog %class wxSingleChoiceDialog, wxDialog ! // %override wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void** clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ! // C++ Func: wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ! wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void** clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) int GetSelection() const --- 322,336 ---- %endclass ! %endif //wxUSE_CHOICEDLG && wxLUA_USE_wxMultiChoiceDialog // --------------------------------------------------------------------------- // wxSingleChoiceDialog - use wxGetSingleChoice or wxGetSingleChoiceIndex ! %if wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog %class wxSingleChoiceDialog, wxDialog ! // %override wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ! // C++ Func: wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, void** clientData = NULL, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) ! wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) int GetSelection() const *************** *** 344,353 **** %endclass ! %endif //wxUSE_CHOICEDLG & wxLUA_USE_wxSingleChoiceDialog // --------------------------------------------------------------------------- // wxTextEntryDialog - see also wxGetTextFromUser ! %if wxUSE_TEXTDLG & wxLUA_USE_wxTextEntryDialog %define wxTextEntryDialogStyle --- 340,349 ---- %endclass ! %endif //wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog // --------------------------------------------------------------------------- // wxTextEntryDialog - see also wxGetTextFromUser ! %if wxUSE_TEXTDLG && wxLUA_USE_wxTextEntryDialog %define wxTextEntryDialogStyle *************** *** 364,367 **** --- 360,366 ---- // wxPasswordEntryDialog - see also wxGetPasswordFromUser + %define_string wxGetPasswordFromUserPromptStr + %define wxTextEntryDialogStyle + %class wxPasswordEntryDialog, wxTextEntryDialog wxPasswordEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetPasswordFromUserPromptStr, const wxString& value = "", long style = wxTextEntryDialogStyle, const wxPoint& pos = wxDefaultPosition) *************** *** 369,378 **** %endclass ! %endif //wxUSE_TEXTDLG & wxLUA_USE_wxTextEntryDialog // --------------------------------------------------------------------------- // wxFontDialog ! %if wxUSE_FONTDLG & wxLUA_USE_wxFontDialog %include "wx/fontdlg.h" --- 368,377 ---- %endclass ! %endif //wxUSE_TEXTDLG && wxLUA_USE_wxTextEntryDialog // --------------------------------------------------------------------------- // wxFontDialog ! %if wxUSE_FONTDLG && wxLUA_USE_wxFontDialog %include "wx/fontdlg.h" *************** *** 409,418 **** %endclass ! %endif //wxUSE_FONTDLG & wxLUA_USE_wxFontDialog // --------------------------------------------------------------------------- // wxFindReplaceDialog ! %if wxUSE_FINDREPLDLG & wxLUA_USE_wxFindReplaceDialog %include "wx/fdrepdlg.h" --- 408,417 ---- %endclass ! %endif //wxUSE_FONTDLG && wxLUA_USE_wxFontDialog // --------------------------------------------------------------------------- // wxFindReplaceDialog ! %if wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog %include "wx/fdrepdlg.h" *************** *** 428,433 **** wxFindReplaceDialog() wxFindReplaceDialog(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) - bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) const wxFindReplaceData *GetData() void SetData(wxFindReplaceData *findData) --- 427,432 ---- wxFindReplaceDialog() wxFindReplaceDialog(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) + bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) const wxFindReplaceData *GetData() void SetData(wxFindReplaceData *findData) *************** *** 435,439 **** // --------------------------------------------------------------------------- ! // wxFindReplaceData %enum wxFindReplaceFlags --- 434,439 ---- // --------------------------------------------------------------------------- ! // wxFindReplaceData - Note this must exist while used in a wxFindReplaceDialog ! // and you should delete() it only when the dialog is closed. %enum wxFindReplaceFlags *************** *** 443,447 **** %endenum ! %class %delete %noclassinfo wxFindReplaceData wxFindReplaceData(int flags = 0) --- 443,447 ---- %endenum ! %class %delete %noclassinfo wxFindReplaceData, wxObject wxFindReplaceData(int flags = 0) *************** *** 475,484 **** %endclass ! %endif //wxUSE_FINDREPLDLG & wxLUA_USE_wxFindReplaceDialog // --------------------------------------------------------------------------- // wxProgressDialog ! %if wxUSE_PROGRESSDLG & wxLUA_USE_wxProgressDialog %include "wx/generic/progdlgg.h" --- 475,484 ---- %endclass ! %endif //wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog // --------------------------------------------------------------------------- // wxProgressDialog ! %if wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog %include "wx/generic/progdlgg.h" *************** *** 504,508 **** %endclass ! %endif //wxUSE_PROGRESSDLG & wxLUA_USE_wxProgressDialog // --------------------------------------------------------------------------- --- 504,508 ---- %endclass ! %endif //wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog // --------------------------------------------------------------------------- *************** *** 550,554 **** // wxWizard ! %if wxUSE_WIZARDDLG & wxLUA_USE_wxWizard %include "wx/wizard.h" --- 550,554 ---- // wxWizard ! %if wxUSE_WIZARDDLG && wxLUA_USE_wxWizard %include "wx/wizard.h" *************** *** 559,564 **** wxWizard() wxWizard(wxWindow* parent, int id = -1, const wxString& title = "", const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE) - bool Create(wxWindow* parent, int id = -1, const wxString& title = "", const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE) wxWizardPage* GetCurrentPage() const virtual wxSizer* GetPageAreaSizer() const --- 559,564 ---- wxWizard() wxWizard(wxWindow* parent, in... [truncated message content] |
From: John L. <jr...@us...> - 2007-06-25 03:20:18
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/docs Modified Files: FAQ.html binding.html changelog.txt wxluaref.html Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxluaref.html 20 Jun 2007 22:57:34 -0000 1.31 --- wxluaref.html 25 Jun 2007 03:19:38 -0000 1.32 *************** *** 119,127 **** <td>Interchangeable with a numeric indexed lua table <tr> - <td><a href="#wxArrayTreeItemIds">wxArrayTreeItemIds</a> - <td bgcolor=FFAAAA> - <td align="center" bgcolor=AAFFAA>X - <td> - <tr> <td><a href="#wxArrayVideoModes">wxArrayVideoModes</a> <td bgcolor=FFAAAA> --- 119,122 ---- [...5752 lines suppressed...] <br> --- 22839,22843 ---- </font></blockquote><font color=#DD0000><font color=#DD0000><i>%endstruct</i></font></font><font color=#888888><br> <br> ! */</font><br> <br> <br> *************** *** 22763,22767 **** <br> <a href="#wxString">wxString</a> GetLuaTagName(int tag) const<br> ! </font>*/<br> </blockquote><font color=#DD0000><font color=#DD0000><i>%endclass</i></font></font><br> <br> --- 22869,22873 ---- <br> <a href="#wxString">wxString</a> GetLuaTagName(int tag) const<br> ! */</font><br> </blockquote><font color=#DD0000><font color=#DD0000><i>%endclass</i></font></font><br> <br> Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** changelog.txt 16 Jun 2007 06:21:43 -0000 1.37 --- changelog.txt 25 Jun 2007 03:19:38 -0000 1.38 *************** *** 109,112 **** --- 109,116 ---- it always created it's ref data even if it wasn't used. + - Add %gc, %ungc, %gc_this, and %ungc_this tags for fine tuning of tracking + and releasing userdata objects by functions that take ownership of the data + or release it. + version 2.8.0.0 (released 24/12/2006) -------------------------------------------------------------------- Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** binding.html 14 Jun 2007 23:59:42 -0000 1.22 --- binding.html 25 Jun 2007 03:19:38 -0000 1.23 *************** *** 1,10 **** <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html><head> ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Binding HowTo</title> ! <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLuaBinding - writing and generating the binding files</u> ! </h2><div style="text-align: justify;">The binding generator for wxLua provides information for lua code to [...2351 lines suppressed...] %__WXPM__<br> + %__WXSTUBS__<br> + %__WXXT__<br> + %__WXX11__<br> + %__WXWINE__<br> + %__WXUNIVERSAL__<br> + %__X__<br> + %__WXWINCE__<br> ! ! <br> ! ! </body> ! </html> Index: FAQ.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/FAQ.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FAQ.html 17 Jun 2007 17:17:38 -0000 1.2 --- FAQ.html 25 Jun 2007 03:19:38 -0000 1.3 *************** *** 1,64 **** <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html><head> ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua FAQ</title> ! <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLua FAQ</u></h2> ! <ol> <li><a href="#Why_wxLua">Why wxLua?</a></li> ! <ol> <li><a href="#Whats_best_for_my_needs:_wxLua">What's best for my needs: wxLua, wxPython, wxSomethingElse?</a></li> ! <li><a href="FAQ.html#Can_I_use_wxLua_as_script_interpreter">Can I use wxLua as script interpreter embedded in my own C++ applications?</a></li> ! </ol> <li><a href="#Programming_in_wxLua">Programming ! in wxLua</a></li><ol><li><a href="#wxStrings">wxStrings?</a></li><li><a href="#wxArrayString_and_wxSortedArrayString">wxArrayString and wxSortedArrayString?</a></li><li><a href="#wxArrayInt">wxArrayInt?</a></li><li><a href="#When_and_how_should_you_delete_objects">When and how should you delete() objects?</a></li><li><a href="#Why_do_the_samples_use_the_function">Why do the samples use the function main() is it special to wxLua?</a></li></ol> ! </ol><hr size="2" width="100%"> ! <ol> <li> <h3><a name="Why_wxLua"></a>Why ! wxLua?</h3> </li> <ul> <li>Because the Lua ! language is easy and "fun" to program in. </li> <li>It vaguely looks like BASIC or C which many people are familiar with.</li> ! <li>The code is very readable, almost no special ! notation, gotchas, or oddball constructs that require a large ! shift in thinking from BASIC or C.</li> <li>Size : The Lua interpreter itself is ~100Kb, wxWidgets adds the remaining few Mb.</li> ! <li>Speed : Lua is one of the fastest interpreted languages, see ! the Great Computer Language Shootout.</li> <li>Again, why ! Lua? See <a href="http://www.lua.org/about.html">http://www.lua.org/about.html</a></li></ul><ol><li><h4><a name="Whats_best_for_my_needs:_wxLua"></a>What's best ! for my needs: wxLua, wxPython, wxSomethingElse?</h4></li><ol> ! <ol> </ol></ol><ul><li>It depends: wxPython has a much larger footprint and greater overhead than wxLua, but it does provide more add-ons from the Python standard ! library.</li><li>On the other hand, wxLua is as large as ! the wxWidgets library + ~100Kb for Lua + ~500Kb for the wxLua ! library.</li><li>wxLua can be easily interfaced with C++ code making it a powerful ! extension language, which is exactly the intent of its ! designers.</li><li>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present in wxLua out-of-the-box, then you should use wxPython. Instead, if you want to write applications with little overhead or ! extend your C++ applications, go for wxLua.</li></ul><li><h4><a name="Can_I_use_wxLua_as_script_interpreter"></a>Can I ! use wxLua as script interpreter embedded in my own C++ applications?</h4></li><ul><li>Yes! ! That's explained on the wxLua homepage. </li><li>This is one of the strong points of wxLua: it can be a lightweight, fast interpreter to extend ! your application and let the user customize it... </li><li>You may create as ! many wxLua interpreters in a single program as you like.</li> </ul></ol><li><h3><a name="Programming_in_wxLua"></a>Programming in wxLua</h3></li><ol><li><h4><a name="wxStrings"></a>wxStrings?</h4></li><ul><li>wxLua uses Lua strings and so all functions that take or return a wxString take or return a Lua string.</li><li>However, you can also use a wxString is you really want.</li></ul><li><h4><a name="wxArrayString_and_wxSortedArrayString"></a>wxArrayString and wxSortedArrayString?</h4></li><ul><li>All functions that take a wxArrayString or wxSortedArrayString can also take a numerically indexed table of strings.</li><li>Functions that return wxArrayStrings or wxSortedArrayStrings will return a wxArrayString or wxSortedArrayString unless specified otherwise in ! wxluaref.html</li></ul><li><h4><a name="wxArrayInt"></a>wxArrayInt?</h4></li><ul><li>All functions that take a wxArrayInt can also take a numerically indexed table of numbers.</li><li>Functions that return wxArrayInts will return a wxArrayInt unless specified otherwise in wxluaref.html.</li></ul><li><h4><a name="When_and_how_should_you_delete_objects"></a>When and how should you delete() objects?</h4></li><ul><li>You should read the section "C++ Classes ! CLASS_NAME" in the "Programming in wxLua" in the wxlua.html manual.</li><li>In short, all objects that you create that deal with graphics should be ! deleted as soon as they're no longer used. Functions that take a "const ! wxPen& pen" or any wxObject derived class that is passed ! to a function that is const and not a pointer* will make a refed ! copy of them and so you may delete them.</li><li>Use the wxLua added function delete() to delete them.</li><li>Use the function "table = wxlua.GetTrackedUserdata()" to get a table of ! items that are tracked and occasionally print them out while developing ! a program.</li></ul><li><h4><a name="Why_do_the_samples_use_the_function"></a>Why do the samples use the function main() is it special to wxLua?</h4></li><ul><li>There's nothing special about the function main() other than that it's a common name for an entry point into a program.</li><li>It is often helpful and a good idea to encapsulate the program initialization code within a function so that you can use local variables and not pollute the global table with temporary variables ! that won't be needed again.</li><li>Additionally, it allows you to break out of this initialization code at any point by putting <span style="font-style: italic;">"do return end"</span> inside of the function for debugging, as opposed to wrapping parts you don't want using <span style="font-style: italic;">"if false then ... end"</span>.</li></ul></ol><ol><ol> ! </ol></ol><ul> </ul> </ol></body></html> \ No newline at end of file --- 1,322 ---- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html> ! <head> ! ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> ! <title>wxLua FAQ</title> ! ! ! <meta content="John Labenski" name="author"> ! ! </head> ! ! <body> ! ! <h2><u>wxLua FAQ</u></h2> ! ! <ol> ! ! <li><a href="#Why_wxLua">Why wxLua?</a></li> ! ! <ol> ! ! <li><a href="#Whats_best_for_my_needs:_wxLua">What's best for my needs: wxLua, wxPython, wxSomethingElse?</a></li> ! ! <li><a href="FAQ.html#Can_I_use_wxLua_as_script_interpreter">Can I use wxLua as script interpreter embedded in my own C++ applications?</a></li> ! ! </ol> ! ! <li><a href="#Programming_in_wxLua">Programming ! in wxLua</a></li> ! ! <ol> ! ! <li><a href="#wxStrings">wxStrings?</a></li> ! ! <li><a href="#wxArrayString_and_wxSortedArrayString">wxArrayString ! and wxSortedArrayString?</a></li> ! ! <li><a href="#wxArrayInt">wxArrayInt?</a></li> ! ! <li><a href="#When_and_how_should_you_delete_objects">When ! and how should you delete() objects?</a></li> ! ! <li><a href="#Why_do_the_samples_use_the_function">Why ! do the samples use the function main() is it special to wxLua?</a></li> ! ! <li><a href="#Why_are_the_error_messages_for_a_class">Why ! are the error messages for class member function calls shifted ! +1?</a></li> ! ! </ol> ! ! </ol> ! ! <hr size="2" width="100%"> ! <ol> ! ! <li> ! <h3><a name="Why_wxLua"></a>Why ! wxLua?</h3> ! ! </li> ! ! <ul> ! ! <li>Because the Lua ! language is easy and "fun" to program in. </li> ! ! <li>It vaguely looks like BASIC or C which many people are familiar with.</li> ! ! <li>The code is very readable, almost no special ! notation, gotchas, or oddball constructs that require a large ! shift in thinking from BASIC or C.</li> ! ! <li>Size : The Lua interpreter itself is ~100Kb, wxWidgets adds the remaining few Mb.</li> ! ! <li>Speed : Lua is one of the fastest interpreted languages, ! see ! the Great Computer Language Shootout.</li> ! ! <li>Again, why ! Lua? See <a href="http://www.lua.org/about.html">http://www.lua.org/about.html</a></li> ! ! </ul> ! ! <ol> ! ! <li> ! <h4><a name="Whats_best_for_my_needs:_wxLua"></a>What's ! best ! for my needs: wxLua, wxPython, wxSomethingElse?</h4> ! ! </li> ! ! <ol> ! ! <ol> ! ! </ol> ! ! </ol> ! ! <ul> ! ! <li>It depends: wxPython has a much larger footprint and greater overhead than wxLua, but it does provide more add-ons from the Python standard ! library.</li> ! ! <li>On the other hand, wxLua is as large as ! the wxWidgets library + ~100Kb for Lua + ~500Kb for the wxLua ! library.</li> ! ! <li>wxLua can be easily interfaced with C++ code making it a powerful ! extension language, which is exactly the intent of its ! designers.</li> ! ! <li>In conclusion, if you want to write an entire application in a scripting language and you need things supported by Python which are not present in wxLua out-of-the-box, then you should use wxPython. Instead, if you want to write applications with little overhead or ! extend your C++ applications, go for wxLua.</li> ! ! </ul> ! ! <li> ! <h4><a name="Can_I_use_wxLua_as_script_interpreter"></a>Can ! I ! use wxLua as script interpreter embedded in my own C++ applications?</h4> ! ! </li> ! ! <ul> ! ! <li>Yes! ! That's explained on the wxLua homepage. </li> ! ! <li>This is one of the strong points of wxLua: it can be a lightweight, fast interpreter to extend ! your application and let the user customize it... </li> ! ! <li>You may create as ! many wxLua interpreters in a single program as you like.</li> ! ! </ul> ! ! </ol> ! ! <li> ! <h3><a name="Programming_in_wxLua"></a>Programming ! in wxLua</h3> ! ! </li> ! ! <ol> ! ! <li> ! <h4><a name="wxStrings"></a>wxStrings?</h4> ! ! </li> ! ! <ul> ! ! <li>wxLua uses Lua strings and so all functions that take ! or return a wxString take or return a Lua string.</li> ! ! <li>However, you can also use a wxString is you really want.</li> ! ! </ul> ! ! <li> ! <h4><a name="wxArrayString_and_wxSortedArrayString"></a>wxArrayString ! and wxSortedArrayString?</h4> ! ! </li> ! ! <ul> ! ! <li>All functions that take a wxArrayString or ! wxSortedArrayString can also take a numerically indexed table of ! strings.</li> ! ! <li>Functions that return wxArrayStrings or wxSortedArrayStrings will return a wxArrayString or wxSortedArrayString unless specified otherwise in ! wxluaref.html</li> ! ! </ul> ! ! <li> ! <h4><a name="wxArrayInt"></a>wxArrayInt?</h4> ! ! </li> ! ! <ul> ! ! <li>All functions that take a wxArrayInt can also take a ! numerically indexed table of numbers.</li> ! ! <li>Functions that return wxArrayInts will return a ! wxArrayInt unless specified otherwise in wxluaref.html.</li> ! ! </ul> ! ! <li> ! <h4><a name="When_and_how_should_you_delete_objects"></a>When ! and how should you delete() objects?</h4> ! ! </li> ! ! <ul> ! ! <li>You should read the section "C++ Classes ! CLASS_NAME" in the "Programming in wxLua" in the wxlua.html manual.</li> ! ! <li>In short, all objects that you create that deal with graphics should be ! delete()ed as soon as they're no longer used. Functions that take a ! "const ! wxPen& pen" or any wxObject derived class ! that are passed ! to a function that is const and not a pointer* will make a ! refed ! copy of them and so you may delete them.</li> ! ! <li>Use the function "table = wxlua.GetTrackedUserdata()" to get a table of ! items that are tracked and occasionally print them out while developing your program.</li> ! ! <li>Class objects that have the <i>%delete</i> ! tag in their declaration (see wxluaref.html) will be automatically ! garbage collected or can be delete()ed with a wxLua added function for ! the class. There are, of course, exceptions and these occur when you ! pass the object to a function with the <i>%ungc</i> tag on ! the parameter you pass the object to. The ungarbage collect tag ! specifies that the object is now owned by something else and you can no ! longer delete it in wxLua.</li> ! ! <li>Bottom line - don't worry about delete()ing anything ! except graphics objects (for MSW really) or classes that specifically ! state (in wxluaref.html) that you should delete() them because the ! garbage collector may not do so soon enough.</li> ! ! </ul> ! ! <li> ! <h4><a name="Why_do_the_samples_use_the_function"></a>Why ! do the samples use the function main() is it special to wxLua?</h4> ! ! </li> ! ! <ul> ! ! <li>There's nothing special about the function main() other ! than that it's a common name for an entry point into a program.</li> ! ! <li>It is often helpful and a good idea to encapsulate the program initialization code within a function so that you can use local variables and not pollute the global table with temporary variables ! that won't be needed again.</li> ! ! <li>Additionally, it allows you to break out of this ! initialization code at any point by putting <span style="font-style: italic;">"do return end"</span> ! inside of the function for debugging, as opposed to wrapping parts you ! don't want using <span style="font-style: italic;">"if ! false then ... end"</span>.</li> ! ! </ul> ! ! <li> ! <h4><a name="Why_are_the_error_messages_for_a_class"></a>Why ! are the error messages for class member function calls shifted ! +1?</h4> ! ! </li> ! ! <ul> ! ! <li>Because the ':' calling convention is syntaxic sugar ! for putting the 'self' as the first parameter.</li> ! ! <li><i>s = wx.wxSize(1, 2); s:Set(3, 4)</i> ! is the same as <i>s.Set(s, 3, 4)</i> and the ! first parameter is always the self, therefore <i>s.Set(s, ! "hello", 4)</i> will give an error that parameter 2 is not a ! number.</li> ! ! <li>Unfortunately there is no way to tell whether the user ! has used the '.' or ':' calling convention and so the error message ! cannot be tailored for both static and nonstatic call member ! functions.</li> ! ! </ul> ! ! </ol> ! ! <ol> ! ! <ol> ! ! </ol> ! ! </ol> ! ! <ul> ! ! </ul> ! ! </ol> ! ! </body> ! </html> |
From: John L. <jr...@us...> - 2007-06-25 03:20:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** wxbind.h 20 Jun 2007 22:57:35 -0000 1.81 --- wxbind.h 25 Jun 2007 03:19:40 -0000 1.82 *************** *** 2429,2435 **** #if wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxArrayTreeItemIds; - extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxArrayTreeItemIds_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxArrayTreeItemIds_methodCount; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxTreeCtrl; extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxTreeCtrl_methods[]; --- 2429,2432 ---- *************** *** 2438,2444 **** extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxTreeEvent_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxTreeEvent_methodCount; - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxTreeItemAttr; - extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxTreeItemAttr_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxTreeItemAttr_methodCount; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxTreeItemData; extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxTreeItemData_methods[]; --- 2435,2438 ---- *************** *** 2618,2625 **** wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxMimeTypesManager, wxMimeTypesManager) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPathList, wxPathList) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPlatformInfo, wxPlatformInfo) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPropagateOnce, wxPropagateOnce) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPropagationDisabler, wxPropagationDisabler) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxString, wxString) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxWindowDisabler, wxWindowDisabler) --- 2612,2619 ---- wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxMimeTypesManager, wxMimeTypesManager) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPathList, wxPathList) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPropagateOnce, wxPropagateOnce) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxPropagationDisabler, wxPropagationDisabler) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxString, wxString) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxVisualAttributes, wxVisualAttributes) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxWindowDisabler, wxWindowDisabler) *************** *** 2628,2635 **** #endif // wxCHECK_VERSION(2,8,0) - #if wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxStandardPaths - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxStandardPaths, wxStandardPaths) - #endif // wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxStandardPaths - #if wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxAboutDialogInfo, wxAboutDialogInfo) --- 2622,2625 ---- *************** *** 2665,2668 **** --- 2655,2659 ---- #if wxLUA_USE_wxCaret && wxUSE_CARET + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxCaret, wxCaret) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxCaretSuspend, wxCaretSuspend) #endif // wxLUA_USE_wxCaret && wxUSE_CARET *************** *** 2673,2677 **** --- 2664,2672 ---- #if wxLUA_USE_wxConfig && wxUSE_CONFIG + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxConfig, wxConfig) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxConfigBase, wxConfigBase) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxConfigPathChanger, wxConfigPathChanger) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxFileConfig, wxFileConfig) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxMemoryConfig, wxMemoryConfig) #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG *************** *** 2744,2747 **** --- 2739,2743 ---- #if wxLUA_USE_wxGrid && wxUSE_GRID wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxGridCellCoords, wxGridCellCoords) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxGridTableMessage, wxGridTableMessage) #endif // wxLUA_USE_wxGrid && wxUSE_GRID *************** *** 2795,2799 **** #if wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxArrayTreeItemIds, wxArrayTreeItemIds) wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxTreeItemId, wxTreeItemId) #endif // wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL --- 2791,2794 ---- *************** *** 2821,2824 **** --- 2816,2826 ---- #endif // wxUSE_LONGLONG + #if wxUSE_STREAMS + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxDataInputStream, wxDataInputStream) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxDataOutputStream, wxDataOutputStream) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxFileInputStream, wxFileInputStream) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxFileOutputStream, wxFileOutputStream) + #endif // wxUSE_STREAMS + #endif // __HOOK_WXLUA_wx_H__ |
From: John L. <jr...@us...> - 2007-06-25 03:20:11
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/bindings Modified Files: genidocs.lua genwxbind.lua Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: genidocs.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genidocs.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** genidocs.lua 20 Jun 2007 22:57:33 -0000 1.8 --- genidocs.lua 25 Jun 2007 03:19:37 -0000 1.9 *************** *** 342,346 **** if not in_blk_comment then print("ERROR mismatched /* */ in :", filename, line_n, line) end in_blk_comment = false ! out_line = string.sub(out_line, 1, t[n].s-1).."</font>"..string.sub(out_line, t[n].s) end end --- 342,346 ---- if not in_blk_comment then print("ERROR mismatched /* */ in :", filename, line_n, line) end in_blk_comment = false ! out_line = string.sub(out_line, 1, t[n].s+1).."</font>"..string.sub(out_line, t[n].s+2) end end Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** genwxbind.lua 20 Jun 2007 22:57:33 -0000 1.132 --- genwxbind.lua 25 Jun 2007 03:19:37 -0000 1.133 *************** *** 65,69 **** end ! -- make these string.XXX functions local so there's table lookup local string_sub = string.sub local string_len = string.len --- 65,69 ---- end ! -- make these string.XXX functions local so there's no table lookup local string_sub = string.sub local string_len = string.len *************** *** 77,84 **** -- --------------------------------------------------------------------------- function CheckRules() ! assert(type(interface_filepath) == "string", "Rules file ERROR: 'interface_filepath' is not a string") ! assert(type(output_cpp_filepath) == "string", "Rules file ERROR: 'output_cpp_filepath' is not a string") assert(type(output_cpp_header_filepath) == "string", "Rules file ERROR: 'output_cpp_header_filepath' is not a string") ! assert(type(output_cpp_impexpsymbol) == "string", "Rules file ERROR: 'output_cpp_impexpsymbol' is not a string") assert(type(output_cpp_impexpdatasymbol) == "string", "Rules file ERROR: 'output_cpp_impexpdatasymbol' is not a string") --- 77,84 ---- -- --------------------------------------------------------------------------- function CheckRules() ! assert(type(interface_filepath) == "string", "Rules file ERROR: 'interface_filepath' is not a string") ! assert(type(output_cpp_filepath) == "string", "Rules file ERROR: 'output_cpp_filepath' is not a string") assert(type(output_cpp_header_filepath) == "string", "Rules file ERROR: 'output_cpp_header_filepath' is not a string") ! assert(type(output_cpp_impexpsymbol) == "string", "Rules file ERROR: 'output_cpp_impexpsymbol' is not a string") assert(type(output_cpp_impexpdatasymbol) == "string", "Rules file ERROR: 'output_cpp_impexpdatasymbol' is not a string") *************** *** 277,280 **** --- 277,283 ---- dataTypeAttribTable["const"] = true + dataTypeAttribTable["%gc"] = true -- this object will be gc by lua + dataTypeAttribTable["%ungc"] = true -- this object won't be gc by lua + -- attributes that can precede a function (must set equal to true) functionAttribTable["static"] = true *************** *** 297,301 **** for i = 1, #typeData do if cast < 0 then ! print("Error in casting data type, mismatched () '"..decl.."'") end --- 300,304 ---- for i = 1, #typeData do if cast < 0 then ! print("ERROR: Mismatched () in casting data type: '"..decl.."'") end *************** *** 320,324 **** if not data_type then ! print("Cannot find data type: '"..decl.."'") end --- 323,327 ---- if not data_type then ! print("ERROR: Cannot find data type: '"..decl.."'") end *************** *** 388,392 **** elseif typedefTable[datatype] then if not dataTypeTable[typedefTable[datatype]] then ! print("Error - supposed datatype: '"..datatype.."' has typedef = '"..typedefTable[datatype].."' which is not a data type either") end --- 391,395 ---- elseif typedefTable[datatype] then if not dataTypeTable[typedefTable[datatype]] then ! print("ERROR: Supposed datatype: '"..tostring(datatype).."' has typedef = '"..typedefTable[datatype].."' which is not a data type either") end *************** *** 436,440 **** end ! print("Error: Missing data type '"..datatype.."' in GetDataTypeBase.") return nil --- 439,443 ---- end ! print("Error: Missing data type '"..tostring(datatype).."' in GetDataTypeBase.") return nil *************** *** 463,467 **** return dtype.IsNumber else ! print("Error: Missing data type '"..datatype.."' in IsDataTypeNumeric.") end --- 466,470 ---- return dtype.IsNumber else ! print("Error: Missing data type '"..tostring(datatype).."' in IsDataTypeNumeric.") end *************** *** 477,481 **** return (dtype.DefType == "enum") else ! print("Error: Missing data type '"..datatype.."' in IsDataTypeEnum.") end --- 480,484 ---- return (dtype.DefType == "enum") else ! print("Error: Missing data type '"..tostring(datatype).."' in IsDataTypeEnum.") end *************** *** 1115,1118 **** --- 1118,1124 ---- bindingKeywordTable["%includefile"] = true + bindingKeywordTable["%gc_this"] = true + bindingKeywordTable["%ungc_this"] = true + bindingKeywordTable["%define"] = true bindingKeywordTable["%define_string"] = true *************** *** 1145,1149 **** -- keepTable - list of delimiters that will be kept in return list -- stringliterals - bool - true to not tokenise string literals ! -- lineTable - table w/ .File name and .LineNumber for error messages -- --------------------------------------------------------------------------- function SplitString(str, delimTable, keepTable, stringliterals, lineTable) --- 1151,1155 ---- -- keepTable - list of delimiters that will be kept in return list -- stringliterals - bool - true to not tokenise string literals ! -- lineTable - table w/ .FileName name and .LineNumber for error messages -- --------------------------------------------------------------------------- function SplitString(str, delimTable, keepTable, stringliterals, lineTable) *************** *** 1358,1362 **** -- --------------------------------------------------------------------------- ! -- Load an interface file creating a table {filename, line number, tags, line} -- --------------------------------------------------------------------------- function ReadInterfaceFile(filename) --- 1364,1368 ---- -- --------------------------------------------------------------------------- ! -- Load an interface file creating a table {FileName, LineNumber, Tags, Line} -- --------------------------------------------------------------------------- function ReadInterfaceFile(filename) *************** *** 1366,1370 **** for line in io.lines(filename) do linenumber = linenumber + 1 ! local lineTable = { File=filename, LineNumber=linenumber, Tags=nil, Line=line } lineTable.Tags = SplitString(line, bindingDelimiters, bindingDelimsToKeep, true, lineTable) table.insert(filedata, lineTable) --- 1372,1376 ---- for line in io.lines(filename) do linenumber = linenumber + 1 ! local lineTable = { FileName=filename, LineNumber=linenumber, Tags=nil, LineText=line } lineTable.Tags = SplitString(line, bindingDelimiters, bindingDelimsToKeep, true, lineTable) table.insert(filedata, lineTable) *************** *** 1380,1384 **** function LineTableErrString(lineTable) if lineTable then ! return "File: '"..lineTable.File.."':(line "..lineTable.LineNumber..")\n '"..lineTable.Line.."'" else return "" --- 1386,1390 ---- function LineTableErrString(lineTable) if lineTable then ! return "File: '"..lineTable.FileName.."':(line "..lineTable.LineNumber..")\n '"..lineTable.LineText.."'" else return "" *************** *** 1405,1409 **** BuildDataTypeTable(interfaceFileData) ! table.insert(interfaceFileDataList, { File=filename, Data=interfaceFileData }) else print("ERROR : Interface file does not exist : '"..filename.."'") --- 1411,1415 ---- BuildDataTypeTable(interfaceFileData) ! table.insert(interfaceFileDataList, { FileName=filename, Data=interfaceFileData }) else print("ERROR : Interface file does not exist : '"..filename.."'") *************** *** 1416,1420 **** for i = 1, #interfaceFileDataList do ! local filename = interfaceFileDataList[i].File local interfaceFileData = interfaceFileDataList[i].Data --- 1422,1426 ---- for i = 1, #interfaceFileDataList do ! local filename = interfaceFileDataList[i].FileName local interfaceFileData = interfaceFileDataList[i].Data *************** *** 1509,1514 **** AltName = lineState.AltName, Value = lineState.Value, - PropertyRead = lineState.PropertyRead, - PropertyWrite = lineState.PropertyWrite, IsCFunction = lineState.IsCFunction, IsConstructor = lineState.IsConstructor, --- 1515,1518 ---- *************** *** 1520,1530 **** IsPureVirtualFunction = lineState.IsPureVirtualFunction, NotOverload = lineState.NotOverload, ! OverrideName = lineState.OverrideName, Condition = lineState.Condition, ExtraCondition = extraCondition, Params = lineState.Params, ! File = lineState.File, LineNumber = lineState.LineNumber, ! LineData = lineState.LineData, } --- 1524,1536 ---- IsPureVirtualFunction = lineState.IsPureVirtualFunction, NotOverload = lineState.NotOverload, ! override_name = lineState.override_name, Condition = lineState.Condition, ExtraCondition = extraCondition, Params = lineState.Params, ! FileName = lineState.FileName, LineNumber = lineState.LineNumber, ! LineText = lineState.LineText, ! GCThis = lineState.GCThis, ! UnGCThis = lineState.UnGCThis, } *************** *** 1688,1693 **** AltName = nil, Value = nil, ! PropertyRead = false, ! PropertyWrite = false, IsCFunction = nil, IsConstructor = nil, --- 1694,1699 ---- AltName = nil, Value = nil, ! GCThis = nil, ! UnGCThis = nil, IsCFunction = nil, IsConstructor = nil, *************** *** 1698,1708 **** IsVirtualFunction = nil, IsPureVirtualFunction = nil, ! OverrideName = nil, NotOverload = nil, Condition = nil, Params = {}, ! File = lineTable.File, LineNumber = lineTable.LineNumber, ! LineData = lineTable.Line, } --- 1704,1714 ---- IsVirtualFunction = nil, IsPureVirtualFunction = nil, ! override_name = nil, NotOverload = nil, Condition = nil, Params = {}, ! FileName = lineTable.FileName, LineNumber = lineTable.LineNumber, ! LineText = lineTable.LineText, } *************** *** 1757,1760 **** --- 1763,1780 ---- lineState.IsCFunction = true + elseif tag == "%gc_this" then + lineState.GCThis = true + + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %gc_this is not used for a %class member function. "..LineTableErrString(lineTable)) + end + + elseif tag == "%ungc_this" then + lineState.UnGCThis= true + + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %ungc_this is not used for a %class member function. "..LineTableErrString(lineTable)) + end + -- ------------------------------------------------------- elseif tag == "%class" then *************** *** 1790,1802 **** --- 1810,1838 ---- parseState.ObjectStack[1].DeleteRequired = true + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %delete is not used for a %class. "..LineTableErrString(lineTable)) + end + elseif tag == "%noclassinfo" then -- tag for %class parseState.ObjectStack[1].HasClassInfo = false + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %noclassinfo is not used for a %class. "..LineTableErrString(lineTable)) + end + elseif tag == "%abstract" then -- tag for %class parseState.ObjectStack[1].IsAbstract = true + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %abstract is not used for a %class. "..LineTableErrString(lineTable)) + end + elseif tag == "%encapsulate" then -- tag for %class parseState.ObjectStack[1].Encapsulate = true + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %encapsulate is not used for a %class. "..LineTableErrString(lineTable)) + end + -- ------------------------------------------------------- elseif tag == "%protected" then -- skip %protected functions *************** *** 1812,1818 **** print("WARNING: the %property tag is ignored and properties are generated at runtime.") break - --lineState.DefType = "property" - --lineState.Action = "property" - --lineState.ActionMandatory = true elseif tag == "%member" then --- 1848,1851 ---- *************** *** 1821,1830 **** --- 1854,1875 ---- lineState.ActionMandatory = true + if (parseState.ObjectStack[1].DefType ~= "class") and (parseState.ObjectStack[1].DefType ~= "struct") then + print("Error: %member is not used for a %class or %struct. "..LineTableErrString(lineTable)) + end + elseif tag == "%constructor" then lineState.IsConstructor = true + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %constructor is not used for a %class. "..LineTableErrString(lineTable)) + end + elseif tag == "%operator" then lineState.IsOperator = true + if parseState.ObjectStack[1].DefType ~= "class" then + print("Error: %operator is not used for a %class. "..LineTableErrString(lineTable)) + end + -- ------------------------------------------------------- elseif tag == "%struct" then *************** *** 2126,2130 **** lineState.ActionMandatory = false elseif lineState.Action == "override_name" then ! lineState.OverrideName = tag lineState.Action = nil --- 2171,2175 ---- lineState.ActionMandatory = false elseif lineState.Action == "override_name" then ! lineState.override_name = tag lineState.Action = nil *************** *** 2140,2173 **** lineState.Action = "typedefvalue" lineState.ActionMandatory = false - elseif lineState.Action == "property" then - if tag ~= "=" then - print("Error: %property expected '='. "..LineTableErrString(lineTable)) - end - - lineState.Action = "propertyname" - lineState.ActionMandatory = true - elseif lineState.Action == "propertyname" then - lineState.Name = tag - - lineState.Action = "propertycomma" - lineState.ActionMandatory = false - elseif lineState.Action == "propertycomma" then - if tag ~= "," then - print("Error: %property expected ','. "..LineTableErrString(lineTable)) - end - - lineState.Action = "propertyallow" - lineState.ActionMandatory = true - elseif lineState.Action == "propertyallow" then - if tag == "read" then - lineState.PropertyRead = true - elseif tag == "write" then - lineState.PropertyWrite = true - else - print("Error: %property expected 'read' or 'write' attribute. "..LineTableErrString(lineTable)) - end - - lineState.Action = "propertycomma" - lineState.ActionMandatory = false elseif lineState.Action == "rename" then --- 2185,2188 ---- *************** *** 2485,2491 **** table.insert(parseState.ConditionStack, lineState.Condition) - elseif lineState.DefType == "property" then - table.insert(parseState.ObjectStack[1].Members, AllocMember(lineState, BuildCondition(parseState.ConditionStack))) - elseif lineState.DefType == "member" then table.insert(parseState.ObjectStack[1].Members, AllocMember(lineState, BuildCondition(parseState.ConditionStack))) --- 2500,2503 ---- *************** *** 2525,2529 **** end ! -- Set if this data type should be Encapsulated if dataTypeTable[parseState.ObjectStack[1].Name] and parseState.ObjectStack[1].Encapsulate then dataTypeTable[parseState.ObjectStack[1].Name].Encapsulate = parseState.ObjectStack[1].Encapsulate --- 2537,2541 ---- end ! -- Set if this data type shoulntpdate pool.ntp.orgd be Encapsulated if dataTypeTable[parseState.ObjectStack[1].Name] and parseState.ObjectStack[1].Encapsulate then dataTypeTable[parseState.ObjectStack[1].Name].Encapsulate = parseState.ObjectStack[1].Encapsulate *************** *** 2663,2727 **** -- --------------------------------------------------------------- - -- property binding - -- --------------------------------------------------------------- - if member.DefType == "property" then - -- conditions for member are dependent on return type, argument types, and inline conditions - local dependConditions = {} - - if HasCondition(fullcondition) then - dependConditions[fullcondition] = fullcondition - end - - -- find return condition on property Get function - local getMemberName = "Get"..member.Name - for get = 1, #parseObject.Members do - local getMember = parseObject.Members[get] - if getMember.Name == getMemberName then - local returnCondition = GetDataTypeCondition(getMember.DataType) - if returnCondition then - dependConditions[returnCondition] = returnCondition - end - - break - end - end - - -- build property condition - local propertycondition = nil - for idx, condition in pairs(dependConditions) do - propertycondition = AddCondition(propertycondition, condition) - end - propertycondition = FixCondition(propertycondition) - - -- read property - if member.PropertyRead then - local propertyBinding = - { - LuaName = member.Name, - FuncType = "WXLUAMETHOD_GETPROP", - Map = " { \""..member.Name.."\", WXLUAMETHOD_GETPROP, s_wxluafunc_wxLua_"..MakeVar(parseObject.Name).."_Get"..member.Name..", 1 },\n", - Condition = propertycondition - } - - table.insert(interface.objectData[o].BindTable, propertyBinding) - end - - -- write property - if member.PropertyWrite then - local propertyBinding = - { - LuaName = member.Name, - FuncType = "WXLUAMETHOD_SETPROP", - Map = " { \""..member.Name.."\", WXLUAMETHOD_SETPROP, s_wxluafunc_wxLua_"..MakeVar(parseObject.Name).."_Set"..member.Name..", 1 },\n", - Condition = propertycondition - } - - table.insert(interface.objectData[o].BindTable, propertyBinding) - end - - -- --------------------------------------------------------------- -- member binding -- --------------------------------------------------------------- ! elseif member.DefType == "member" then local memberType = GetTypeDef(member.DataType) local memberGetFunc = "Get_"..member.Name --- 2675,2681 ---- -- --------------------------------------------------------------- -- member binding -- --------------------------------------------------------------- ! if member.DefType == "member" then local memberType = GetTypeDef(member.DataType) local memberGetFunc = "Get_"..member.Name *************** *** 2759,2763 **** local overload_argList = "" local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberGetFunc ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") --- 2713,2717 ---- local overload_argList = "" local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberGetFunc ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].LineText.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") *************** *** 2839,2843 **** overload_argList = "" local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberSetFunc ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") --- 2793,2797 ---- overload_argList = "" local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberSetFunc ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].LineText.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") *************** *** 3058,3061 **** --- 3012,3016 ---- local argList = "" local overload_argList = "" + local gcList = {} local arg = 0 *************** *** 3064,3067 **** --- 3019,3034 ---- local param = member.Params[arg] + -- See if we're supposed to track or untrack the parameter + local a = string.find(param.DataTypeWithAttrib, "%gc", 1, 1) + if a then + param.DataTypeWithAttrib = string.sub(param.DataTypeWithAttrib, 1, a-1)..string.sub(param.DataTypeWithAttrib, a+4) + param.GC = true + end + local a = string.find(param.DataTypeWithAttrib, "%ungc", 1, 1) + if a then + param.DataTypeWithAttrib = string.sub(param.DataTypeWithAttrib, 1, a-1)..string.sub(param.DataTypeWithAttrib, a+6) + param.UnGC = true + end + local declare = nil local argType = param.DataType *************** *** 3112,3116 **** ! -- the function take (void*), but we just pass an int if argType == "voidptr_long" then argType = "long" --- 3079,3083 ---- ! -- the function takes (void*), but we just pass a long if argType == "voidptr_long" then argType = "long" *************** *** 3219,3222 **** --- 3186,3200 ---- argItem = "("..argTypeWithAttrib..")wxlState.ttouserdata("..argNum..")" end + + if param.GC then + if dataTypeTable[argType].Encapsulate then + table.insert(gcList, " if (!wxlState.IsTrackedObject("..argName..")) wxlState.AddTrackedObject((long)"..argName..", new wxLua_wxObject_"..MakeVar(argType).."("..argName.."));\n") + else + table.insert(gcList, " if (!wxlState.IsTrackedObject("..argName..")) wxlState.AddTrackedObject("..argName..");\n") + end + elseif param.UnGC then + table.insert(gcList, " if (wxlState.IsTrackedObject("..argName..")) wxlState.RemoveTrackedObject("..argName..", false);\n") + end + end elseif (indirectionCount == 2) and (argPtr == "*") then *************** *** 3305,3309 **** if not param.Name then ! print("Error: No Param Name: "..member.LineData.." "..LineTableErrString(member)) end --- 3283,3287 ---- if not param.Name then ! print("Error: No Param Name: "..member.LineText.." "..LineTableErrString(member)) end *************** *** 3392,3396 **** -- function ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") if member.IsConstructor then --- 3370,3374 ---- -- function ! CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].LineText.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") if member.IsConstructor then *************** *** 3399,3402 **** --- 3377,3392 ---- table.insert(codeList, " wxLuaState wxlState(L);\n") + -- See if we're supposed to track or untrack the return value + local a = string.find(member.DataTypeWithAttrib, "%gc", 1, 1) + if a then + member.DataTypeWithAttrib = string.sub(member.DataTypeWithAttrib, 1, a-1)..string.sub(member.DataTypeWithAttrib, a+4) + member.GC = true + end + local a = string.find(member.DataTypeWithAttrib, "%ungc", 1, 1) + if a then + member.DataTypeWithAttrib = string.sub(member.DataTypeWithAttrib, 1, a-1)..string.sub(member.DataTypeWithAttrib, a+6) + member.UnGC = true + end + -- determine function return type local memberType = member.DataType *************** *** 3494,3497 **** --- 3484,3491 ---- end + for i = 1, #gcList do + table.insert(codeList, gcList[i]) + end + -- constructor? if member.IsConstructor then *************** *** 3499,3503 **** table.insert(codeList, " returns = new "..parseObject.Name.."("..argList..");\n") ! if parseObject.DeleteRequired then CommentBindingTable(codeList, " // add to tracked memory list\n") --- 3493,3497 ---- table.insert(codeList, " returns = new "..parseObject.Name.."("..argList..");\n") ! if parseObject.GCThis or (parseObject.DeleteRequired and (not parseObject.UnGCThis)) then CommentBindingTable(codeList, " // add to tracked memory list\n") *************** *** 3535,3538 **** --- 3529,3542 ---- overload_argList = "&s_wxluatag_"..MakeClassVar(parseObject.Name)..", "..overload_argList + if parseObject.UnGCThis then + table.insert(codeList, " wxlState.RemoveTrackedObject(self, false);\n") + elseif parseObject.GCThis then + if parseObject.Encapsulate then + table.insert(codeList, " if (!wxlState.IsTrackedObject(self)) wxlState.AddTrackedObject((long)self, new wxLua_wxObject_"..MakeClassVar(parseObject.Name).."(self));\n") + else + table.insert(codeList, " wxlState.AddTrackedObject(self);\n") + end + end + requiredParamCount = requiredParamCount + 1 paramCount = paramCount + 1 *************** *** 3598,3601 **** --- 3602,3616 ---- elseif (memberPtr == "*") or (memberType == "voidptr_long") then table.insert(codeList, " returns = ("..memberTypeWithAttrib..")"..functor..";\n") + + if member.GC then + if dataTypeTable[memberType].Encapsulate then + table.insert(codeList, " if (!wxlState.IsTrackedObject(returns)) wxlState.AddTrackedObject((long)returns, new wxLua_wxObject_"..MakeVar(memberType).."(returns));\n") + else + table.insert(codeList, " if (!wxlState.IsTrackedObject(returns)) wxlState.AddTrackedObject(returns);\n") + end + elseif member.UnGC then + table.insert(codeList, " if (wxlState.IsTrackedObject(returns)) wxlState.RemoveTrackedObject(returns, false);\n") + end + else table.insert(codeList, " returns = ("..functor..");\n") *************** *** 3681,3689 **** -- Override Generated Method Code ! if (member.OverrideName and overrideTable[member.OverrideName]) then ! methodBinding.Method = overrideTable[member.OverrideName] ! methodBinding.PreDefineCode = "#define "..funcName.." "..member.OverrideName.."\n" ! overrideTableUsed[member.OverrideName] = true ! elseif ((member.OverrideName == nil) and overrideTable[methodBinding.CFunctionName]) then methodBinding.Method = overrideTable[methodBinding.CFunctionName] overrideTableUsed[methodBinding.CFunctionName] = true --- 3696,3704 ---- -- Override Generated Method Code ! if (member.override_name and overrideTable[member.override_name]) then ! methodBinding.Method = overrideTable[member.override_name] ! methodBinding.PreDefineCode = "#define "..funcName.." "..member.override_name.."\n" ! overrideTableUsed[member.override_name] = true ! elseif ((member.override_name == nil) and overrideTable[methodBinding.CFunctionName]) then methodBinding.Method = overrideTable[methodBinding.CFunctionName] overrideTableUsed[methodBinding.CFunctionName] = true *************** *** 3797,3800 **** --- 3812,3821 ---- } + -- Override Generated Method Code + if overrideTable[delMethodBinding.CFunctionName] then + delMethodBinding.Method = overrideTable[delMethodBinding.CFunctionName] + overrideTableUsed[delMethodBinding.CFunctionName] = true + end + table.insert(interface.objectData[o].BindTable, delMethodBinding) end *************** *** 4542,4614 **** -- --------------------------------------------------------------------------- - -- GenerateProperties - -- --------------------------------------------------------------------------- - - function GenerateProperties(sortedBindings) - local propMethods = {} - - for n = 1, #sortedBindings do - local methodBindings = sortedBindings[n] - - if methodBindings[1].LuaName and (string.len(methodBindings[1].LuaName) > 3) then - - local is_get = 0 -- count of # of matches, all have to work! - local is_set = 0 - - for i = 1, #methodBindings do - if (methodBindings[i].FuncType == "WXLUAMETHOD_METHOD") then - if (string.find(methodBindings[i].LuaName, "Set", 1, 1) == 1) and - (methodBindings[i].ParamCount == 1) and - (methodBindings[i].RequiredParamCount == 1) then - - is_set = is_set + 1 - - elseif (string.find(methodBindings[i].LuaName, "Get", 1, 1) == 1) and - (methodBindings[i].ParamCount == 0) and - (methodBindings[i].RequiredParamCount == 0) then - - --local ret = 1; - --for j = #methodBindings[i].Method, 1, -1 do - -- local r = string.find(methodBindings[i].Method[j], " return ", 1, 1) - -- if r -- FIXME - -- end - --end - - is_get = is_get + 1 - - end - end - end - - local member = methodBindings[1]; - - local name = string.sub(member.LuaName, 4) - - if is_get == #methodBindings then - local propertyBinding = - { - LuaName = name, - Map = " { WXLUAMETHOD_GETPROP, \""..name.."\", "..member.FuncMapName..", 1, 0 },\n", - Condition = member.Condition - } - - --table.insert(methodBindings, propertyBinding) - - elseif is_set == #methodBindings then - local propertyBinding = - { - LuaName = name, - Map = " { WXLUAMETHOD_SETPROP, \""..name.."\", "..member.FuncMapName..", 1, 0 },\n", - Condition = member.Condition - } - - --table.insert(methodBindings, propertyBinding) - end - - end - end - end - - -- --------------------------------------------------------------------------- -- Write Hook file for an interface file -- --------------------------------------------------------------------------- --- 4563,4566 ---- *************** *** 4684,4691 **** GenerateMap(fileData, overloadBindings, " ", writeFunc, true, object.Condition) - -- Generate the properties - GenerateProperties(sortedBindings) - -- Output Method Map Table CommentBindingTable(fileData, "// Map Lua Class Methods to C Binding Functions\n") --- 4636,4641 ---- GenerateMap(fileData, overloadBindings, " ", writeFunc, true, object.Condition) -- Output Method Map Table + CommentBindingTable(fileData, "// Map Lua Class Methods to C Binding Functions\n") |
From: John L. <jr...@us...> - 2007-06-25 03:20:10
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** wxstc_datatypes.lua 20 Jun 2007 22:57:33 -0000 1.66 --- wxstc_datatypes.lua 25 Jun 2007 03:19:37 -0000 1.67 *************** *** 284,294 **** Name = "wxArrayString", }, - wxArrayTreeItemIds = { - Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", - DefType = "class", - Encapsulate = true, - IsNumber = false, - Name = "wxArrayTreeItemIds", - }, wxArrayVideoModes = { Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", --- 284,287 ---- *************** *** 501,504 **** --- 494,498 ---- Condition = "wxLUA_USE_wxCaret && wxUSE_CARET", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCaret", *************** *** 693,696 **** --- 687,691 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfig", *************** *** 699,702 **** --- 694,698 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfigBase", *************** *** 804,807 **** --- 800,804 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataInputStream", *************** *** 838,841 **** --- 835,839 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataOutputStream", *************** *** 1142,1145 **** --- 1140,1144 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileConfig", *************** *** 1185,1188 **** --- 1184,1188 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileInputStream", *************** *** 1210,1213 **** --- 1210,1214 ---- Condition = "wxUSE_STREAMS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileOutputStream", *************** *** 1246,1249 **** --- 1247,1251 ---- }, wxFindReplaceData = { + BaseClass = "wxObject", Condition = "wxUSE_FINDREPLDLG && wxLUA_USE_wxFindReplaceDialog", DefType = "class", *************** *** 1671,1674 **** --- 1673,1677 ---- Condition = "wxLUA_USE_wxGrid && wxUSE_GRID", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGridTableMessage", *************** *** 2243,2246 **** --- 2246,2250 ---- }, wxLogNull = { + BaseClass = "wxLog", Condition = "wxUSE_LOG", DefType = "class", *************** *** 2361,2364 **** --- 2365,2369 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxMemoryConfig", *************** *** 2699,2703 **** wxPlatformInfo = { DefType = "class", - Encapsulate = true, IsNumber = false, Name = "wxPlatformInfo", --- 2704,2707 ---- *************** *** 3255,3259 **** Condition = "wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxStandardPaths", DefType = "class", - Encapsulate = true, IsNumber = false, Name = "wxStandardPaths", --- 3259,3262 ---- *************** *** 3646,3655 **** Name = "wxTreeEvent", }, - wxTreeItemAttr = { - Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", - DefType = "class", - IsNumber = false, - Name = "wxTreeItemAttr", - }, wxTreeItemData = { BaseClass = "wxClientData", --- 3649,3652 ---- *************** *** 3804,3807 **** --- 3801,3805 ---- wxVisualAttributes = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxVisualAttributes", |
From: John L. <jr...@us...> - 2007-06-25 03:19:55
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/samples Modified Files: controls.wx.lua Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** controls.wx.lua 22 Jun 2007 15:48:50 -0000 1.6 --- controls.wx.lua 25 Jun 2007 03:19:51 -0000 1.7 *************** *** 10,15 **** ----------------------------------------------------------------------------- ! frame = nil ! textCtrl = nil -- wxBitmap to use for controls that need one --- 10,16 ---- ----------------------------------------------------------------------------- ! frame = nil ! textCtrl = nil ! taskbarIcon = nil -- The wxTaskBarIcon that we install -- wxBitmap to use for controls that need one *************** *** 30,35 **** --- 31,42 ---- listImageList:Add(wx.wxArtProvider.GetBitmap(wx.wxART_ERROR, wx.wxART_TOOLBAR, wx.wxSize(16, 16))) + + controlTable = {} -- Table of { win_id = "win name" } + ignoreControls = {} -- Table of { win_id = "win name" } of controls to ignore events from + -- IDs for the windows that we show ID_PARENT_SCROLLEDWINDOW = 1000 + ID_EVENT_LISTCTRL = 5000 + ID_CONTROL_LISTCTRL = 5001 ID_ANIMATIONCTRL = 1001 *************** *** 105,108 **** --- 112,116 ---- ignoreEVTs = { ["wxEVT_CREATE"] = true, + ["wxEVT_DESTROY"] = true, ["wxEVT_ENTER_WINDOW"] = true, ["wxEVT_ERASE_BACKGROUND"] = true, *************** *** 268,271 **** --- 276,281 ---- s = s..typ_name.."!IsOk" end + elseif typ_name == "wxListItem" then + s = s..typ_name.."(GetId='"..v:GetId().."')" elseif typ_name == "wxWindow" then s = s..typ_name.."(GetName="..v:GetName()..")" *************** *** 300,304 **** -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore ! if (not textCtrl) or ignoreEVTs[evtTypeStr] then event:Skip() return --- 310,314 ---- -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore ! if (not textCtrl) or ignoreEVTs[evtTypeStr] or ignoreControls[event:GetId()] then event:Skip() return *************** *** 397,405 **** ConnectEvents(real_control or control) -- connect to the real control end -- ----------------------------------------------------------------------- ! function CreateBookPage(parent, num) local p = wx.wxPanel(parent, wx.wxID_ANY) local s = wx.wxBoxSizer(wx.wxVERTICAL) --- 407,424 ---- ConnectEvents(real_control or control) -- connect to the real control + + local a = string.find(txt, "\n", 1, 1) + if a then txt = string.sub(txt, 1, a-1) end + + if real_control and real_control:IsKindOf(wx.wxClassInfo.FindClass("wxWindow")) then + controlTable[real_control:GetId()] = txt + else + controlTable[control:GetId()] = txt + end end -- ----------------------------------------------------------------------- ! local function CreateBookPage(parent, num) local p = wx.wxPanel(parent, wx.wxID_ANY) local s = wx.wxBoxSizer(wx.wxVERTICAL) *************** *** 688,692 **** wx.wxDefaultPosition, wx.wxSize(200, 200)) control:SetScrollbars(10, 10, 100, 100) ! control:SetBackgroundColour(wx.wxRED) wx.wxButton(control, wx.wxID_ANY, "Child button of wxScrolledWindow", wx.wxPoint(50, 50)) AddControl("wxScrolledWindow\n pixelsPerUnit=10\n noUnits=100", control) --- 707,711 ---- wx.wxDefaultPosition, wx.wxSize(200, 200)) control:SetScrollbars(10, 10, 100, 100) ! control:SetBackgroundColour(colorList[1]) wx.wxButton(control, wx.wxID_ANY, "Child button of wxScrolledWindow", wx.wxPoint(50, 50)) AddControl("wxScrolledWindow\n pixelsPerUnit=10\n noUnits=100", control) *************** *** 741,745 **** control = wx.wxStaticBox(scrollWin, ID_STATICBOX, "wxStaticBox", wx.wxDefaultPosition, wx.wxSize(200, 100)) ! control:SetBackgroundColour(wx.wxRED) AddControl("wxStaticBox", control) --- 760,764 ---- control = wx.wxStaticBox(scrollWin, ID_STATICBOX, "wxStaticBox", wx.wxDefaultPosition, wx.wxSize(200, 100)) ! control:SetBackgroundColour(colorList[1]) AddControl("wxStaticBox", control) *************** *** 752,755 **** --- 771,786 ---- -- ----------------------------------------------------------------------- + do + local p = wx.wxStaticText(scrollWin, wx.wxID_ANY, "See taskbar for icon") + taskbarIcon = wx.wxTaskBarIcon() + local icon = wx.wxIcon() + icon:CopyFromBitmap(bmp) + taskbarIcon:SetIcon(icon, "Tooltop for wxTaskBarIcon from controls.wx.lua") + icon:delete() + AddControl("wxTextCtrl", p, taskbarIcon) + end + + -- ----------------------------------------------------------------------- + control = wx.wxTextCtrl(scrollWin, ID_TEXTCTRL, "wxTextCtrl", wx.wxDefaultPosition, wx.wxDefaultSize, *************** *** 839,842 **** --- 870,874 ---- textCtrl = nil -- stop processing events imageList:delete() + if taskbarIcon then taskbarIcon:RemoveIcon() end end) *************** *** 881,885 **** -- ----------------------------------------------------------------------- ! eventListCtrl = wx.wxListCtrl(splitter2, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxLC_REPORT) --- 913,921 ---- -- ----------------------------------------------------------------------- ! ! noteBook = wx.wxNotebook(splitter2, wx.wxID_ANY) ! ! -- ----------------------------------------------------------------------- ! eventListCtrl = wx.wxListCtrl(noteBook, ID_EVENT_LISTCTRL, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxLC_REPORT) *************** *** 892,902 **** local col_widths = {200, 300} for n = 1, #wxEVT_List do ! if skipEVTs[wxEVT_List[n][2]] then ! li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 2) ! elseif ignoreEVTs[wxEVT_List[n][2]] then ! li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 0) ! else ! li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 1) ! end eventListCtrl:SetItem(li, 1, wxEVT_List[n][2]) --- 928,936 ---- local col_widths = {200, 300} for n = 1, #wxEVT_List do ! local img = 1 ! if skipEVTs[wxEVT_List[n][2]] then img = 2 ! elseif ignoreEVTs[wxEVT_List[n][2]] then img = 0 end ! ! li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], img) eventListCtrl:SetItem(li, 1, wxEVT_List[n][2]) *************** *** 911,915 **** -- Handle selecting or deselecting events ! function OnEventListCtrl(event) event:Skip(false) local ignored_count = 0 --- 945,951 ---- -- Handle selecting or deselecting events ! function OnCheckListCtrl(event) ! local listCtrl = event:GetEventObject():DynamicCast("wxListCtrl") ! local win_id = event:GetId() event:Skip(false) local ignored_count = 0 *************** *** 917,927 **** -- Find all the selected items ! for n = 1, eventListCtrl:GetItemCount() do ! local s = eventListCtrl:GetItemState(n-1, wx.wxLIST_STATE_SELECTED) if s ~= 0 then local litem = wx.wxListItem() litem:SetId(n-1) litem:SetMask(wx.wxLIST_MASK_IMAGE) ! eventListCtrl:GetItem(litem) if litem:GetImage() < 2 then -- skipEVTs if litem:GetImage() == 0 then --- 953,963 ---- -- Find all the selected items ! for n = 1, listCtrl:GetItemCount() do ! local s = listCtrl:GetItemState(n-1, wx.wxLIST_STATE_SELECTED) if s ~= 0 then local litem = wx.wxListItem() litem:SetId(n-1) litem:SetMask(wx.wxLIST_MASK_IMAGE) ! listCtrl:GetItem(litem) if litem:GetImage() < 2 then -- skipEVTs if litem:GetImage() == 0 then *************** *** 931,935 **** litem:SetMask(wx.wxLIST_MASK_TEXT) litem:SetColumn(1) ! eventListCtrl:GetItem(litem) table.insert(sel, {n-1, litem:GetText()}) end --- 967,971 ---- litem:SetMask(wx.wxLIST_MASK_TEXT) litem:SetColumn(1) ! listCtrl:GetItem(litem) table.insert(sel, {n-1, litem:GetText()}) end *************** *** 941,950 **** for n = 1, #sel do ! eventListCtrl:SetItemImage(sel[n][1], img) ! if img == 0 then ! ignoreEVTs[sel[n][2]] = true ! else ! ignoreEVTs[sel[n][2]] = nil end end --- 977,995 ---- for n = 1, #sel do ! listCtrl:SetItemImage(sel[n][1], img) ! if win_id == ID_EVENT_LISTCTRL then ! if img == 0 then ! ignoreEVTs[sel[n][2]] = true ! else ! ignoreEVTs[sel[n][2]] = nil ! end ! elseif win_id == ID_CONTROL_LISTCTRL then ! print(sel[n][2], type(sel[n][2])) ! if img == 0 then ! ignoreControls[tonumber(sel[n][2])] = true ! else ! ignoreControls[tonumber(sel[n][2])] = nil ! end end end *************** *** 954,961 **** function(event) if event:GetKeyCode() == wx.WXK_SPACE then ! OnEventListCtrl(event) end end) ! eventListCtrl:Connect(wx.wxEVT_COMMAND_LIST_ITEM_ACTIVATED, OnEventListCtrl) -- ----------------------------------------------------------------------- --- 999,1034 ---- function(event) if event:GetKeyCode() == wx.WXK_SPACE then ! OnCheckListCtrl(event) ! else ! event:Skip() end end) ! eventListCtrl:Connect(wx.wxEVT_COMMAND_LIST_ITEM_ACTIVATED, OnCheckListCtrl) ! ! -- ----------------------------------------------------------------------- ! ! controlListCtrl = wx.wxListCtrl(noteBook, ID_CONTROL_LISTCTRL, ! wx.wxDefaultPosition, wx.wxDefaultSize, ! wx.wxLC_REPORT) ! controlListCtrl:SetImageList(listImageList, wx.wxIMAGE_LIST_SMALL) ! controlListCtrl:InsertColumn(0, "wxWindow Class") ! controlListCtrl:InsertColumn(1, "wxWindowID") ! ! -- We add the items after creating all the controls ! ! controlListCtrl:Connect(wx.wxEVT_COMMAND_LIST_KEY_DOWN, ! function(event) ! if event:GetKeyCode() == wx.WXK_SPACE then ! OnCheckListCtrl(event) ! else ! event:Skip() ! end ! end) ! controlListCtrl:Connect(wx.wxEVT_COMMAND_LIST_ITEM_ACTIVATED, OnCheckListCtrl) ! ! -- ----------------------------------------------------------------------- ! ! noteBook:AddPage(eventListCtrl, "wxEvents") ! noteBook:AddPage(controlListCtrl, "wxWindows") -- ----------------------------------------------------------------------- *************** *** 963,966 **** --- 1036,1060 ---- controlsWin = CreateControlsWindow(splitter2) + -- Add all the initial items and find the best fitting col widths + local li = 0 + local col_widths = {200, 300} + local cTable = {} + for k, v in pairs(controlTable) do table.insert(cTable, { k, v }) end + table.sort(cTable, function(t1, t2) return t1[2] > t2[2] end) + for n = 1, #cTable do + local img = 1 + + li = controlListCtrl:InsertItem(li, cTable[n][2], img) + controlListCtrl:SetItem(li, 1, tostring(cTable[n][1])) + + for i = 1, #col_widths do + local w = controlListCtrl:GetTextExtent(tostring(cTable[n][i])) + if w > col_widths[i] + 16 then w = col_widths[i] + 16 end + end + end + for i = 1, #col_widths do + controlListCtrl:SetColumnWidth(i-1, col_widths[i]) + end + -- ----------------------------------------------------------------------- *************** *** 972,976 **** splitter:SplitHorizontally(splitter2, textCtrl, 300) ! splitter2:SplitVertically(eventListCtrl, controlsWin, 300) -- ----------------------------------------------------------------------- --- 1066,1070 ---- splitter:SplitHorizontally(splitter2, textCtrl, 300) ! splitter2:SplitVertically(noteBook, controlsWin, 300) -- ----------------------------------------------------------------------- |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp config.cpp controls.cpp data.cpp datetime.cpp dialogs.cpp event.cpp file.cpp gdi.cpp grid.cpp help.cpp html.cpp image.cpp mdi.cpp menutool.cpp picker.cpp socket.cpp thread.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** xml.cpp 17 Jun 2007 18:36:27 -0000 1.40 --- xml.cpp 25 Jun 2007 03:19:49 -0000 1.41 *************** *** 1295,1301 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Get[] = { &s_wxluatag_wxXmlResource, NULL }; static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Get[1] = {{ wxLua_wxXmlResource_Get, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Get }}; // %override wxLua_wxXmlResource_Get // wxXmlResource* Get() --- 1295,1300 ---- #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Get[1] = {{ wxLua_wxXmlResource_Get, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, s_wxluaargArray_None }}; // %override wxLua_wxXmlResource_Get // wxXmlResource* Get() *************** *** 1670,1693 **** #endif // (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Set[] = { &s_wxluatag_wxXmlResource, &s_wxluatag_wxXmlResource, NULL }; - static int LUACALL wxLua_wxXmlResource_Set(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Set[1] = {{ wxLua_wxXmlResource_Set, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxXmlResource_Set }}; - // %override wxLua_wxXmlResource_Set - // wxXmlResource* Set(wxXmlResource *res) - static int LUACALL wxLua_wxXmlResource_Set(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlResource *returns; - // wxXmlResource *res - wxXmlResource *res = (wxXmlResource *)wxlState.GetUserDataType(2, s_wxluatag_wxXmlResource); - // call Set - returns = wxXmlResource::Set(res); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); - // return the number of parameters - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_SetFlags[] = { &s_wxluatag_wxXmlResource, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxXmlResource_SetFlags(lua_State *L); --- 1669,1672 ---- *************** *** 1897,1901 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Get", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, { "GetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetVersion, 1, NULL }, --- 1876,1880 ---- #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Get", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, { "GetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetVersion, 1, NULL }, *************** *** 1936,1940 **** #endif // (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Set", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Set, 1, NULL }, { "SetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_SetFlags, 1, NULL }, { "Unload", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Unload, 1, NULL }, --- 1915,1918 ---- Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** dialogs.cpp 18 Jun 2007 21:40:42 -0000 1.51 --- dialogs.cpp 25 Jun 2007 03:19:42 -0000 1.52 *************** *** 99,103 **** static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_CreateSeparatedButtonSizer[1] = {{ wxLua_wxDialog_CreateSeparatedButtonSizer, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxDialog_CreateSeparatedButtonSizer }}; ! // %wxchkver_2_8&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L) { --- 99,103 ---- static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_CreateSeparatedButtonSizer[1] = {{ wxLua_wxDialog_CreateSeparatedButtonSizer, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxDialog_CreateSeparatedButtonSizer }}; ! // %wxchkver_2_8&&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L) { *************** *** 2355,2361 **** #if ((wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog) && (wxLUA_USE_wxArrayString)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxArrayString, &s_wxluaarg_LightUserData, &s_wxluaarg_Number, &s_wxluatag_wxPoint, NULL }; static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSingleChoiceDialog_constructor[1] = {{ wxLua_wxSingleChoiceDialog_constructor, WXLUAMETHOD_CONSTRUCTOR, 4, 7, s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor }}; // %override wxLua_wxSingleChoiceDialog_constructor // wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) --- 2355,2361 ---- #if ((wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog) && (wxLUA_USE_wxArrayString)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxArrayString, &s_wxluaarg_Number, &s_wxluatag_wxPoint, NULL }; static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSingleChoiceDialog_constructor[1] = {{ wxLua_wxSingleChoiceDialog_constructor, WXLUAMETHOD_CONSTRUCTOR, 4, 6, s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor }}; // %override wxLua_wxSingleChoiceDialog_constructor // wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) *************** *** 3043,3047 **** static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFindReplaceDialog_Create[1] = {{ wxLua_wxFindReplaceDialog_Create, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFindReplaceDialog_Create }}; ! // bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L) { --- 3043,3047 ---- static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFindReplaceDialog_Create[1] = {{ wxLua_wxFindReplaceDialog_Create, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFindReplaceDialog_Create }}; ! // bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L) { Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wxlua.cpp 18 Jun 2007 21:40:52 -0000 1.46 --- wxlua.cpp 25 Jun 2007 03:19:49 -0000 1.47 *************** *** 356,360 **** static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_GetValue[1] = {{ wxLua_wxLuaTreeItemData_GetValue, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_GetValue }}; ! // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) { --- 356,360 ---- static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_GetValue[1] = {{ wxLua_wxLuaTreeItemData_GetValue, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_GetValue }}; ! // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) { *************** *** 374,378 **** static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_SetValue[1] = {{ wxLua_wxLuaTreeItemData_SetValue, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }}; ! // void SetValue(double value); static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L) { --- 374,378 ---- static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_SetValue[1] = {{ wxLua_wxLuaTreeItemData_SetValue, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }}; ! // void SetValue(double value); static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L) { Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** image.cpp 18 Jun 2007 21:40:46 -0000 1.49 --- image.cpp 25 Jun 2007 03:19:44 -0000 1.50 *************** *** 38,42 **** static int LUACALL wxLua_wxImage_AddHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_AddHandler[1] = {{ wxLua_wxImage_AddHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_AddHandler }}; ! // static void AddHandler(wxImageHandler* handler) static int LUACALL wxLua_wxImage_AddHandler(lua_State *L) { --- 38,42 ---- static int LUACALL wxLua_wxImage_AddHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_AddHandler[1] = {{ wxLua_wxImage_AddHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_AddHandler }}; ! // static void AddHandler(%ungc wxImageHandler* handler) static int LUACALL wxLua_wxImage_AddHandler(lua_State *L) { *************** *** 44,47 **** --- 44,48 ---- // wxImageHandler handler wxImageHandler * handler = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + if (wxlState.IsTrackedObject(handler)) wxlState.RemoveTrackedObject(handler, false); // call AddHandler wxImage::AddHandler(handler); *************** *** 867,871 **** static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_InsertHandler[1] = {{ wxLua_wxImage_InsertHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_InsertHandler }}; ! // static void InsertHandler(wxImageHandler* handler) static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L) { --- 868,872 ---- static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_InsertHandler[1] = {{ wxLua_wxImage_InsertHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_InsertHandler }}; ! // static void InsertHandler(%ungc wxImageHandler* handler) static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L) { *************** *** 873,876 **** --- 874,878 ---- // wxImageHandler handler wxImageHandler * handler = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + if (wxlState.IsTrackedObject(handler)) wxlState.RemoveTrackedObject(handler, false); // call InsertHandler wxImage::InsertHandler(handler); *************** *** 1632,1636 **** static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_SetRGB1[1] = {{ wxLua_wxImage_SetRGB1, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxImage_SetRGB1 }}; ! // void SetRGB(wxRect & rect, unsigned char red, unsigned char green, unsigned char blue) static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L) { --- 1634,1638 ---- static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_SetRGB1[1] = {{ wxLua_wxImage_SetRGB1, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxImage_SetRGB1 }}; ! // void SetRGB(wxRect& rect, unsigned char red, unsigned char green, unsigned char blue) static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L) { *************** *** 2347,2350 **** --- 2349,2368 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogramEntry_delete[] = { &s_wxluatag_wxImageHistogramEntry, NULL }; + static int LUACALL wxLua_wxImageHistogramEntry_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogramEntry_delete[1] = {{ wxLua_wxImageHistogramEntry_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogramEntry_delete }}; + static int LUACALL wxLua_wxImageHistogramEntry_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogramEntry * self = (wxImageHistogramEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxImageHistogramEntry_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogramEntry_constructor[1] = {{ wxLua_wxImageHistogramEntry_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 2357,2360 **** --- 2375,2380 ---- // call constructor returns = new wxImageHistogramEntry(); + // add to tracked memory list + wxlState.AddTrackedObject((long)returns, new wxLua_wxObject_wxImageHistogramEntry((wxImageHistogramEntry *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImageHistogramEntry, returns); *************** *** 2372,2375 **** --- 2392,2396 ---- { "SetIndex", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogramEntry_SetIndex, 1, NULL }, { "SetValue", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogramEntry_SetValue, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogramEntry_delete, 1, NULL }, { "index", WXLUAMETHOD_SETPROP, s_wxluafunc_wxLua_wxImageHistogramEntry_SetIndex, 1, NULL }, { "index", WXLUAMETHOD_GETPROP, s_wxluafunc_wxLua_wxImageHistogramEntry_GetIndex, 1, NULL }, *************** *** 2468,2471 **** --- 2489,2508 ---- + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_iterator_delete[] = { &s_wxluatag_wxImageHistogram_iterator, NULL }; + static int LUACALL wxLua_wxImageHistogram_iterator_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogram_iterator_delete[1] = {{ wxLua_wxImageHistogram_iterator_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_iterator_delete }}; + static int LUACALL wxLua_wxImageHistogram_iterator_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_iterator_op_eq[] = { &s_wxluatag_wxImageHistogram_iterator, &s_wxluatag_wxImageHistogram_iterator, NULL }; static int LUACALL wxLua_wxImageHistogram_iterator_op_eq(lua_State *L); *************** *** 2516,2519 **** --- 2553,2557 ---- { "Set_first", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_first, 1, NULL }, { "Set_second", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_second, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogram_iterator_delete, 1, NULL }, { "first", WXLUAMETHOD_SETPROP, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_first, 1, NULL }, { "first", WXLUAMETHOD_GETPROP, s_wxluafunc_wxLua_wxImageHistogram_iterator_Get_first, 1, NULL }, *************** *** 2616,2619 **** --- 2654,2673 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_delete[] = { &s_wxluatag_wxImageHistogram, NULL }; + static int LUACALL wxLua_wxImageHistogram_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogram_delete[1] = {{ wxLua_wxImageHistogram_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_delete }}; + static int LUACALL wxLua_wxImageHistogram_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_empty[] = { &s_wxluatag_wxImageHistogram, NULL }; static int LUACALL wxLua_wxImageHistogram_empty(lua_State *L); *************** *** 2726,2729 **** --- 2780,2785 ---- // call constructor returns = new wxImageHistogram(); + // add to tracked memory list + wxlState.AddTrackedObject((long)returns, new wxLua_wxObject_wxImageHistogram((wxImageHistogram *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImageHistogram, returns); *************** *** 2741,2744 **** --- 2797,2801 ---- { "clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_clear, 1, NULL }, { "count", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_count, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogram_delete, 1, NULL }, { "empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_empty, 1, NULL }, { "end", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_end, 1, NULL }, *************** *** 3091,3094 **** --- 3148,3167 ---- int s_wxluatag_wxBMPHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxBMPHandler_delete[] = { &s_wxluatag_wxBMPHandler, NULL }; + static int LUACALL wxLua_wxBMPHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxBMPHandler_delete[1] = {{ wxLua_wxBMPHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBMPHandler_delete }}; + static int LUACALL wxLua_wxBMPHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxBMPHandler * self = (wxBMPHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxBMPHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxBMPHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxBMPHandler_constructor[1] = {{ wxLua_wxBMPHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3101,3106 **** // call constructor returns = new wxBMPHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); --- 3174,3179 ---- // call constructor returns = new wxBMPHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); *************** *** 3114,3117 **** --- 3187,3191 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBMPHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBMPHandler_delete, 1, NULL }, { "wxBMPHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBMPHandler_constructor, 1, NULL }, *************** *** 3132,3135 **** --- 3206,3225 ---- int s_wxluatag_wxICOHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxICOHandler_delete[] = { &s_wxluatag_wxICOHandler, NULL }; + static int LUACALL wxLua_wxICOHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxICOHandler_delete[1] = {{ wxLua_wxICOHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxICOHandler_delete }}; + static int LUACALL wxLua_wxICOHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxICOHandler * self = (wxICOHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxICOHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxICOHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxICOHandler_constructor[1] = {{ wxLua_wxICOHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3142,3147 **** // call constructor returns = new wxICOHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); --- 3232,3237 ---- // call constructor returns = new wxICOHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); *************** *** 3155,3158 **** --- 3245,3249 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxICOHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxICOHandler_delete, 1, NULL }, { "wxICOHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxICOHandler_constructor, 1, NULL }, *************** *** 3173,3176 **** --- 3264,3283 ---- int s_wxluatag_wxCURHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxCURHandler_delete[] = { &s_wxluatag_wxCURHandler, NULL }; + static int LUACALL wxLua_wxCURHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxCURHandler_delete[1] = {{ wxLua_wxCURHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxCURHandler_delete }}; + static int LUACALL wxLua_wxCURHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxCURHandler * self = (wxCURHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxCURHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxCURHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxCURHandler_constructor[1] = {{ wxLua_wxCURHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3183,3188 **** // call constructor returns = new wxCURHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); --- 3290,3295 ---- // call constructor returns = new wxCURHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); *************** *** 3196,3199 **** --- 3303,3307 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxCURHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxCURHandler_delete, 1, NULL }, { "wxCURHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxCURHandler_constructor, 1, NULL }, *************** *** 3214,3217 **** --- 3322,3341 ---- int s_wxluatag_wxANIHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxANIHandler_delete[] = { &s_wxluatag_wxANIHandler, NULL }; + static int LUACALL wxLua_wxANIHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxANIHandler_delete[1] = {{ wxLua_wxANIHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxANIHandler_delete }}; + static int LUACALL wxLua_wxANIHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxANIHandler * self = (wxANIHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxANIHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxANIHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxANIHandler_constructor[1] = {{ wxLua_wxANIHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3224,3229 **** // call constructor returns = new wxANIHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); --- 3348,3353 ---- // call constructor returns = new wxANIHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); *************** *** 3237,3240 **** --- 3361,3365 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxANIHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxANIHandler_delete, 1, NULL }, { "wxANIHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxANIHandler_constructor, 1, NULL }, *************** *** 3255,3258 **** --- 3380,3399 ---- int s_wxluatag_wxIFFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxIFFHandler_delete[] = { &s_wxluatag_wxIFFHandler, NULL }; + static int LUACALL wxLua_wxIFFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxIFFHandler_delete[1] = {{ wxLua_wxIFFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxIFFHandler_delete }}; + static int LUACALL wxLua_wxIFFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxIFFHandler * self = (wxIFFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxIFFHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxIFFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxIFFHandler_constructor[1] = {{ wxLua_wxIFFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3265,3270 **** // call constructor returns = new wxIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); --- 3406,3411 ---- // call constructor returns = new wxIFFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); *************** *** 3278,3281 **** --- 3419,3423 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxIFFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxIFFHandler_delete, 1, NULL }, { "wxIFFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxIFFHandler_constructor, 1, NULL }, *************** *** 3296,3299 **** --- 3438,3457 ---- int s_wxluatag_wxGIFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxGIFHandler_delete[] = { &s_wxluatag_wxGIFHandler, NULL }; + static int LUACALL wxLua_wxGIFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGIFHandler_delete[1] = {{ wxLua_wxGIFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGIFHandler_delete }}; + static int LUACALL wxLua_wxGIFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGIFHandler * self = (wxGIFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxGIFHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxGIFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGIFHandler_constructor[1] = {{ wxLua_wxGIFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3306,3311 **** // call constructor returns = new wxGIFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); --- 3464,3469 ---- // call constructor returns = new wxGIFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); *************** *** 3319,3322 **** --- 3477,3481 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGIFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGIFHandler_delete, 1, NULL }, { "wxGIFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGIFHandler_constructor, 1, NULL }, *************** *** 3337,3340 **** --- 3496,3515 ---- int s_wxluatag_wxJPEGHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxJPEGHandler_delete[] = { &s_wxluatag_wxJPEGHandler, NULL }; + static int LUACALL wxLua_wxJPEGHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxJPEGHandler_delete[1] = {{ wxLua_wxJPEGHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxJPEGHandler_delete }}; + static int LUACALL wxLua_wxJPEGHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxJPEGHandler * self = (wxJPEGHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxJPEGHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxJPEGHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxJPEGHandler_constructor[1] = {{ wxLua_wxJPEGHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3347,3352 **** // call constructor returns = new wxJPEGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); --- 3522,3527 ---- // call constructor returns = new wxJPEGHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); *************** *** 3360,3363 **** --- 3535,3539 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxJPEGHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxJPEGHandler_delete, 1, NULL }, { "wxJPEGHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxJPEGHandler_constructor, 1, NULL }, *************** *** 3378,3381 **** --- 3554,3573 ---- int s_wxluatag_wxPCXHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPCXHandler_delete[] = { &s_wxluatag_wxPCXHandler, NULL }; + static int LUACALL wxLua_wxPCXHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPCXHandler_delete[1] = {{ wxLua_wxPCXHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPCXHandler_delete }}; + static int LUACALL wxLua_wxPCXHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPCXHandler * self = (wxPCXHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPCXHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxPCXHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPCXHandler_constructor[1] = {{ wxLua_wxPCXHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3388,3393 **** // call constructor returns = new wxPCXHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); --- 3580,3585 ---- // call constructor returns = new wxPCXHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); *************** *** 3401,3404 **** --- 3593,3597 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPCXHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPCXHandler_delete, 1, NULL }, { "wxPCXHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPCXHandler_constructor, 1, NULL }, *************** *** 3419,3422 **** --- 3612,3631 ---- int s_wxluatag_wxPNGHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPNGHandler_delete[] = { &s_wxluatag_wxPNGHandler, NULL }; + static int LUACALL wxLua_wxPNGHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNGHandler_delete[1] = {{ wxLua_wxPNGHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPNGHandler_delete }}; + static int LUACALL wxLua_wxPNGHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPNGHandler * self = (wxPNGHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPNGHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxPNGHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNGHandler_constructor[1] = {{ wxLua_wxPNGHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3429,3434 **** // call constructor returns = new wxPNGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); --- 3638,3643 ---- // call constructor returns = new wxPNGHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); *************** *** 3442,3445 **** --- 3651,3655 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPNGHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPNGHandler_delete, 1, NULL }, { "wxPNGHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPNGHandler_constructor, 1, NULL }, *************** *** 3460,3463 **** --- 3670,3689 ---- int s_wxluatag_wxPNMHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPNMHandler_delete[] = { &s_wxluatag_wxPNMHandler, NULL }; + static int LUACALL wxLua_wxPNMHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNMHandler_delete[1] = {{ wxLua_wxPNMHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPNMHandler_delete }}; + static int LUACALL wxLua_wxPNMHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPNMHandler * self = (wxPNMHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPNMHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxPNMHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNMHandler_constructor[1] = {{ wxLua_wxPNMHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3470,3475 **** // call constructor returns = new wxPNMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); --- 3696,3701 ---- // call constructor returns = new wxPNMHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); *************** *** 3483,3486 **** --- 3709,3713 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPNMHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPNMHandler_delete, 1, NULL }, { "wxPNMHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPNMHandler_constructor, 1, NULL }, *************** *** 3501,3504 **** --- 3728,3747 ---- int s_wxluatag_wxTIFFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxTIFFHandler_delete[] = { &s_wxluatag_wxTIFFHandler, NULL }; + static int LUACALL wxLua_wxTIFFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTIFFHandler_delete[1] = {{ wxLua_wxTIFFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTIFFHandler_delete }}; + static int LUACALL wxLua_wxTIFFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxTIFFHandler * self = (wxTIFFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxTIFFHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxTIFFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxTIFFHandler_constructor[1] = {{ wxLua_wxTIFFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3511,3516 **** // call constructor returns = new wxTIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); --- 3754,3759 ---- // call constructor returns = new wxTIFFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); *************** *** 3524,3527 **** --- 3767,3771 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTIFFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTIFFHandler_delete, 1, NULL }, { "wxTIFFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTIFFHandler_constructor, 1, NULL }, *************** *** 3542,3545 **** --- 3786,3805 ---- int s_wxluatag_wxTGAHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxTGAHandler_delete[] = { &s_wxluatag_wxTGAHandler, NULL }; + static int LUACALL wxLua_wxTGAHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTGAHandler_delete[1] = {{ wxLua_wxTGAHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTGAHandler_delete }}; + static int LUACALL wxLua_wxTGAHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxTGAHandler * self = (wxTGAHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxTGAHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxTGAHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxTGAHandler_constructor[1] = {{ wxLua_wxTGAHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3552,3557 **** // call constructor returns = new wxTGAHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); --- 3812,3817 ---- // call constructor returns = new wxTGAHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); *************** *** 3565,3568 **** --- 3825,3829 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTGAHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTGAHandler_delete, 1, NULL }, { "wxTGAHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTGAHandler_constructor, 1, NULL }, *************** *** 3583,3586 **** --- 3844,3863 ---- int s_wxluatag_wxXPMHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxXPMHandler_delete[] = { &s_wxluatag_wxXPMHandler, NULL }; + static int LUACALL wxLua_wxXPMHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXPMHandler_delete[1] = {{ wxLua_wxXPMHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXPMHandler_delete }}; + static int LUACALL wxLua_wxXPMHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXPMHandler * self = (wxXPMHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxXPMHandler); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static int LUACALL wxLua_wxXPMHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxXPMHandler_constructor[1] = {{ wxLua_wxXPMHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3593,3598 **** // call constructor returns = new wxXPMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); --- 3870,3875 ---- // call constructor returns = new wxXPMHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); *************** *** 3606,3609 **** --- 3883,3887 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXPMHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXPMHandler_delete, 1, NULL }, { "wxXPMHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxXPMHandler_constructor, 1, NULL }, Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mdi.cpp 18 Jun 2007 02:56:31 -0000 1.41 --- mdi.cpp 25 Jun 2007 03:19:44 -0000 1.42 *************** *** 212,216 **** static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_SetWindowMenu[1] = {{ wxLua_wxMDIParentFrame_SetWindowMenu, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_SetWindowMenu }}; ! // %win void SetWindowMenu(wxMenu* menu) static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L) { --- 212,216 ---- static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_SetWindowMenu[1] = {{ wxLua_wxMDIParentFrame_SetWindowMenu, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_SetWindowMenu }}; ! // %win void SetWindowMenu(%ungc wxMenu* menu) static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L) { *************** *** 218,221 **** --- 218,222 ---- // wxMenu menu wxMenu * menu = (wxMenu *)wxlState.GetUserDataType(2, s_wxluatag_wxMenu); + if (wxlState.IsTrackedObject(menu)) wxlState.RemoveTrackedObject(menu, false); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); *************** *** 2090,2094 **** static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateDocument[1] = {{ wxLua_wxDocTemplate_CreateDocument, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateDocument }}; ! // wxDocument * CreateDocument(const wxString& path, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L) { --- 2091,2095 ---- static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateDocument[1] = {{ wxLua_wxDocTemplate_CreateDocument, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateDocument }}; ! // wxDocument* CreateDocument(const wxString& path, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L) { *************** *** 2114,2118 **** static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateView[1] = {{ wxLua_wxDocTemplate_CreateView, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateView }}; ! // wxView * CreateView(wxDocument *doc, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L) { --- 2115,2119 ---- static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateView[1] = {{ wxLua_wxDocTemplate_CreateView, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateView }}; ! // wxView* CreateView(wxDocument *doc, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L) { *************** *** 4340,4343 **** --- 4341,4360 ---- #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileHistory_delete[] = { &s_wxluatag_wxFileHistory, NULL }; + static int LUACALL wxLua_wxFileHistory_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileHistory_delete[1] = {{ wxLua_wxFileHistory_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_delete }}; + static int LUACALL wxLua_wxFileHistory_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxFileHistory * self = (wxFileHistory *)wxlState.GetUserDataType(1, s_wxluatag_wxFileHistory); + // if removed from tracked mem list, reset the tag so that gc() is not called on this object. + if ((self != NULL) && wxlState.RemoveTrackedObject(self)) + { + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileHistory_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxFileHistory_constructor(lua_State *L); *************** *** 4357,4362 **** // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); --- 4374,4379 ---- // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); *************** *** 4421,4424 **** --- 4438,4442 ---- #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxFileHistory_delete, 1, NULL }, { "wxFileHistory", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxFileHistory_constructor, 1, NULL }, Index: picker.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/picker.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** picker.cpp 19 Jun 2007 22:26:47 -0000 1.4 --- picker.cpp 25 Jun 2007 03:19:48 -0000 1.5 *************** *** 343,346 **** --- 343,385 ---- int s_wxluatag_wxColourPickerCtrl = -1; + #if (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxColourPickerCtrl_Create[] = { &s_wxluatag_wxColourPickerCtrl, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxColour, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxColourPickerCtrl_Create(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxColourPickerCtrl_Create[1] = {{ wxLua_wxColourPickerCtrl_Create, WXLUAMETHOD_METHOD, 4, 9, s_wxluatagArray_wxLua_wxColourPickerCtrl_Create }}; + // bool Create(wxWindow *parent, wxWindowID id, const wxColour& col, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxColourPickerCtrl") + static int LUACALL wxLua_wxColourPickerCtrl_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxColourPickerCtrl" + const wxString name = (argCount >= 9 ? wxlState.GetwxStringType(9) : wxString(wxT("wxColourPickerCtrl"))); + // const wxValidator validator = wxDefaultValidator + const wxValidator * validator = (argCount >= 8 ? (const wxValidator *)wxlState.GetUserDataType(8, s_wxluatag_wxValidator) : &wxDefaultValidator); + // long style = wxCLRP_DEFAULT_STYLE + long style = (argCount >= 7 ? (long)wxlua_getnumbertype(L, 7) : wxCLRP_DEFAULT_STYLE); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 6 ? (const wxSize *)wxlState.GetUserDataType(6, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxlState.GetUserDataType(5, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxColour col + const wxColour * col = (const wxColour *)wxlState.GetUserDataType(4, s_wxluatag_wxColour); + // wxWindowID id + wxWindowID id = (wxWindowID)wxlua_getnumbertype(L, 3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxColourPickerCtrl * self = (wxColourPickerCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxColourPickerCtrl); + // call Create + returns = (self->Create(parent, id, *col, *pos, *size, style, *validator, name)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL)) && (wxLUA_USE_wxColourPenBrush) static wxLuaArgTag s_wxluatagArray_wxLua_wxColourPickerCtrl_GetColour[] = { &s_wxluatag_wxColourPickerCtrl, NULL }; *************** *** 517,520 **** --- 556,563 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxColourPickerCtrl_methods[] = { + #if (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxColourPickerCtrl_Create, 1, NULL }, + #endif // (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL)) && (wxLUA_USE_wxColourPenBrush) { "GetColour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxColourPickerCtrl_GetColour, 1, NULL }, *************** *** 704,707 **** --- 747,789 ---- int s_wxluatag_wxDatePickerCtrl = -1; + #if (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_Create[] = { &s_wxluatag_wxDatePickerCtrl, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxDateTime, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxDatePickerCtrl_Create(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDatePickerCtrl_Create[1] = {{ wxLua_wxDatePickerCtrl_Create, WXLUAMETHOD_METHOD, 3, 9, s_wxluatagArray_wxLua_wxDatePickerCtrl_Create }}; + // bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDatePickerCtrl") + static int LUACALL wxLua_wxDatePickerCtrl_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxDatePickerCtrl" + const wxString name = (argCount >= 9 ? wxlState.GetwxStringType(9) : wxString(wxT("wxDatePickerCtrl"))); + // const wxValidator validator = wxDefaultValidator + const wxValidator * validator = (argCount >= 8 ? (const wxValidator *)wxlState.GetUserDataType(8, s_wxluatag_wxValidator) : &wxDefaultValidator); + // long style = wxDP_DEFAULT | wxDP_SHOWCENTURY + long style = (argCount >= 7 ? (long)wxlua_getnumbertype(L, 7) : wxDP_DEFAULT | wxDP_SHOWCENTURY); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 6 ? (const wxSize *)wxlState.GetUserDataType(6, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxlState.GetUserDataType(5, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxDateTime dt = wxDefaultDateTime + const wxDateTime * dt = (argCount >= 4 ? (const wxDateTime *)wxlState.GetUserDataType(4, s_wxluatag_wxDateTime) : &wxDefaultDateTime); + // wxWindowID id + wxWindowID id = (wxWindowID)wxlua_getnumbertype(L, 3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxDatePickerCtrl * self = (wxDatePickerCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxDatePickerCtrl); + // call Create + returns = (self->Create(parent, id, *dt, *pos, *size, style, *validator, name)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_GetRange[] = { &s_wxluatag_wxDatePickerCtrl, NULL }; static int LUACALL wxLua_wxDatePickerCtrl_GetRange(lua_State *L); *************** *** 791,799 **** #if (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxDateTime, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; ! static int LUACALL wxLua_wxDatePi... [truncated message content] |
From: John L. <jr...@us...> - 2007-06-25 03:19:53
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** wxlstate.cpp 16 Jun 2007 06:21:46 -0000 1.114 --- wxlstate.cpp 25 Jun 2007 03:19:50 -0000 1.115 *************** *** 2185,2188 **** --- 2185,2196 ---- } + bool wxLuaState::IsTrackedObject(void *pObject) const + { + wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); + + wxLongToLongHashMap::iterator it = M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.find((long) pObject); + return (it != M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.end()); + } + wxLongToLongHashMap* wxLuaState::GetTrackedObjects() { |
From: John L. <jr...@us...> - 2007-06-25 03:19:53
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** wxlstate.h 16 Jun 2007 06:21:46 -0000 1.80 --- wxlstate.h 25 Jun 2007 03:19:49 -0000 1.81 *************** *** 595,598 **** --- 595,600 ---- // Remove the object from the tracked memory and if fDelete, delete it too. bool RemoveTrackedObject(void *pObject, bool fDelete = true); + // Is this object currently tracked? + bool IsTrackedObject(void *pObject) const; wxLongToLongHashMap* GetTrackedObjects(); // Get an array of strings "wxObject_classname count#" |
From: John L. <jr...@us...> - 2007-06-22 15:48:57
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23295/wxLua/samples Modified Files: controls.wx.lua Log Message: Fix for wxAnimation for MSW Fixes for controls.wx.lua for MSW Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** controls.wx.lua 22 Jun 2007 03:20:26 -0000 1.5 --- controls.wx.lua 22 Jun 2007 15:48:50 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- listImageList:Add(wx.wxArtProvider.GetBitmap(wx.wxART_CROSS_MARK, wx.wxART_TOOLBAR, wx.wxSize(16, 16))) listImageList:Add(wx.wxArtProvider.GetBitmap(wx.wxART_TICK_MARK, wx.wxART_TOOLBAR, wx.wxSize(16, 16))) + listImageList:Add(wx.wxArtProvider.GetBitmap(wx.wxART_ERROR, wx.wxART_TOOLBAR, wx.wxSize(16, 16))) -- IDs for the windows that we show *************** *** 58,79 **** ID_RADIOBOX = 1025 ID_RADIOBUTTON = 1026 ! ID_SASHLAYOUTWINDOW = 1026 ! ID_SASHWINDOW = 1027 ! ID_SCROLLBAR = 1028 ! ID_SCROLLEDWINDOW = 1029 ! ID_SLIDER = 1029 ! ID_SPINBUTTON = 1030 ! ID_SPINCTRL = 1031 ! ID_SPLITTERWINDOW = 1032 ! ID_STATICBITMAP = 1033 ! ID_STATICBOX = 1034 ! ID_STATICLINE = 1035 ! ID_TEXTCTRL = 1036 ! ID_TOGGLEBUTTON = 1037 ! ID_TOOLBAR = 1038 ! ID_TOOLBOOK = 1039 ! ID_TREEBOOK = 1040 ! ID_TREECTRL = 1041 ! ID_WINDOW = 1042 -- --------------------------------------------------------------------------- --- 59,80 ---- ID_RADIOBOX = 1025 ID_RADIOBUTTON = 1026 ! ID_SASHLAYOUTWINDOW = 1027 ! ID_SASHWINDOW = 1028 ! ID_SCROLLBAR = 1029 ! ID_SCROLLEDWINDOW = 1030 ! ID_SLIDER = 1031 ! ID_SPINBUTTON = 1032 ! ID_SPINCTRL = 1033 ! ID_SPLITTERWINDOW = 1034 ! ID_STATICBITMAP = 1035 ! ID_STATICBOX = 1036 ! ID_STATICLINE = 1037 ! ID_TEXTCTRL = 1038 ! ID_TOGGLEBUTTON = 1039 ! ID_TOOLBAR = 1040 ! ID_TOOLBOOK = 1041 ! ID_TREEBOOK = 1042 ! ID_TREECTRL = 1043 ! ID_WINDOW = 1044 -- --------------------------------------------------------------------------- *************** *** 108,113 **** --- 109,119 ---- ["wxEVT_IDLE"] = true, ["wxEVT_LEAVE_WINDOW"] = true, + ["wxEVT_LEFT_DOWN"] = true, + ["wxEVT_LEFT_UP"] = true, ["wxEVT_MOTION"] = true, + ["wxEVT_MOVE"] = true, ["wxEVT_PAINT"] = true, + ["wxEVT_RIGHT_DOWN"] = true, + ["wxEVT_RIGHT_UP"] = true, ["wxEVT_SET_CURSOR"] = true, ["wxEVT_SHOW"] = true, *************** *** 118,121 **** --- 124,135 ---- -- --------------------------------------------------------------------------- + -- wxEventTypes that we shouldn't ever handle because they cause problems + -- --------------------------------------------------------------------------- + + skipEVTs = { + ["wxEVT_PAINT"] = true, -- controls don't redraw if we connect to this in MSW, even if we Skip() it + } + + -- --------------------------------------------------------------------------- -- All wxEvent derived classes and their GetXXX functions (none modify event) -- --------------------------------------------------------------------------- *************** *** 277,283 **** local evtTypeStr = wxEVT_TableByType[event:GetEventType()].name if event:GetEventType() == wx.wxEVT_PAINT then - -- You absolutely must create a wxPaintDC for a wxEVT_PAINT in MSW - -- to clear the region to be updated, otherwise you'll keep getting them local dc = wx.wxPaintDC(event:GetEventObject():DynamicCast("wxWindow")) dc:delete() --- 291,298 ---- local evtTypeStr = wxEVT_TableByType[event:GetEventType()].name + -- You absolutely must create a wxPaintDC for a wxEVT_PAINT in MSW + -- to clear the region to be updated, otherwise you'll keep getting them + -- Note: we always skip this anyway, see skipEVTs, but just to be sure... if event:GetEventType() == wx.wxEVT_PAINT then local dc = wx.wxPaintDC(event:GetEventObject():DynamicCast("wxWindow")) dc:delete() *************** *** 338,344 **** -- try to slightly change the background colour, doesn't work in GTK ! do local c = scrollWin:GetBackgroundColour() ! local d = 50 if (c:Red() >= 255-d) and (c:Green() >= 255-d) and (c:Blue() >= 255-d) then d = -d --- 353,359 ---- -- try to slightly change the background colour, doesn't work in GTK ! if false then local c = scrollWin:GetBackgroundColour() ! local d = 20 if (c:Red() >= 255-d) and (c:Green() >= 255-d) and (c:Blue() >= 255-d) then d = -d *************** *** 364,368 **** for i = 1, #wxEVT_Array do ! if true then --not ignoreEVTs[wxEVT_Array[i].name] then control:Connect(wx.wxID_ANY, wxEVT_Array[i].eventType, OnEvent) end --- 379,383 ---- for i = 1, #wxEVT_Array do ! if not skipEVTs[wxEVT_Array[i].name] then control:Connect(wx.wxID_ANY, wxEVT_Array[i].eventType, OnEvent) end *************** *** 375,383 **** local statText = wx.wxStaticText(scrollWin, wx.wxID_ANY, txt) ! flexSizer:Add(statText, 0, wx.wxALIGN_CENTER_VERTICAL, 5) ! flexSizer:Add(control, 0, wx.wxALIGN_LEFT) ! flexSizer:Add(wx.wxStaticLine(scrollWin, wx.wxID_ANY), 0, wx.wxEXPAND) ! flexSizer:Add(wx.wxStaticLine(scrollWin, wx.wxID_ANY), 0, wx.wxEXPAND) ConnectEvents(real_control or control) -- connect to the real control --- 390,398 ---- local statText = wx.wxStaticText(scrollWin, wx.wxID_ANY, txt) ! flexSizer:Add(statText, 0, wx.wxALIGN_CENTER_VERTICAL+wx.wxALL, 5) ! flexSizer:Add(control, 0, wx.wxALIGN_LEFT+wx.wxALL, 5) ! flexSizer:Add(wx.wxStaticLine(scrollWin, wx.wxID_ANY), 0, wx.wxEXPAND+wx.wxALL, 5) ! flexSizer:Add(wx.wxStaticLine(scrollWin, wx.wxID_ANY), 0, wx.wxEXPAND+wx.wxALL, 5) ConnectEvents(real_control or control) -- connect to the real control *************** *** 725,729 **** control = wx.wxStaticBox(scrollWin, ID_STATICBOX, "wxStaticBox", ! wx.wxDefaultPosition, wx.wxSize(200, 200)) control:SetBackgroundColour(wx.wxRED) AddControl("wxStaticBox", control) --- 740,744 ---- control = wx.wxStaticBox(scrollWin, ID_STATICBOX, "wxStaticBox", ! wx.wxDefaultPosition, wx.wxSize(200, 100)) control:SetBackgroundColour(wx.wxRED) AddControl("wxStaticBox", control) *************** *** 873,881 **** eventListCtrl:InsertColumn(1, "wxEventType") local li = 0 ! local col0_width = 200 ! local col1_width = 300 for n = 1, #wxEVT_List do ! if ignoreEVTs[wxEVT_List[n][2]] then li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 0) else --- 888,898 ---- eventListCtrl:InsertColumn(1, "wxEventType") + -- Add all the initial items and find the best fitting col widths local li = 0 ! local col_widths = {200, 300} for n = 1, #wxEVT_List do ! if skipEVTs[wxEVT_List[n][2]] then ! li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 2) ! elseif ignoreEVTs[wxEVT_List[n][2]] then li = eventListCtrl:InsertItem(li, wxEVT_List[n][1], 0) else *************** *** 884,894 **** eventListCtrl:SetItem(li, 1, wxEVT_List[n][2]) ! local w = eventListCtrl:GetTextExtent(wxEVT_List[n][1]) ! if w > col0_width + 16 then w = col0_width + 16 end ! local w = eventListCtrl:GetTextExtent(wxEVT_List[n][2]) ! if w > col1_width + 16 then w = col1_width + 16 end end ! eventListCtrl:SetColumnWidth(0, col0_width) ! eventListCtrl:SetColumnWidth(1, col1_width) function OnEventListCtrl(event) event:Skip(false) --- 901,914 ---- eventListCtrl:SetItem(li, 1, wxEVT_List[n][2]) ! for i = 1, #col_widths do ! local w = eventListCtrl:GetTextExtent(wxEVT_List[n][i]) ! if w > col_widths[i] + 16 then w = col_widths[i] + 16 end ! end end ! for i = 1, #col_widths do ! eventListCtrl:SetColumnWidth(i-1, col_widths[i]) ! end ! ! -- Handle selecting or deselecting events function OnEventListCtrl(event) event:Skip(false) *************** *** 896,915 **** local sel = {} for n = 1, eventListCtrl:GetItemCount() do local s = eventListCtrl:GetItemState(n-1, wx.wxLIST_STATE_SELECTED) if s ~= 0 then - local litem = wx.wxListItem() litem:SetId(n-1) litem:SetMask(wx.wxLIST_MASK_IMAGE) eventListCtrl:GetItem(litem) ! if litem:GetImage() == 0 then ! ignored_count = ignored_count + 1 ! end ! litem:SetMask(wx.wxLIST_MASK_TEXT) ! litem:SetColumn(1) ! eventListCtrl:GetItem(litem) ! table.insert(sel, {n-1, litem:GetText()}) end end --- 916,937 ---- local sel = {} + -- Find all the selected items for n = 1, eventListCtrl:GetItemCount() do local s = eventListCtrl:GetItemState(n-1, wx.wxLIST_STATE_SELECTED) if s ~= 0 then local litem = wx.wxListItem() litem:SetId(n-1) litem:SetMask(wx.wxLIST_MASK_IMAGE) eventListCtrl:GetItem(litem) ! if litem:GetImage() < 2 then -- skipEVTs ! if litem:GetImage() == 0 then ! ignored_count = ignored_count + 1 ! end ! litem:SetMask(wx.wxLIST_MASK_TEXT) ! litem:SetColumn(1) ! eventListCtrl:GetItem(litem) ! table.insert(sel, {n-1, litem:GetText()}) ! end end end *************** *** 920,924 **** for n = 1, #sel do eventListCtrl:SetItemImage(sel[n][1], img) ! print(sel[n][2]) if img == 0 then ignoreEVTs[sel[n][2]] = true --- 942,946 ---- for n = 1, #sel do eventListCtrl:SetItemImage(sel[n][1], img) ! if img == 0 then ignoreEVTs[sel[n][2]] = true *************** *** 949,954 **** -- ----------------------------------------------------------------------- - splitter2:SplitVertically(eventListCtrl, controlsWin, 300) splitter:SplitHorizontally(splitter2, textCtrl, 300) -- ----------------------------------------------------------------------- --- 971,976 ---- -- ----------------------------------------------------------------------- splitter:SplitHorizontally(splitter2, textCtrl, 300) + splitter2:SplitVertically(eventListCtrl, controlsWin, 300) -- ----------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-22 15:48:53
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23295/wxLua/modules/wxbind/src Modified Files: gdi.cpp Log Message: Fix for wxAnimation for MSW Fixes for controls.wx.lua for MSW Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** gdi.cpp 20 Jun 2007 22:57:36 -0000 1.77 --- gdi.cpp 22 Jun 2007 15:48:49 -0000 1.78 *************** *** 15020,15052 **** } - - #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxAnimation_constructor2[] = { &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; - static int LUACALL wxLua_wxAnimation_constructor2(lua_State *L); - // static wxLuaBindCFunc s_wxluafunc_wxLua_wxAnimation_constructor2[1] = {{ wxLua_wxAnimation_constructor2, WXLUAMETHOD_CONSTRUCTOR, 1, 2, s_wxluatagArray_wxLua_wxAnimation_constructor2 }}; - // %msw wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY) - static int LUACALL wxLua_wxAnimation_constructor2(lua_State *L) - { - wxluabind_removetableforcall(L); - wxLuaState wxlState(L); - wxAnimation *returns; - // get number of arguments - int argCount = lua_gettop(L); - // wxAnimationType type = wxANIMATION_TYPE_ANY - wxAnimationType type = (argCount >= 2 ? (wxAnimationType)wxlua_getintegertype(L, 2) : wxANIMATION_TYPE_ANY); - // const wxString name - const wxString name = wxlState.GetwxStringType(1); - // call constructor - returns = new wxAnimation(name, type); - // add to tracked window list, it will check validity - wxlState.AddTrackedWindow(returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxAnimation, returns); - - return 1; - } - - #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxAnimation_constructor1[] = { &s_wxluatag_wxAnimation, NULL }; static int LUACALL wxLua_wxAnimation_constructor1(lua_State *L); --- 15020,15023 ---- *************** *** 15091,15104 **** ! #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)))||(wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) static int LUACALL wxLua_wxAnimation_constructor_overload(lua_State *L); // function overload table static wxLuaBindCFunc s_wxluafunc_wxLua_wxAnimation_constructor_overload[] = { ! { wxLua_wxAnimation_constructor_overload, WXLUAMETHOD_METHOD|WXLUAMETHOD_OVERLOAD, 0, 2, s_wxluaargArray_None }, ! ! #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)) ! { wxLua_wxAnimation_constructor2, WXLUAMETHOD_CONSTRUCTOR, 1, 2, s_wxluatagArray_wxLua_wxAnimation_constructor2 }, ! #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)) { wxLua_wxAnimation_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxAnimation_constructor1 }, { wxLua_wxAnimation_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }, --- 15062,15071 ---- ! #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) static int LUACALL wxLua_wxAnimation_constructor_overload(lua_State *L); // function overload table static wxLuaBindCFunc s_wxluafunc_wxLua_wxAnimation_constructor_overload[] = { ! { wxLua_wxAnimation_constructor_overload, WXLUAMETHOD_METHOD|WXLUAMETHOD_OVERLOAD, 0, 1, s_wxluaargArray_None }, { wxLua_wxAnimation_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxAnimation_constructor1 }, { wxLua_wxAnimation_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }, *************** *** 15113,15117 **** return wxlState.CallOverloadedFunction(&overload_method); } ! #endif // ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)))||(wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) // Map Lua Class Methods to C Binding Functions --- 15080,15084 ---- return wxlState.CallOverloadedFunction(&overload_method); } ! #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) // Map Lua Class Methods to C Binding Functions *************** *** 15137,15143 **** { "LoadFile", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxAnimation_LoadFile, 1, NULL }, ! #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)))||(wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) { "wxAnimation", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxAnimation_constructor_overload, s_wxluafunc_wxLua_wxAnimation_constructor_overload_count, 0 }, ! #endif // ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) && ((defined(__WXMSW__)) && (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL)))||(wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) { 0, 0, 0, 0 }, --- 15104,15110 ---- { "LoadFile", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxAnimation_LoadFile, 1, NULL }, ! #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) { "wxAnimation", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxAnimation_constructor_overload, s_wxluafunc_wxLua_wxAnimation_constructor_overload_count, 0 }, ! #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL) { 0, 0, 0, 0 }, |
From: John L. <jr...@us...> - 2007-06-22 15:48:53
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23295/wxLua/bindings/wxwidgets Modified Files: gdi.i Log Message: Fix for wxAnimation for MSW Fixes for controls.wx.lua for MSW Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** gdi.i 20 Jun 2007 22:57:34 -0000 1.57 --- gdi.i 22 Jun 2007 15:48:49 -0000 1.58 *************** *** 1677,1681 **** wxAnimation() wxAnimation(const wxAnimation& anim) ! %msw wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY) virtual bool IsOk() const --- 1677,1681 ---- wxAnimation() wxAnimation(const wxAnimation& anim) ! //wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY) // doesn't exist in 2.8.4 virtual bool IsOk() const |
From: John L. <jr...@us...> - 2007-06-22 03:20:58
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23505/wxLua/bindings/wxwidgets Modified Files: event.i Log Message: Fix wxEVT_CONTEXT_MENU in bindings finish off the controls.wx.lua sample Index: event.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/event.i,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** event.i 18 Jun 2007 14:54:58 -0000 1.29 --- event.i 22 Jun 2007 03:20:23 -0000 1.30 *************** *** 497,501 **** %class %delete wxContextMenuEvent, wxCommandEvent ! %define_event wxEVT_CONTEXT_MENU // EVT_CONTEXT_MENU(func) wxContextMenuEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0, const wxPoint& pt = wxDefaultPosition) --- 497,501 ---- %class %delete wxContextMenuEvent, wxCommandEvent ! %define_event wxEVT_CONTEXT_MENU // EVT_CONTEXT_MENU(func) EVT_COMMAND_CONTEXT_MENU(winid, func) wxContextMenuEvent(wxEventType type = wxEVT_NULL, wxWindowID winid = 0, const wxPoint& pt = wxDefaultPosition) *************** *** 925,929 **** %define_event wxEVT_HELP // EVT_HELP(winid, func) EVT_HELP_RANGE(id1, id2, func) %define_event wxEVT_DETAILED_HELP // EVT_DETAILED_HELP(winid, func) EVT_DETAILED_HELP_RANGE(id1, id2, func) - %define_event wxEVT_CONTEXT_MENU // EVT_CONTEXT_MENU(func) EVT_COMMAND_CONTEXT_MENU(winid, func) !%wxchkver_2_8 wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID id = 0, const wxPoint& pt = wxDefaultPosition) --- 925,928 ---- |