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-14 05:02:52
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29717/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Rename TLUA_NOTAG to WXLUA_NOTAG since it's only for wxLua Replace calls to lua_pushliteral with lua_pushlstring for better performance Change wxLuaState::Has/Get/SetDerivedMethods to C functions wxlua_has/get/setderivedmethods for a little better speed. Test wxLuaObject in unittest.wx.lua Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxldebug.cpp 6 Jun 2007 03:53:40 -0000 1.32 --- wxldebug.cpp 14 Jun 2007 05:02:49 -0000 1.33 *************** *** 427,431 **** s += wxString::Format(wxT(" (approx %d items)"), nItems); ! if (nTag != TLUA_NOTAG) s += wxString::Format(wxT(" (tag %d)"), nTag); --- 427,431 ---- s += wxString::Format(wxT(" (approx %d items)"), nItems); ! if (nTag != WXLUA_NOTAG) s += wxString::Format(wxT(" (tag %d)"), nTag); *************** *** 443,449 **** if (full) { ! int nTag = wxlState.ttag(index); ! if (nTag != TLUA_NOTAG) { s += wxString::Format(wxT(" (tag %d)"), nTag); --- 443,449 ---- if (full) { ! int nTag = wxlua_ttag(L, index); ! if (nTag != WXLUA_NOTAG) { s += wxString::Format(wxT(" (tag %d)"), nTag); |
From: John L. <jr...@us...> - 2007-06-14 05:02:52
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29717/wxLua/modules/wxlua/include Modified Files: wxldefs.h wxlstate.h Log Message: Rename TLUA_NOTAG to WXLUA_NOTAG since it's only for wxLua Replace calls to lua_pushliteral with lua_pushlstring for better performance Change wxLuaState::Has/Get/SetDerivedMethods to C functions wxlua_has/get/setderivedmethods for a little better speed. Test wxLuaObject in unittest.wx.lua Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxldefs.h 14 Jun 2007 01:23:19 -0000 1.25 --- wxldefs.h 14 Jun 2007 05:02:48 -0000 1.26 *************** *** 112,116 **** // ---------------------------------------------------------------------------- ! #define TLUA_NOTAG 0 // an invalid tag, all tags are initialized to 0 // initializes a lua_debug by nulling everything before use since the --- 112,116 ---- // ---------------------------------------------------------------------------- ! #define WXLUA_NOTAG 0 // an invalid tag, all tags are initialized to 0 // initializes a lua_debug by nulling everything before use since the Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** wxlstate.h 12 Jun 2007 05:03:17 -0000 1.77 --- wxlstate.h 14 Jun 2007 05:02:48 -0000 1.78 *************** *** 138,142 **** WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tpushusertag(lua_State* L, const void* u, int tag); // Get the numeric tag of the object at the stack index using the metatable's "tag" key. ! // returns TLUA_NOTAG if the metatable of the object doesn't have a "tag" // key or it isn't a number. The tag is presumedly the index into the wxLuaReferences // registry table and denotes what type of object this is. --- 138,142 ---- WXDLLIMPEXP_WXLUA bool LUACALL wxlua_tpushusertag(lua_State* L, const void* u, int tag); // Get the numeric tag of the object at the stack index using the metatable's "tag" key. ! // returns WXLUA_NOTAG if the metatable of the object doesn't have a "tag" // key or it isn't a number. The tag is presumedly the index into the wxLuaReferences // registry table and denotes what type of object this is. *************** *** 246,249 **** --- 246,269 ---- //---------------------------------------------------------------------------- + // Derived class member functions for classes in wxLua + //---------------------------------------------------------------------------- + + // Add this derived method, a lua function or value the user has set to a + // wxLua userdata object that we will push onto the stack when they access + // the index of the object with the "method_name". The pObject is the + // userdata and the new wxLuaObject wraps the lua function or value + // which will be deleted by this. + // The derived methods are stored in the "wxLuaDerivedMethods" table in the + // lua registry table. + bool wxlua_setderivedmethod(lua_State* L, void *pObject, const char *method_name, wxLuaObject* wxlObj); + // Is there a derived method given an object and and a method name. + // If push_method then push the method onto the stack. + // A derived method is when a function or value is set to a wxLua userdata. + bool wxlua_hasderivedmethod(lua_State* L, void *pObject, const char *method_name, bool push_method); + // When an object is being garbage collected and we call RemoveTrackedObject + // object on it, we should also remove any derived functions or values it may have. + bool wxlua_removederivedmethod(lua_State* L, void *pObject); + + //---------------------------------------------------------------------------- // wxLuaStateData - the internal data for the wxLuaState. // All members of this class should be accessed through the wxLuaState. *************** *** 620,624 **** bool tpushusertag(const void *u, int tag); // Get the numeric tag of the object at the stack index using the metatable's "tag" key. ! // returns TLUA_NOTAG if the metatable of the object doesn't have a "tag" // key or it isn't a number. The tag is presumedly the index into the wxLuaReferences // registry table and denotes what type of object this is. --- 640,644 ---- bool tpushusertag(const void *u, int tag); // Get the numeric tag of the object at the stack index using the metatable's "tag" key. ! // returns WXLUA_NOTAG if the metatable of the object doesn't have a "tag" // key or it isn't a number. The tag is presumedly the index into the wxLuaReferences // registry table and denotes what type of object this is. |
From: John L. <jr...@us...> - 2007-06-14 05:02:51
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29717/wxLua/bindings/wxlua Modified Files: override.hpp Log Message: Rename TLUA_NOTAG to WXLUA_NOTAG since it's only for wxLua Replace calls to lua_pushliteral with lua_pushlstring for better performance Change wxLuaState::Has/Get/SetDerivedMethods to C functions wxlua_has/get/setderivedmethods for a little better speed. Test wxLuaObject in unittest.wx.lua Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** override.hpp 14 Jun 2007 01:23:07 -0000 1.1 --- override.hpp 14 Jun 2007 05:02:45 -0000 1.2 *************** *** 57,61 **** // int wxluaarg_tag int wxluaarg_tag = wxlua_ttag(L, 1); ! if (wxluaarg_tag == TLUA_NOTAG) { int ltype = lua_type(L, 1); --- 57,61 ---- // int wxluaarg_tag int wxluaarg_tag = wxlua_ttag(L, 1); ! if (wxluaarg_tag == WXLUA_NOTAG) { int ltype = lua_type(L, 1); |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp config.cpp controls.cpp data.cpp datetime.cpp defsutil.cpp dialogs.cpp event.cpp file.cpp gdi.cpp geometry.cpp grid.cpp help.cpp html.cpp image.cpp menutool.cpp print.cpp regex.cpp sizer.cpp socket.cpp wave.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** xml.cpp 13 Jun 2007 00:09:03 -0000 1.37 --- xml.cpp 14 Jun 2007 01:23:19 -0000 1.38 *************** *** 88,107 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_Delete[] = { &s_wxluatag_wxXmlNode, NULL }; - static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_Delete[1] = {{ wxLua_wxXmlNode_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlNode_Delete }}; - static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); - // 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_wxXmlNode_DeleteProperty[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlNode_DeleteProperty(lua_State *L); --- 88,91 ---- *************** *** 477,480 **** --- 461,480 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_delete[] = { &s_wxluatag_wxXmlNode, NULL }; + static int LUACALL wxLua_wxXmlNode_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_delete[1] = {{ wxLua_wxXmlNode_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlNode_delete }}; + static int LUACALL wxLua_wxXmlNode_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); + // 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_wxXmlNode_constructor2[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Integer, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, &s_wxluatag_wxXmlNode, NULL }; static int LUACALL wxLua_wxXmlNode_constructor2(lua_State *L); *************** *** 619,623 **** #endif // (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlNode_Delete, 1, NULL }, { "DeleteProperty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_DeleteProperty, 1, NULL }, { "GetChildren", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_GetChildren, 1, NULL }, --- 619,622 ---- *************** *** 643,646 **** --- 642,646 ---- { "SetProperties", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_SetProperties, 1, NULL }, { "SetType", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlNode_SetType, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlNode_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 664,683 **** int s_wxluatag_wxXmlProperty = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_Delete[] = { &s_wxluatag_wxXmlProperty, NULL }; - static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlProperty_Delete[1] = {{ wxLua_wxXmlProperty_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlProperty_Delete }}; - static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); - // 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_wxXmlProperty_GetName[] = { &s_wxluatag_wxXmlProperty, NULL }; static int LUACALL wxLua_wxXmlProperty_GetName(lua_State *L); --- 664,667 ---- *************** *** 785,788 **** --- 769,788 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlProperty_delete[] = { &s_wxluatag_wxXmlProperty, NULL }; + static int LUACALL wxLua_wxXmlProperty_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlProperty_delete[1] = {{ wxLua_wxXmlProperty_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlProperty_delete }}; + static int LUACALL wxLua_wxXmlProperty_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); + // 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_wxXmlProperty_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, NULL }; static int LUACALL wxLua_wxXmlProperty_constructor1(lua_State *L); *************** *** 853,857 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlProperty_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlProperty_Delete, 1, NULL }, { "GetName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_GetName, 1, NULL }, { "GetNext", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_GetNext, 1, NULL }, --- 853,856 ---- *************** *** 860,863 **** --- 859,863 ---- { "SetNext", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_SetNext, 1, NULL }, { "SetValue", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlProperty_SetValue, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlProperty_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 881,900 **** int s_wxluatag_wxXmlDocument = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_Delete[] = { &s_wxluatag_wxXmlDocument, NULL }; - static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlDocument_Delete[1] = {{ wxLua_wxXmlDocument_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlDocument_Delete }}; - static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); - // 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_wxXmlDocument_GetFileEncoding[] = { &s_wxluatag_wxXmlDocument, NULL }; static int LUACALL wxLua_wxXmlDocument_GetFileEncoding(lua_State *L); --- 881,884 ---- *************** *** 1064,1067 **** --- 1048,1067 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlDocument_delete[] = { &s_wxluatag_wxXmlDocument, NULL }; + static int LUACALL wxLua_wxXmlDocument_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlDocument_delete[1] = {{ wxLua_wxXmlDocument_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlDocument_delete }}; + static int LUACALL wxLua_wxXmlDocument_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); + // 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_wxXmlDocument_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlDocument_constructor1(lua_State *L); *************** *** 1132,1136 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlDocument_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlDocument_Delete, 1, NULL }, { "GetFileEncoding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_GetFileEncoding, 1, NULL }, { "GetRoot", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_GetRoot, 1, NULL }, --- 1132,1135 ---- *************** *** 1142,1145 **** --- 1141,1145 ---- { "SetRoot", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_SetRoot, 1, NULL }, { "SetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlDocument_SetVersion, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlDocument_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) *************** *** 1295,1314 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Delete[] = { &s_wxluatag_wxXmlResource, NULL }; - static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Delete[1] = {{ wxLua_wxXmlResource_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Delete }}; - static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); - // 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_wxXmlResource_Get[] = { &s_wxluatag_wxXmlResource, NULL }; static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); --- 1295,1298 ---- *************** *** 1743,1746 **** --- 1727,1746 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_delete[] = { &s_wxluatag_wxXmlResource, NULL }; + static int LUACALL wxLua_wxXmlResource_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_delete[1] = {{ wxLua_wxXmlResource_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_delete }}; + static int LUACALL wxLua_wxXmlResource_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); + // 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_wxXmlResource_constructor1[] = { &s_wxluaarg_String, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxXmlResource_constructor1(lua_State *L); *************** *** 1897,1901 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlResource_Delete, 1, NULL }, { "Get", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, --- 1897,1900 ---- *************** *** 1940,1943 **** --- 1939,1943 ---- { "SetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_SetFlags, 1, NULL }, { "Unload", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Unload, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXmlResource_delete, 1, NULL }, #if (wxLUA_USE_wxXMLResource && wxUSE_XML) Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** defsutil.cpp 13 Jun 2007 00:08:58 -0000 1.39 --- defsutil.cpp 14 Jun 2007 01:23:13 -0000 1.40 *************** *** 53,72 **** #endif // (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) - static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_Delete[] = { &s_wxluatag_wxProcess, NULL }; - static int LUACALL wxLua_wxProcess_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_Delete[1] = {{ wxLua_wxProcess_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxProcess_Delete }}; - static int LUACALL wxLua_wxProcess_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); - // 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_wxProcess_Detach[] = { &s_wxluatag_wxProcess, NULL }; static int LUACALL wxLua_wxProcess_Detach(lua_State *L); --- 53,56 ---- *************** *** 319,322 **** --- 303,322 ---- #endif // ((wxUSE_STREAMS) && (wxLUA_USE_wxProcess)) && (wxUSE_STREAMS) + static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_delete[] = { &s_wxluatag_wxProcess, NULL }; + static int LUACALL wxLua_wxProcess_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_delete[1] = {{ wxLua_wxProcess_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxProcess_delete }}; + static int LUACALL wxLua_wxProcess_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); + // 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_wxProcess_constructor[] = { &s_wxluatag_wxEvtHandler, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxProcess_constructor(lua_State *L); *************** *** 353,357 **** #endif // (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxProcess_Delete, 1, NULL }, { "Detach", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxProcess_Detach, 1, NULL }, { "Exists", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxProcess_Exists, 1, NULL }, --- 353,356 ---- *************** *** 378,381 **** --- 377,381 ---- #endif // ((wxUSE_STREAMS) && (wxLUA_USE_wxProcess)) && (wxUSE_STREAMS) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxProcess_delete, 1, NULL }, { "wxProcess", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxProcess_constructor, 1, NULL }, *************** *** 450,469 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxMouseState_Delete[] = { &s_wxluatag_wxMouseState, NULL }; - static int LUACALL wxLua_wxMouseState_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_Delete[1] = {{ wxLua_wxMouseState_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxMouseState_Delete }}; - static int LUACALL wxLua_wxMouseState_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); - // 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_wxMouseState_GetX[] = { &s_wxluatag_wxMouseState, NULL }; static int LUACALL wxLua_wxMouseState_GetX(lua_State *L); --- 450,453 ---- *************** *** 745,748 **** --- 729,748 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxMouseState_delete[] = { &s_wxluatag_wxMouseState, NULL }; + static int LUACALL wxLua_wxMouseState_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_delete[1] = {{ wxLua_wxMouseState_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxMouseState_delete }}; + static int LUACALL wxLua_wxMouseState_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); + // 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_wxMouseState_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMouseState_constructor[1] = {{ wxLua_wxMouseState_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 771,775 **** { "CmdDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_CmdDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxMouseState_Delete, 1, NULL }, { "GetX", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_GetX, 1, NULL }, { "GetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_GetY, 1, NULL }, --- 771,774 ---- *************** *** 788,791 **** --- 787,791 ---- { "SetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_SetY, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMouseState_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxMouseState_delete, 1, NULL }, { "wxMouseState", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxMouseState_constructor, 1, NULL }, *************** *** 806,813 **** int s_wxluatag_wxBusyCursor = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyCursor_Delete[] = { &s_wxluatag_wxBusyCursor, NULL }; ! static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyCursor_Delete[1] = {{ wxLua_wxBusyCursor_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyCursor_Delete }}; ! static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L) { wxLuaState wxlState(L); --- 806,813 ---- int s_wxluatag_wxBusyCursor = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyCursor_delete[] = { &s_wxluatag_wxBusyCursor, NULL }; ! static int LUACALL wxLua_wxBusyCursor_delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyCursor_delete[1] = {{ wxLua_wxBusyCursor_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyCursor_delete }}; ! static int LUACALL wxLua_wxBusyCursor_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 857,861 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyCursor_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyCursor_Delete, 1, NULL }, #if (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) --- 857,861 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyCursor_methods[] = { ! { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyCursor_delete, 1, NULL }, #if (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) *************** *** 879,886 **** int s_wxluatag_wxBusyInfo = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyInfo_Delete[] = { &s_wxluatag_wxBusyInfo, NULL }; ! static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyInfo_Delete[1] = {{ wxLua_wxBusyInfo_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyInfo_Delete }}; ! static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L) { wxLuaState wxlState(L); --- 879,886 ---- int s_wxluatag_wxBusyInfo = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBusyInfo_delete[] = { &s_wxluatag_wxBusyInfo, NULL }; ! static int LUACALL wxLua_wxBusyInfo_delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxBusyInfo_delete[1] = {{ wxLua_wxBusyInfo_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBusyInfo_delete }}; ! static int LUACALL wxLua_wxBusyInfo_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 925,929 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyInfo_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyInfo_Delete, 1, NULL }, { "wxBusyInfo", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBusyInfo_constructor, 1, NULL }, --- 925,929 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyInfo_methods[] = { ! { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBusyInfo_delete, 1, NULL }, { "wxBusyInfo", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBusyInfo_constructor, 1, NULL }, Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** wxlua.cpp 13 Jun 2007 00:09:03 -0000 1.42 --- wxlua.cpp 14 Jun 2007 01:23:18 -0000 1.43 *************** *** 26,195 **** - // --------------------------------------------------------------------------- - // Bind class wxLuaState - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxLuaState' - int s_wxluatag_wxLuaState = -1; - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaState_Delete[] = { &s_wxluatag_wxLuaState, NULL }; - static int LUACALL wxLua_wxLuaState_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaState_Delete[1] = {{ wxLua_wxLuaState_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaState_Delete }}; - static int LUACALL wxLua_wxLuaState_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); - // 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; - } - - - - // Map Lua Class Methods to C Binding Functions - wxLuaBindMethod wxLuaState_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaState_Delete, 1, NULL }, - { 0, 0, 0, 0 }, - }; - - int wxLuaState_methodCount = sizeof(wxLuaState_methods)/sizeof(wxLuaBindMethod) - 1; - - - // --------------------------------------------------------------------------- - // Bind class wxLuaObject - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxLuaObject' - int s_wxluatag_wxLuaObject = -1; - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_Delete[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_Delete[1] = {{ wxLua_wxLuaObject_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_Delete }}; - static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // 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_wxLuaObject_GetAllocationFlags[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags[1] = {{ wxLua_wxLuaObject_GetAllocationFlags, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetAllocationFlags }}; - // int GetAllocationFlags() const - static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetAllocationFlags - returns = self->GetAllocationFlags(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_GetObject[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetObject[1] = {{ wxLua_wxLuaObject_GetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetObject }}; - // %override wxLua_wxLuaObject_GetObject - // void *GetObject() const - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetObject that push the item onto the stack, or nil - if (self->GetObject()) - return 1; - - return 0; - } - - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Integer, NULL }; - static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag[1] = {{ wxLua_wxLuaObject_HasAllocationFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }}; - // bool HasAllocationFlag(wxLuaObject_Type flag) - static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // wxLuaObject_Type flag - wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getintegertype(L, 2); - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call HasAllocationFlag - returns = self->HasAllocationFlag(flag); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluatag_wxLuaObject, NULL }; - static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_SetObject[1] = {{ wxLua_wxLuaObject_SetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_SetObject }}; - // %override wxLua_wxLuaObject_SetObject - // void SetObject(void *object) - static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call SetObject - self->SetObject(1); - // return the number of parameters - return 0; - } - - - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_constructor[1] = {{ wxLua_wxLuaObject_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; - // %override wxLua_wxLuaObject_constructor - // wxLuaObject(void *object) - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) - { - wxluabind_removetableforcall(L); - wxLuaState wxlState(L); - wxLuaObject *returns; - // call constructor - returns = new wxLuaObject(wxlState, 1); - // add to tracked memory list - wxlState.AddTrackedObject(returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); - // return the number of parameters - return 1; - } - - - - - // Map Lua Class Methods to C Binding Functions - wxLuaBindMethod wxLuaObject_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaObject_Delete, 1, NULL }, - { "GetAllocationFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags, 1, NULL }, - { "GetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetObject, 1, NULL }, - { "HasAllocationFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag, 1, NULL }, - { "SetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_SetObject, 1, NULL }, - { "wxLuaObject", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaObject_constructor, 1, NULL }, - { 0, 0, 0, 0 }, - }; - - int wxLuaObject_methodCount = sizeof(wxLuaObject_methods)/sizeof(wxLuaBindMethod) - 1; - - #if wxLUA_USE_wxLuaPrintout --- 26,29 ---- *************** *** 201,220 **** int s_wxluatag_wxLuaPrintout = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_Delete[] = { &s_wxluatag_wxLuaPrintout, NULL }; - static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaPrintout_Delete[1] = {{ wxLua_wxLuaPrintout_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaPrintout_Delete }}; - static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); - // 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_wxLuaPrintout_GetID[] = { &s_wxluatag_wxLuaPrintout, NULL }; static int LUACALL wxLua_wxLuaPrintout_GetID(lua_State *L); --- 35,38 ---- *************** *** 280,283 **** --- 98,117 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_delete[] = { &s_wxluatag_wxLuaPrintout, NULL }; + static int LUACALL wxLua_wxLuaPrintout_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaPrintout_delete[1] = {{ wxLua_wxLuaPrintout_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaPrintout_delete }}; + static int LUACALL wxLua_wxLuaPrintout_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); + // 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_wxLuaPrintout_constructor[] = { &s_wxluaarg_String, &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L); *************** *** 312,319 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaPrintout_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaPrintout_Delete, 1, NULL }, { "GetID", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_GetID, 1, NULL }, { "SetPageInfo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_SetPageInfo, 1, NULL }, { "TestVirtualFunctionBinding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding, 1, NULL }, { "wxLuaPrintout", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaPrintout_constructor, 1, NULL }, --- 146,153 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaPrintout_methods[] = { { "GetID", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_GetID, 1, NULL }, { "SetPageInfo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_SetPageInfo, 1, NULL }, { "TestVirtualFunctionBinding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaPrintout_delete, 1, NULL }, { "wxLuaPrintout", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaPrintout_constructor, 1, NULL }, *************** *** 397,417 **** int s_wxluatag_wxLuaHtmlWinTagEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_Delete[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_Delete[1] = {{ wxLua_wxLuaHtmlWinTagEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_Delete }}; - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); - // 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; - } - - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; --- 231,234 ---- *************** *** 490,493 **** --- 307,326 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_delete[] = { &s_wxluatag_wxLuaHtmlWinTagEvent, NULL }; + static int LUACALL wxLua_wxLuaHtmlWinTagEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_delete[1] = {{ wxLua_wxLuaHtmlWinTagEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_delete }}; + static int LUACALL wxLua_wxLuaHtmlWinTagEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); + // 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; + } + *************** *** 495,500 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaHtmlWinTagEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_Delete, 1, NULL }, - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) { "GetHtmlParser", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 1, NULL }, --- 328,331 ---- *************** *** 504,507 **** --- 335,339 ---- { "GetParseInnerCalled", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 1, NULL }, { "SetParseInnerCalled", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_delete, 1, NULL }, { 0, 0, 0, 0 }, Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** image.cpp 13 Jun 2007 00:09:01 -0000 1.43 --- image.cpp 14 Jun 2007 01:23:15 -0000 1.44 *************** *** 258,277 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Delete[] = { &s_wxluatag_wxImage, NULL }; - static int LUACALL wxLua_wxImage_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_Delete[1] = {{ wxLua_wxImage_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImage_Delete }}; - static int LUACALL wxLua_wxImage_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); - // 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_wxImage_Destroy[] = { &s_wxluatag_wxImage, NULL }; static int LUACALL wxLua_wxImage_Destroy(lua_State *L); --- 258,261 ---- *************** *** 1732,1735 **** --- 1716,1735 ---- #endif // (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_delete[] = { &s_wxluatag_wxImage, NULL }; + static int LUACALL wxLua_wxImage_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_delete[1] = {{ wxLua_wxImage_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImage_delete }}; + static int LUACALL wxLua_wxImage_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // 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_wxImage_op_assign[] = { &s_wxluatag_wxImage, &s_wxluatag_wxImage, NULL }; static int LUACALL wxLua_wxImage_op_assign(lua_State *L); *************** *** 2152,2156 **** { "Copy", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Copy, 1, NULL }, { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Create, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImage_Delete, 1, NULL }, { "Destroy", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_Destroy, 1, NULL }, { "FindFirstUnusedColour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_FindFirstUnusedColour, 1, NULL }, --- 2152,2155 ---- *************** *** 2263,2266 **** --- 2262,2266 ---- #endif // (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImage_delete, 1, NULL }, { "op_assign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImage_op_assign, 1, NULL }, *************** *** 2764,2783 **** int s_wxluatag_wxImageHandler = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHandler_Delete[] = { &s_wxluatag_wxImageHandler, NULL }; - static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHandler_Delete[1] = {{ wxLua_wxImageHandler_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHandler_Delete }}; - static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); - // 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_wxImageHandler_GetExtension[] = { &s_wxluatag_wxImageHandler, NULL }; static int LUACALL wxLua_wxImageHandler_GetExtension(lua_State *L); --- 2764,2767 ---- *************** *** 2998,3001 **** --- 2982,3001 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHandler_delete[] = { &s_wxluatag_wxImageHandler, NULL }; + static int LUACALL wxLua_wxImageHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHandler_delete[1] = {{ wxLua_wxImageHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHandler_delete }}; + static int LUACALL wxLua_wxImageHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + // 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; + } + *************** *** 3003,3007 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxImageHandler_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHandler_Delete, 1, NULL }, { "GetExtension", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_GetExtension, 1, NULL }, --- 3003,3006 ---- *************** *** 3023,3026 **** --- 3022,3026 ---- { "SetName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_SetName, 1, NULL }, { "SetType", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_SetType, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHandler_delete, 1, NULL }, { 0, 0, 0, 0 }, Index: config.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/config.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** config.cpp 13 Jun 2007 00:08:58 -0000 1.40 --- config.cpp 14 Jun 2007 01:23:11 -0000 1.41 *************** *** 50,74 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_Delete[] = { &s_wxluatag_wxConfigBase, NULL }; - static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigBase_Delete[1] = {{ wxLua_wxConfigBase_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_Delete }}; - // %override wxLua_wxConfigBase_Delete - // void Destroy() - static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); - - if (wxConfigBase::Get(false) == self) // clear us from the wxConfigBase - wxConfigBase::Set(NULL); - - // call Destroy - delete self; - // return the number of parameters - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_DeleteAll[] = { &s_wxluatag_wxConfigBase, NULL }; static int LUACALL wxLua_wxConfigBase_DeleteAll(lua_State *L); --- 50,53 ---- *************** *** 732,735 **** --- 711,735 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_delete[] = { &s_wxluatag_wxConfigBase, NULL }; + static int LUACALL wxLua_wxConfigBase_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigBase_delete[1] = {{ wxLua_wxConfigBase_delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_delete }}; + // %override wxLua_wxConfigBase_delete + // void delete() + static int LUACALL wxLua_wxConfigBase_delete(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); + + if (wxConfigBase::Get(false) == self) // clear us from the wxConfigBase + wxConfigBase::Set(NULL); + + // call Destroy + delete self; + // return the number of parameters + return 0; + } + + *************** *** 775,779 **** wxLuaBindMethod wxConfigBase_methods[] = { { "Create", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxConfigBase_Create, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_Delete, 1, NULL }, { "DeleteAll", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_DeleteAll, 1, NULL }, { "DeleteEntry", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_DeleteEntry, 1, NULL }, --- 775,778 ---- *************** *** 813,816 **** --- 812,817 ---- #endif // (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { "delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigBase_delete, 1, NULL }, + { 0, 0, 0, 0 }, }; *************** *** 1002,1021 **** int s_wxluatag_wxConfigPathChanger = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_Delete[] = { &s_wxluatag_wxConfigPathChanger, NULL }; - static int LUACALL wxLua_wxConfigPathChanger_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigPathChanger_Delete[1] = {{ wxLua_wxConfigPathChanger_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxConfigPathChanger_Delete }}; - static int LUACALL wxLua_wxConfigPathChanger_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxConfigPathChanger * self = (wxConfigPathChanger *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigPathChanger); - // 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_wxConfigPathChanger_Name[] = { &s_wxluatag_wxConfigPathChanger, NULL }; static int LUACALL wxLua_wxConfigPathChanger_Name(lua_State *L); --- 1003,1006 ---- *************** *** 1055,1058 **** --- 1040,1059 ---- #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigPathChanger_delete[] = { &s_wxluatag_wxConfigPathChanger, NULL }; + static int LUACALL wxLua_wxConfigPathChanger_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxConfigPathChanger_delete[1] = {{ wxLua_wxConfigPathChanger_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxConfigPathChanger_delete }}; + static int LUACALL wxLua_wxConfigPathChanger_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxConfigPathChanger * self = (wxConfigPathChanger *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigPathChanger); + // 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_wxConfigPathChanger_constructor[] = { &s_wxluatag_wxConfigBase, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxConfigPathChanger_constructor(lua_State *L); *************** *** 1083,1087 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxConfigPathChanger_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxConfigPathChanger_Delete, 1, NULL }, { "Name", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigPathChanger_Name, 1, NULL }, --- 1084,1087 ---- *************** *** 1090,1093 **** --- 1090,1094 ---- #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxConfigPathChanger_delete, 1, NULL }, { "wxConfigPathChanger", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxConfigPathChanger_constructor, 1, NULL }, Index: grid.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/grid.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** grid.cpp 13 Jun 2007 00:09:00 -0000 1.41 --- grid.cpp 14 Jun 2007 01:23:14 -0000 1.42 *************** *** 7471,7490 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEvent_Delete[] = { &s_wxluatag_wxGridEvent, NULL }; - static int LUACALL wxLua_wxGridEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEvent_Delete[1] = {{ wxLua_wxGridEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEvent_Delete }}; - static int LUACALL wxLua_wxGridEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridEvent * self = (wxGridEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEvent); - // 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_wxGridEvent_GetCol[] = { &s_wxluatag_wxGridEvent, NULL }; static int LUACALL wxLua_wxGridEvent_GetCol(lua_State *L); --- 7471,7474 ---- *************** *** 7602,7605 **** --- 7586,7605 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEvent_delete[] = { &s_wxluatag_wxGridEvent, NULL }; + static int LUACALL wxLua_wxGridEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEvent_delete[1] = {{ wxLua_wxGridEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEvent_delete }}; + static int LUACALL wxLua_wxGridEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridEvent * self = (wxGridEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEvent); + // 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; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 7657,7661 **** { "AltDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_AltDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEvent_Delete, 1, NULL }, { "GetCol", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_GetCol, 1, NULL }, --- 7657,7660 ---- *************** *** 7668,7671 **** --- 7667,7671 ---- { "Selecting", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_Selecting, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 7920,7939 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridRangeSelectEvent_Delete[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; - static int LUACALL wxLua_wxGridRangeSelectEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridRangeSelectEvent_Delete[1] = {{ wxLua_wxGridRangeSelectEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridRangeSelectEvent_Delete }}; - static int LUACALL wxLua_wxGridRangeSelectEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridRangeSelectEvent * self = (wxGridRangeSelectEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridRangeSelectEvent); - // 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_wxGridRangeSelectEvent_GetBottomRightCoords[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; static int LUACALL wxLua_wxGridRangeSelectEvent_GetBottomRightCoords(lua_State *L); --- 7920,7923 ---- *************** *** 8104,8107 **** --- 8088,8107 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridRangeSelectEvent_delete[] = { &s_wxluatag_wxGridRangeSelectEvent, NULL }; + static int LUACALL wxLua_wxGridRangeSelectEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridRangeSelectEvent_delete[1] = {{ wxLua_wxGridRangeSelectEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridRangeSelectEvent_delete }}; + static int LUACALL wxLua_wxGridRangeSelectEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridRangeSelectEvent * self = (wxGridRangeSelectEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridRangeSelectEvent); + // 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; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8155,8159 **** { "AltDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_AltDown, 1, NULL }, { "ControlDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_ControlDown, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridRangeSelectEvent_Delete, 1, NULL }, { "GetBottomRightCoords", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_GetBottomRightCoords, 1, NULL }, { "GetBottomRow", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_GetBottomRow, 1, NULL }, --- 8155,8158 ---- *************** *** 8165,8168 **** --- 8164,8168 ---- { "Selecting", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_Selecting, 1, NULL }, { "ShiftDown", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridRangeSelectEvent_ShiftDown, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridRangeSelectEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8186,8205 **** int s_wxluatag_wxGridEditorCreatedEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_Delete[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; - static int LUACALL wxLua_wxGridEditorCreatedEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEditorCreatedEvent_Delete[1] = {{ wxLua_wxGridEditorCreatedEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_Delete }}; - static int LUACALL wxLua_wxGridEditorCreatedEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxGridEditorCreatedEvent * self = (wxGridEditorCreatedEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEditorCreatedEvent); - // 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_wxGridEditorCreatedEvent_GetCol[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; static int LUACALL wxLua_wxGridEditorCreatedEvent_GetCol(lua_State *L); --- 8186,8189 ---- *************** *** 8307,8310 **** --- 8291,8310 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_delete[] = { &s_wxluatag_wxGridEditorCreatedEvent, NULL }; + static int LUACALL wxLua_wxGridEditorCreatedEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridEditorCreatedEvent_delete[1] = {{ wxLua_wxGridEditorCreatedEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_delete }}; + static int LUACALL wxLua_wxGridEditorCreatedEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGridEditorCreatedEvent * self = (wxGridEditorCreatedEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxGridEditorCreatedEvent); + // 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; + } + #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) *************** *** 8346,8350 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGridEditorCreatedEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_Delete, 1, NULL }, { "GetCol", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_GetCol, 1, NULL }, { "GetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_GetControl, 1, NULL }, --- 8346,8349 ---- *************** *** 8353,8356 **** --- 8352,8356 ---- { "SetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_SetControl, 1, NULL }, { "SetRow", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_SetRow, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGridEditorCreatedEvent_delete, 1, NULL }, #if (wxLUA_USE_wxObject) && (wxLUA_USE_wxGrid && wxUSE_GRID) Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** file.cpp 13 Jun 2007 00:08:59 -0000 1.50 --- file.cpp 14 Jun 2007 01:23:13 -0000 1.51 *************** *** 113,132 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxPathList_Delete[] = { &s_wxluatag_wxPathList, NULL }; - static int LUACALL wxLua_wxPathList_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxPathList_Delete[1] = {{ wxLua_wxPathList_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPathList_Delete }}; - static int LUACALL wxLua_wxPathList_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxPathList * self = (wxPathList *)wxlState.GetUserDataType(1, s_wxluatag_wxPathList); - // 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; - } - #if wxCHECK_VERSION(2,8,0) --- 113,116 ---- *************** *** 213,216 **** --- 197,216 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxPathList_delete[] = { &s_wxluatag_wxPathList, NULL }; + static int LUACALL wxLua_wxPathList_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPathList_delete[1] = {{ wxLua_wxPathList_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPathList_delete }}; + static int LUACALL wxLua_wxPathList_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPathList * self = (wxPathList *)wxlState.GetUserDataType(1, s_wxluatag_wxPathList); + // 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... [truncated message content] |
From: John L. <jr...@us...> - 2007-06-14 01:23:53
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbindstc/include Modified Files: wxbind.h Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/include/wxbind.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wxbind.h 13 Jun 2007 00:09:03 -0000 1.27 --- wxbind.h 14 Jun 2007 01:23:19 -0000 1.28 *************** *** 26,32 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 12 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 12 // --------------------------------------------------------------------------- --- 26,32 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 13 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 13 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-14 01:23:46
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/docs Modified Files: binding.html changelog.txt wxlua.html wxluaref.html Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxluaref.html 13 Jun 2007 04:15:22 -0000 1.22 --- wxluaref.html 14 Jun 2007 01:23:09 -0000 1.23 *************** *** 7,11 **** </head> <body> ! <h1>wxLua 2.8.0.0 Class Reference for wxWidgets 2.8.0</h1> <h2>wxWidgets Classes</h2> <a href="#wxANIHandler">wxANIHandler</a> - (Not in wxWidgets reference manual)<br> --- 7,11 ---- </head> <body> ! <h1>wxLua 2.8.4.0 Class Reference for wxWidgets 2.8.4</h1> <h2>wxWidgets Classes</h2> [...1611 lines suppressed...] + <font color=#AA0000><font size=+1><i>%class</i> <i>%delete</i> <b><a name="wxLuaDebuggerEvent">wxLuaDebuggerEvent</a></b>, <a href="#wxEvent">wxEvent</a></font></font><blockquote> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_DEBUGGEE_CONNECTED // EVT_WXLUA_DEBUGGER_DEBUGGEE_CONNECTED(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED // EVT_WXLUA_DEBUGGER_DEBUGGEE_DISCONNECTED(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_BREAK // EVT_WXLUA_DEBUGGER_BREAK(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_PRINT // EVT_WXLUA_DEBUGGER_PRINT(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_ERROR // EVT_WXLUA_DEBUGGER_ERROR(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_EXIT // EVT_WXLUA_DEBUGGER_EXIT(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_STACK_ENUM // EVT_WXLUA_DEBUGGER_STACK_ENUM(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM // EVT_WXLUA_DEBUGGER_STACK_ENTRY_ENUM(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_TABLE_ENUM // EVT_WXLUA_DEBUGGER_TABLE_ENUM(id, fn)</font><br> + <font color=#007755> <i>%define_event</i> wxEVT_WXLUA_DEBUGGER_EVALUATE_EXPR // EVT_WXLUA_DEBUGGER_EVALUATE_EXPR(id, fn)</font><br> + <br> + int GetLineNumber() const<br> + int GetReference() const<br> + <a href="#wxString">wxString</a> GetFileName() const<br> + <a href="#wxString">wxString</a> GetMessage() const<br> + //const wxLuaDebugData GetDebugData() const<br> + </blockquote><font color=#AA0000><i>%endclass</i></font><br> </body> </html> Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxlua.html 12 Jun 2007 20:36:10 -0000 1.24 --- wxlua.html 14 Jun 2007 01:23:09 -0000 1.25 *************** *** 272,288 **** elseif (bool) then ... else ... end</b></li> ! </ul><blockquote> <pre>local a, b, c = 1, 2, 3 -- can assign multiple values<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c ~= 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre></blockquote><ul><ul> ! <li>There is no case statement, but a table[value] = function() ... end may be used to simulate one.</li> <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello #1") end<br>mycase[2] = function() print("Hello #2") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre></blockquote></ul> ! <li><b>while (bool) ... end</b></li> <ul> <li>Note : there is no <i>continue</i> keyword only <i>break</i></li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre></blockquote><ul><ul> ! <li>You can make a "fake" continue by doing this, doesn't --- 272,285 ---- elseif (bool) then ... else ... end</b></li> ! </ul><blockquote> <pre>local a, b, c = 1, 2, 3 -- can assign multiple values<br>a = 1; b = 2; c = 3 -- use ; for multiple lines of code on single line<br>a, b, c = 1, 2, 3 -- this works too<br>if (a == 1) and ((b <= 2) or (c ~= 3)) then <br> print(a+b/c) <br>elseif a == 2 then -- no parentheses necessary<br> print(a)<br>else<br> print(b)<br>end</pre></blockquote><ul><ul><li>There is no case statement, but a table[value] = function() ... end may be used to simulate one.</li> <blockquote> ! <pre>mycase = {}<br>mycase[1] = function() print("Hello #1") end<br>mycase[2] = function() print("Hello #2") end<br>...<br>if mycase[value] then<br> mycase[value]()<br>else<br> print("Unknown case value")<br>end</pre></blockquote></ul><li><b>while (bool) ... end</b></li> <ul> <li>Note : there is no <i>continue</i> keyword only <i>break</i></li> </ul> ! </ul><blockquote> <pre>function CheckA(val) if val == 5 then return true end end<br>local a = 1<br>while a < 10 do<br> print(a)<br> a = a + 1 -- no increment operator<br> if CheckA(a) then break end<br>end</pre></blockquote><ul><ul><li>You can make a "fake" continue by doing this, doesn't *************** *** 329,334 **** size of the mantissa).<br>The logical operations start with "b" for "bit" to avoid clashing with reserved words; although "xor" isn't a ! reserved word, it seemed better to use "bxor" for consistency.<br><ul><li>bit.bnot(a) returns the one's complement of a</li><li>bit.band(w1,...) returns the bitwise and of the w's</li><li>bit.bor(w1,...) returns the bitwise or of the w's</li><li>bit.bxor(w1,...) returns the bitwise exclusive or of the w's</li><li>bit.lshift(a,b) returns a shifted left b places</li><li>bit.rshift(a,b) returns a shifted logically right b places</li><li>bit.arshift(a,b) returns a shifted arithmetically right b places (works on negative ! numbers too)</li><li>bit.mod(a,b) returns the integer remainder of a divided by b</li></ul><h2><a name="wxLua_Programming_in_Lua"></a><u>Programming in wxLua</u></h2> Programming in wxLua means that you're writing lua programs using the --- 326,339 ---- size of the mantissa).<br>The logical operations start with "b" for "bit" to avoid clashing with reserved words; although "xor" isn't a ! reserved word, it seemed better to use "bxor" for consistency.<br><ul><li>bit.bnot(a) ! returns the one's complement of a</li><li>bit.band(w1,...) ! returns the bitwise and of the w's</li><li>bit.bor(w1,...) ! returns the bitwise or of the w's</li><li>bit.bxor(w1,...) ! returns the bitwise exclusive or of the w's</li><li>bit.lshift(a,b) ! returns a shifted left b places</li><li>bit.rshift(a,b) ! returns a shifted logically right b places</li><li>bit.arshift(a,b) ! returns a shifted arithmetically right b places (works on negative ! numbers too)</li><li>bit.mod(a,b) returns the integer ! remainder of a divided by b</li></ul><h2><a name="wxLua_Programming_in_Lua"></a><u>Programming in wxLua</u></h2> Programming in wxLua means that you're writing lua programs using the *************** *** 342,346 **** placed in their own "namespace" table, but for the examples below we will use the <i><b>wx</b></i> table. <br> ! <br>The semantics for accessing wxWidgets elements in wxLua tries to map as closely as possible to the underlying C++ notation so that the official C++ documentation may be used as --- 347,359 ---- placed in their own "namespace" table, but for the examples below we will use the <i><b>wx</b></i> table. <br> ! <br>Tables that wxLua creates containing the binding functions or ! objects.<br><ul><li><span style="font-weight: bold;">bit</span> - The bit ! library from Reuben Thomas for manipulating integer bits.</li><li><span style="font-weight: bold;">wxlua</span> - Special ! functions for introspecting into wxLua or generic functions that wxLua ! provides that are independent of wxWidgets.</li><li><span style="font-weight: bold;">wx</span> - All wxWidgets ! functions, classes, defines, enums, strings, events, and ! objects are placed here.</li><li><span style="font-weight: bold;">wxstc</span> - The ! wxStyledTextCtrl wrapper around the Scintilla text editor.</li></ul>The ! semantics for accessing wxWidgets elements in wxLua tries to map as closely as possible to the underlying C++ notation so that the official C++ documentation may be used as *************** *** 367,371 **** the lua ANSI C 8-bit char* string to a wxString (which may be a unicode w_char* string) is done internally.<br> ! <br><u><b>wxArrayString / wxSortedArrayString:</b></u> Function parameters that take a "const wxArrayString& arr" or --- 380,384 ---- the lua ANSI C 8-bit char* string to a wxString (which may be a unicode w_char* string) is done internally.<br> ! <br><u><b>wxArrayString and wxSortedArrayString:</b></u> Function parameters that take a "const wxArrayString& arr" or *************** *** 496,510 **** name are overloaded (as in C++) and the proper function to call ! is determined at runtime. </li> <li>Functions from the base class(es) are also available and may be overloaded as well.</li> <li>The C++ classes are tables in lua, but have a __call ! metatable so they can be called as a function. If you need to get the constructor function itself you can use <i>wx.CLASS_NAME.new(...)</i> ! which is the constructor exposed as a cfunction.</li> </ul> <li>Declared in the bindings using the <i>%class</i> ! tag</li> <li><b>Function calls</b> ! to the class member ! functions are made using the colon ':' convention and NOT the period '.'. This is because ':' in lua puts the object itself on the --- 509,573 ---- name are overloaded (as in C++) and the proper function to call ! is determined at runtime. </li> <li>Member functions from ! the base class(es) are also available and may be overloaded as well.</li> <li>The C++ classes are tables in lua, but have a __call ! metatable item so they can be called as a function. If you need to get ! the constructor function itself you can use <i>wx.CLASS_NAME.new(...)</i> ! which is the constructor exposed as a Cfunction.</li> </ul><li>The ! C++ classes are pushed into lua as a userdata with a special metatable ! that finds the function to call at runtime. This is done to </li> <li>Declared in the bindings using the <i>%class</i> ! tag</li><li><span style="font-weight: bold;">Deleting ! class userdata</span> can be done using the wxLua added class ! member delete() function.</li><ul><li>All classes ! that have the %delete binding tag will be eventually garbage collected ! when they go out of scope.</li><li>Classed without the ! %delete tag are assumed to be eventually attached to another object ! that will delete them for you.</li><li>The Lua garbage ! collector uses an incremental collector that waits until the data size ! reaches a limit and slowly removes them to avoid program slowdown. This ! is a good thing and makes lua programs run at an even pace.</li><li>However! ! Some graphical device interface (GDI) classes need to be deleted ! immediately when you are done with them.</li><ul><li>This ! is really a MS Windows problem, in Win95 based systems the number that ! you could create was severly limited, but even in NT systems (XP) you ! will have problems if you've created hundreds of them. One visible sign ! that something is wrong is when controls, like menus, stop redrawing ! themselves properly or completely and the program becomes sluggish.</li><li>In ! any case, just delete() them when done so that your program will work ! equally well in MSW as it would in Linux or OSX.</li></ul><li>Additionally, ! since the userdata that wxLua pushes into lua are C++ classes, ! lua only thinks they are of size void* pointers, 8 bytes, ! but the class might store a 1024x768 x 3 bytes/pixel ! image as a wxImage (2.36Mb). There have been a number of ! discussions about this on the lua mailing list, but currently there is ! no way to let lua know the true size of a userdata to help it better ! decide when and what to garbage collect. (Besides modifying the core of ! lua, which some people are against since wxLua can be loaded as a ! module.)</li><li>The solution is to use the delete() ! function on certain types of userdata when you are done.</li><li>This ! is a list of classes by order of importance of deleting them</li><ul><li style="font-weight: bold;">Must delete : wxDC, wxPaintDC any ! and ALL classed derived from a wxDC</li><li><span style="font-weight: bold;">Must delete if > 50 : ! wxBitmap, wxBrush, wxColour, wxCursor, wxFont, wxIcon, ! wxPen, wxRegion</span> </li><ul><li>To ! be sure, delete them when you're done and not worry.</li></ul><li>Must delete ! if large and you're creating many of them : wxImage, wxBitmap</li><li>Don't ! bother : wxPoint, wxRect... etc</li><li>Never delete : ! wxWindows attached their their parents, use Destroy(), wxMenuItems ! returned from a wxMenu.</li><ul><li>Safe rule, don't ! delete() things that aren't yours. Refer to the wxWidgets documentation ! about whether an object will take ownership of an object passed to ! it. </li></ul></ul><li>How to tell how ! many userdata objects you currenty have? </li><ul><li>Call ! the function wxlua.StackDialog() when you run you program using ! "wxlua.exe program.lua" or in wxLuaEdit.exe.</li><li>This ! function requires that wxLuaDebug C++ library to be compiled with it so ! it does not work with wxLuaFreeze.exe.</li></ul></ul> ! <li><b>Member functions</b> ! of the class are called using the colon ':' convention and NOT the ! period '.'. This is because ':' in lua puts the object itself on the *************** *** 539,552 **** returns none.</li> </ul><li>The Get/Set part of the function name is removed leaving only XXX and you ! do not use them like ! a function call using (), but rather like accessing a table member.</li> </ul> <ul> <li>Example : <i>"rect = ! wx.wxRect(wx.wxPoint(1,2), wx.wxSize(3,4)); rect.X = 10; print(rect.X)"</i></li> <li>Note : There is no way to find out from lua if the code used a '.' or a ':' to call the function and therefore properties cannot be made to work for the ':' calling convention since in that case we have to remove the object (the self) that lua automatically pushes ! onto the stack that we don't need or want.</li> <li>Note : Are properties really necessary? Confusing? Useful? --- 602,638 ---- returns none.</li> </ul><li>The Get/Set part of the function name is removed leaving only XXX and you ! do not call them like ! a function using "()", but rather like accessing a table ! member, without the "()".</li> </ul> <ul> <li>Example : <i>"rect = ! wx.wxRect(wx.wxPoint(1,2), wx.wxSize(3,4)); rect:SetX(20); rect.X = 10; ! print(rect.X, rect.X == rect:GetX(), rect.X == rect.GetX(rect))"</i> ! should print "10, true, true".</li> <li>Note : There is no way to find out from lua if the code used a '.' or a ':' to call the function and therefore properties cannot be made to work for the ':' calling convention since in that case we have to remove the object (the self) that lua automatically pushes ! onto the stack that we don't need or want.</li><li>Note : ! Since these methods are generated at runtime they will not work for ! static functions in the class table, but they will work for static ! functions called from a userdata object.</li><li>Below is a ! list of what works and doesn't, the example is for a static function, ! but the same works for a regular class member function.</li><ul><li>Works ! (static functions only) : <span style="font-style: italic;">"print(wx.wxFileName.GetCwd())"</span> ! and <span style="font-style: italic;">"print(wx.wxFileName.GetCwd)"</span> ! prints that it's a function.</li><li>Fails (static ! functions only) : <span style="font-style: italic;">"print(wx.wxFileName:GetCwd())"</span> ! and <span style="font-style: italic;">"print(wx.wxFileName:GetCwd)"</span></li><li>Works ! : <span style="font-style: italic;">"f = ! wx.wxFileName("a"); print(f.GetCwd())"</span> and <span style="font-style: italic;">"f = wx.wxFileName("a"); ! print(f.GetCwd)"</span> prints that it's a function.</li><li>Fails ! : <span style="font-style: italic;">"f = ! wx.wxFileName("a"); print(f:GetCwd())"</span> and <span style="font-style: italic;">"f = wx.wxFileName("a"); ! print(f:GetCwd)"</span></li><li>Works : <span style="font-style: italic;">"f = wx.wxFileName("a"); ! print(f.Cwd)"</span></li><li>Fails : <span style="font-style: italic;">"f = wx.wxFileName("a"); ! print(f.Cwd())"</span> and <span style="font-style: italic;">"f ! = wx.wxFileName("a"); print(f:Cwd)"</span> and <span style="font-style: italic;">"f = wx.wxFileName("a"); ! print(f:Cwd())"</span></li></ul> <li>Note : Are properties really necessary? Confusing? Useful? *************** *** 674,678 **** about adding it on the wxLua mailing list. The reason why they have not already been added is that there is a price to pay for do so in terms ! of binding size and speed.</li></ul><li><b>Extending classes</b> </li> <ul><li>You may add your --- 760,774 ---- about adding it on the wxLua mailing list. The reason why they have not already been added is that there is a price to pay for do so in terms ! of binding size and speed.</li></ul><li><span style="font-weight: bold;">Overriding ! member functions</span> with lua functions</li><ul><li>You ! may override class member functions for a wxLua userdata and still be ! able to call back to the Cfunction by prepending the function name with ! an underscore '_'.</li><li>The lua function that you assign ! to a userdata will be called directly from lua without regard to the ! existing Cfunction(s).</li><li>Example : <span style="font-style: italic;">"p = wx.wxPoint(1,2); p.GetX = ! function(self) return 10-self:_GetX() end; print(p:GetX(), p:_GetX())"</span> ! prints "9, 1".</li><li>Note : Make sure that if you want to ! call the base function you use the '_' since otherwise you'll get ! recursion. </li></ul><li><b>Extending classes</b> </li> <ul><li>You may add your *************** *** 749,753 **** <li>Lets you explore the C++ binding structs from within lua using a wxListCtrl. This is the raw data that is used to push the ! bindings into lua when a wxLuaState is created.</li> </ul> <li><b>calculator.wx.lua</b></li> <ul> <li>A simple calculator program the demonstrates loading and --- 845,850 ---- <li>Lets you explore the C++ binding structs from within lua using a wxListCtrl. This is the raw data that is used to push the ! bindings into lua when a wxLuaState is created.</li><li>Take ! note of </li> </ul> <li><b>calculator.wx.lua</b></li> <ul> <li>A simple calculator program the demonstrates loading and *************** *** 806,810 **** <ul> <li>A wxTreeCtrl demonstration.</li> </ul> <li><b>unittest.wx.lua</b></li> <ul> <li>Tests ! the binding generator for various things.</li> </ul> <li><b>validator.wx.lua</b></li> <ul> <li>Tests the wxGenericValidator and wxTextValidator.</li> </ul> <li><b>veryminimal.wx.lua</b></li> --- 903,909 ---- <ul> <li>A wxTreeCtrl demonstration.</li> </ul> <li><b>unittest.wx.lua</b></li> <ul> <li>Tests ! that the binding generator is working properly and so it wxLua itself.</li><li>This ! is also a good reference for how to call various objects since it tries ! to test all the valid methods.</li> </ul> <li><b>validator.wx.lua</b></li> <ul> <li>Tests the wxGenericValidator and wxTextValidator.</li> </ul> <li><b>veryminimal.wx.lua</b></li> *************** *** 1046,1050 **** directly as they will be overwritten if you regenerate the bindings, the fix should really go into the interface files themselves. </li> ! <li>To initialize this library in a C++ program you should have the code <i>"extern bool wxLuaBinding_wx_init();"</i> and then somewhere in your app initialization or at least before you --- 1145,1150 ---- directly as they will be overwritten if you regenerate the bindings, the fix should really go into the interface files themselves. </li> ! <li>To initialize this library in a C++ program to have it pushed ! into lua you should have the code <i>"extern bool wxLuaBinding_wx_init();"</i> and then somewhere in your app initialization or at least before you *************** *** 1059,1063 **** wxStyledTextCtrl editor contrib of wxWidgets that you must have compiled and also link to.</li> <li>To initialize this ! library in a C++ program you should have the code <i>"extern bool wxLuaBinding_wxstc_init();"</i> and then somewhere in your app initialization or at least before you --- 1159,1163 ---- wxStyledTextCtrl editor contrib of wxWidgets that you must have compiled and also link to.</li> <li>To initialize this ! library in a C++ program to have it pushed into lua you should have the code <i>"extern bool wxLuaBinding_wxstc_init();"</i> and then somewhere in your app initialization or at least before you *************** *** 1068,1072 **** this library.</li> <li>The public C++ side of wxLua is almost entirely contained ! in <i>modules/wxlua/include/wxlstate.h</i>.</li> </ul> <li><b>wxluadebug</b></li> <ul> <li>This is a simple debug library for lua that provides some --- 1168,1178 ---- this library.</li> <li>The public C++ side of wxLua is almost entirely contained ! in <i>modules/wxlua/include/wxlstate.h</i>.</li><li>To ! initialize this ! library in a C++ program to have it pushed into lua you should ! have the code <i>"extern bool wxLuaBinding_wxlua_init();"</i> ! and then somewhere in your app initialization or at least before you ! create a wxLuaState call <i>wxLuaBinding_wxlua_init()</i>.</li> ! </ul> <li><b>wxluadebug</b></li> <ul> <li>This is a simple debug library for lua that provides some *************** *** 1075,1079 **** communicate to another for debugging purposes. It is currently used in the wxlua app.</li> <li>This lib depends on the wxluadebug ! lib.</li> </ul> </ul><h2><a name="wxLua_Programming_in_C"></a><u>wxLua C++ Programming --- 1181,1190 ---- communicate to another for debugging purposes. It is currently used in the wxlua app.</li> <li>This lib depends on the wxluadebug ! lib.</li><li>To initialize this ! library in a C++ program to have it pushed into lua you should ! have the code <i>"extern bool wxLuaBinding_wxluasocket_init();"</i> ! and then somewhere in your app initialization or at least before you ! create a wxLuaState call <i>wxLuaBinding_wxluasocket_init()</i>.</li> ! </ul> </ul><h2><a name="wxLua_Programming_in_C"></a><u>wxLua C++ Programming Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** binding.html 12 Jun 2007 00:08:36 -0000 1.20 --- binding.html 14 Jun 2007 01:23:09 -0000 1.21 *************** *** 1,6 **** <!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 --- 1,6 ---- <!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 *************** *** 11,15 **** interface to a C/C++ API. The C/C++ objects are created in lua as userdata and ! manipulated using the same functional semantics as you would in C/C++. <br> <br>Binding files are provided for the <b>wxWidgets</b> cross --- 11,17 ---- interface to a C/C++ API. The C/C++ objects are created in lua as userdata and ! manipulated using the same functional semantics as you would in C/C++. ! The wxlua.html wxLua documentation describes in detail how the object ! will be named and where it will be placed in lua.<br> <br>Binding files are provided for the <b>wxWidgets</b> cross *************** *** 20,25 **** an example of this in the <i>apps/wxluacan/src</i> directory.<br> ! </div><br> ! <div style="text-align: justify;">The interface files are skeletons of the C/C++ header files that the program --- 22,27 ---- an example of this in the <i>apps/wxluacan/src</i> directory.<br> ! </div><br><div style="text-align: justify;">The ! interface files are skeletons of the C/C++ header files that the program *************** *** 54,59 **** Class Member Function Directives</a></li> <li><a href="#Comments_">Comments</a></li> <li><a href="#Interface_Tags">Interface Tags</a></li> </ol> ! </ol></div> ! <h2><a name="Binding_File_Descriptions"></a><u>Binding File Descriptions</u></h2> <h3>bindings/genwxbind.lua</h3> --- 56,60 ---- Class Member Function Directives</a></li> <li><a href="#Comments_">Comments</a></li> <li><a href="#Interface_Tags">Interface Tags</a></li> </ol> ! </ol></div><h2><a name="Binding_File_Descriptions"></a><u>Binding File Descriptions</u></h2> <h3>bindings/genwxbind.lua</h3> *************** *** 90,95 **** of wxLua's interface files follows the wxWidgets documentation, typically alphabetical.</li> <ul> <li style="text-align: justify;">Class constructors ! first, class member functions, %operators, %members, ! %properties.</li> </ul> </ul><h3>wxluasetup.h </h3> <ul> <li>Contains #defines of all of the wxLUA_USE_wxXXX --- 91,95 ---- of wxLua's interface files follows the wxWidgets documentation, typically alphabetical.</li> <ul> <li style="text-align: justify;">Class constructors ! first, class member functions, %operators, %members.</li> </ul> </ul><h3>wxluasetup.h </h3> <ul> <li>Contains #defines of all of the wxLUA_USE_wxXXX *************** *** 143,147 **** the %overridden function.</li> <ul> <li>// %override void wxFrame::SetStatusWidths(lua table with ! number indexes and values)</li> <li>//virtual void SetStatusWidths(int n, int *widths)</li> <li>virtual void SetStatusWidths(LuaTable intTable)</li> </ul> --- 143,148 ---- the %overridden function.</li> <ul> <li>// %override void wxFrame::SetStatusWidths(lua table with ! number indexes and values)</li> <li>// C++ Func: virtual ! void SetStatusWidths(int n, int *widths)</li> <li>virtual void SetStatusWidths(LuaTable intTable)</li> </ul> *************** *** 156,164 **** and exports the tags, structs, and functions for use in a DLL.</li> </ul> <li>The ! only function that absolutely must be called is <b>wxLuaBinding_[hook_cpp_binding_classname]_init()</b>. ! It is probably easiest to declare the function using <i>extern bool wxLuaBinding_[hook_cpp_binding_classname]_init();</i> in your ! file to rather than including the header.</li> <ul> <li>This function contains a static instance of the generated wxLuaBinding derived class that is put into a static wxList of --- 157,166 ---- and exports the tags, structs, and functions for use in a DLL.</li> </ul> <li>The ! only function that absolutely must be called is <b>wxLuaBinding_[hook_cpp_binding_classname]_init()</b>. </li><ul><li>It ! is probably easiest to declare the function using <i>extern bool wxLuaBinding_[hook_cpp_binding_classname]_init();</i> in your ! file to rather than including the header.</li></ul> <ul> ! <li>This function contains a static instance of the generated wxLuaBinding derived class that is put into a static wxList of *************** *** 311,317 **** <ul> <li>These parameters are interpreted by the generator to ! implement code to handle special cases.</li> <li><i><b>const wxArrayString& ! choices or wxArrayString choices</b></i></li> <ul> <li>The binding generator will read from lua either a wxArrayString or a a --- 313,320 ---- <ul> <li>These parameters are interpreted by the generator to ! implement code to handle a few special cases so we don't have to write ! overrides for them.</li> <li><b>const wxArrayString& ! choices or wxArrayString choices</b></li> <ul> <li>The binding generator will read from lua either a wxArrayString or a a *************** *** 319,329 **** them into a wxArrayString for the C++ ! function.</li> <li>If either <i><b>wxArrayString& ! choices</b></i> or <i><b>wxArrayString* choices</b></i> is used, the generator will not do the table conversion, but look for a wxArrayString userdata since it's assumed that the C++ function will ! modify the wxArrayString that's passed to it.</li> </ul> <li><i><b>const wxArrayInt& ! choices or wxArrayInt choices</b></i></li> <ul> <li>The binding generator will read from lua a --- 322,332 ---- them into a wxArrayString for the C++ ! function.</li> <li>If either <b>wxArrayString& ! choices</b> or <b>wxArrayString* choices</b> is used, the generator will not do the table conversion, but look for a wxArrayString userdata since it's assumed that the C++ function will ! modify the wxArrayString that's passed to it.</li> </ul> <li><b>const wxArrayInt& ! choices or wxArrayInt choices</b></li> <ul> <li>The binding generator will read from lua a *************** *** 332,341 **** them into a wxArrayInt for the C++ ! function.</li> <li>If either <i><b>wxArrayInt& ! choices</b></i> ! or <i><b>wxArrayInt* choices</b></i> is used, the generator will not do the table conversion, but look for a wxArrayInt userdata since it's assumed that the C++ function will ! modify the wxArrayInt that's passed to it.</li> </ul> <li style="font-weight: bold; font-style: italic;">IntArray_FromLuaTable</li> <ul> <li>The binding generator will read from lua a numerically indexed table of --- 335,344 ---- them into a wxArrayInt for the C++ ! function.</li> <li>If either <b>wxArrayInt& ! choices</b> ! or <b>wxArrayInt* choices</b> is used, the generator will not do the table conversion, but look for a wxArrayInt userdata since it's assumed that the C++ function will ! modify the wxArrayInt that's passed to it.</li> </ul> <li style="font-weight: bold;">IntArray_FromLuaTable</li> <ul> <li>The binding generator will read from lua a numerically indexed table of *************** *** 345,357 **** automatically deleted and the function should not take ownership of it and delete it itself.</li> ! </ul> <li><i><b>LuaTable ! tableName</b></i></li> <ul> <li>The "datatype" LuaTable does not actually exist, but is ! used exclusively for %overridden functions in the .i interface files. It directs the binding generator to expect a lua table for that ! parameter. Note that you absolutely must have overrriden this function as the generated code will not compile.</li> <li>This is useful for functions like ! wxFrame::SetStatusWidths as shown above.</li> </ul> </ul><h3><a name="C_Class_Member_Function_Directives"></a>C++ Class Member Function Directives</h3> --- 348,367 ---- automatically deleted and the function should not take ownership of it and delete it itself.</li> ! </ul> <li><b>LuaTable ! tableName</b></li> <ul> <li>The "datatype" LuaTable does not actually exist, but is ! used exclusively for %override functions in the .i interface files. It directs the binding generator to expect a lua table for that ! parameter. </li><li>Note : You absolutely must <span style="font-style: italic;">%overrride</span> this ! function as the generated code will not compile.</li> <li>This is useful for functions like ! wxFrame::SetStatusWidths as shown above.</li> </ul><li style="font-weight: bold;">LuaFunction functionName</li><ul><li>The ! "datatype" LuaFunction does not actually exist, but is ! used exclusively for %override functions in the .i interface files. ! It directs the binding generator to expect a lua function for that ! parameter. </li><li>Note : You absolutely must <span style="font-style: italic;">%overrride</span> this ! function ! as the generated code will not compile.</li></ul> </ul><h3><a name="C_Class_Member_Function_Directives"></a>C++ Class Member Function Directives</h3> *************** *** 361,391 **** files.</li> </ul> <li><b>static</b> </li> <ul> <li>For class member functions inside the <i>%class</i> ! tag, do not use for C style functions! </li> <li>The generated code will call ! ClassName::FunctionName and not use an object. </li> <li>wxLua ! requires that an instance of the class be created ! however.</li> <ul> <li>Example : In the %class wxFileName the function <i>"static wxFileName DirName(const wxString& ! dir)"</i></li> <li>wxLua code : <i>f = ! wx.wxFileName(); dir = f:DirName("/some/dir")</i></li> <li>or ! <i>wx.wxFileName.DirName("/some/dir"):GetFullPath()</i></li> </ul> <li>The bindings generate code to make the function ! accessible in the class table as well as when called using a object.<br> </li> </ul> <li><b><i>virtual</i></b></li> <ul> <li><i>Currently ignored - TODO perhaps<br> ! </i></li> </ul> ! </ul><h3><a name="Comments_"></a>Comments ! </h3> ! <ul> <li><b>//</b> as in C++ to ! comment out a whole or ! the rest of a line of text.</li> <li><b>/* ... */</b> ! to comment blocks.</li> </ul><h3><a name="Interface_Tags"></a>Interface Tags</h3> <b><i>%alias</i><br> </b>Reference a class by another name (currently unused). ! <br><br> ! <i><b>%class [%delete] [%noclassinfo] [%encapsulate] ClassName [, BaseClassName] <br> </b>ClassName(...)<br> --- 371,398 ---- files.</li> </ul> <li><b>static</b> </li> <ul> <li>For class member functions inside the <i>%class</i> ! tag, do not use for C style global functions! </li> <li>The generated code will call ! ClassName::FunctionName and not use an object. </li> <li>Example ! : In the %class wxFileName the function <i>"static wxFileName DirName(const wxString& ! dir)"</i></li><ul> <li>wxLua code : <span style="font-style: italic;">"dir = ! wx.wxFileName.DirExists("/some/dir")"</span> or <i>"f = ! wx.wxFileName(); dir = f.DirName("/some/dir")"</i></li> </ul> <li>The bindings generate code to make the function ! accessible in the class table (first example above) as well as when ! called using a object.<br> </li> </ul> <li><b><i>virtual</i></b></li> <ul> <li><i>Currently ignored - TODO perhaps<br> ! </i></li> </ul></ul><h3><a name="Comments_"></a>Comments ! </h3><ul> <li><b>//</b> as in C++ to ! comment out the rest of a line of text.</li> <li><b>/* ! ... */</b> ! to comment multiline blocks.</li> </ul><h3><a name="Interface_Tags"></a>Interface Tags</h3> <b><i>%alias</i><br> </b>Reference a class by another name (currently unused). ! <br><br><i><b>%class [%delete] [%noclassinfo] [%encapsulate] ClassName [, BaseClassName] <br> </b>ClassName(...)<br> *************** *** 400,419 **** you must use %class ... ns::ClassName and the constructor must also be ! ns::ClassName. </li> <li><i><b>%delete</b></i> is for classes that you want the lua garbage collector to ! delete when the variable goes out of scope. ! For example, a wxPoint should be deleted where there are no longer any references to it, but wxWindows are typically attached to a parent and the parent wxWindow should delete its children, ! not lua.</li> <li><i><b>%noclassinfo</b></i> ! is for ! classes that do not have DECLARE_XXX_CLASS in their declaration, e.g. wxPoint and any non wxObject ! derived classes.</li> <li> <i><b>%encapsulate</b></i> is for <b>all</b> classes --- 407,428 ---- you must use %class ... ns::ClassName and the constructor must also be ! ns::ClassName. The generator will change the "::" to "_" however for ! useage in lua. </li> <li><i><b>%delete</b></i> is for classes that you want the lua garbage collector to ! delete when the variable goes out of scope. </li><ul><li>For ! example, a wxPoint should be deleted where there are no longer any references to it, but wxWindows are typically attached to a parent and the parent wxWindow should delete its children, ! not lua.</li></ul> <li><i><b>%noclassinfo</b></i> ! is for all classes that do not have DECLARE_XXX_CLASS in their declaration, e.g. wxPoint and any non wxObject ! derived classes.</li><ul><li>You can use the ! samples/bindings.wx.lua program to test if the assigned classinfo is ! correct.</li></ul> <li> <i><b>%encapsulate</b></i> is for <b>all</b> classes *************** *** 421,425 **** wxObject derived to aid in deleting them. The macros wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION are used ! to wrap the object in a wxObject derived class.<br> </li> </ul><b><i>%define NUMBER [Value]</i><br> --- 430,435 ---- wxObject derived to aid in deleting them. The macros wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION are used ! to wrap the object in a wxObject derived class so that a single list of ! tracked objects can be maintained.<br> </li> </ul><b><i>%define NUMBER [Value]</i><br> *************** *** 444,448 **** be used inside of the %class tag for the wxEvent derived class it corresponds to so the event's methods can be ! known to lua and the generator can assign the correct data type to it. </li> <li>An example of this is in the wxCommandEvent interface in <i>bindings/wxwidgets/event.i</i>, <i>"%define --- 454,458 ---- be used inside of the %class tag for the wxEvent derived class it corresponds to so the event's methods can be ! known to lua and the generator can assign the correct class type to it. </li> <li>An example of this is in the wxCommandEvent interface in <i>bindings/wxwidgets/event.i</i>, <i>"%define *************** *** 455,465 **** so that the object's class methods can be known to lua and the generator ! can assign the correct data type to it.</li> <li>An example of this is in the wxPoint interface in <i>bindings/wxwidgets/gdi.i</i>, <i>"%define %object wxDefaultPosition"</i> where wxWidgets has created wxDefaultPosition as <i>"const wxPoint wxDefaultPosition;"</i>.<br> ! </li> ! </ul><i><b>%define_pointer POINTER</b></i><br> <ul> <li>Declares a pointer to an object in the binding table which --- 465,474 ---- so that the object's class methods can be known to lua and the generator ! can assign the correct class type to it.</li> <li>An example of this is in the wxPoint interface in <i>bindings/wxwidgets/gdi.i</i>, <i>"%define %object wxDefaultPosition"</i> where wxWidgets has created wxDefaultPosition as <i>"const wxPoint wxDefaultPosition;"</i>.<br> ! </li></ul><i><b>%define_pointer POINTER</b></i><br> <ul> <li>Declares a pointer to an object in the binding table which *************** *** 470,474 **** so that the pointer's methods can be known to lua and the ! generator can assign the correct data type to it.</li> <li>An example of this is in the wxPenList interface in <i>bindings/wxwidgets/gdi.i</i>, --- 479,483 ---- so that the pointer's methods can be known to lua and the ! generator can assign the correct class type to it.</li> <li>An example of this is in the wxPenList interface in <i>bindings/wxwidgets/gdi.i</i>, *************** *** 476,481 **** has created the wxThePenList as <i>"wxPenList* wxThePenList;"</i>.<br> ! </li> ! </ul><i><b>%define_string STRING [Value]</b></i><br> <ul> <li>Adds a string to the binding table which is accessed in wxLua using <i>wx.STRING</i>. </li> <li>The --- 485,489 ---- has created the wxThePenList as <i>"wxPenList* wxThePenList;"</i>.<br> ! </li></ul><i><b>%define_string STRING [Value]</b></i><br> <ul> <li>Adds a string to the binding table which is accessed in wxLua using <i>wx.STRING</i>. </li> <li>The *************** *** 488,496 **** optional parameter <i>[Value]</i> can be the actual string value to use and should be _("str"), ! wxT("str"), or a const wxChar* variable declared elsewhere.</li> <li>Note: Why not use wxString? You can't get the data from a wxString if you need to convert from Unicode ! and VC has problems having the class wxString as a member of a struct.<br> ! </li> </ul><i><b>%enum [Enum_Type] or [ClassName::Enum_Type]</b><br> ENUM_ITEM1<br> --- 496,506 ---- optional parameter <i>[Value]</i> can be the actual string value to use and should be _("str"), ! wxT("str"), or a const wxChar* variable declared elsewhere.</li> <li>Note ! : Why not use wxString? You can't get the data from a wxString if you need to convert from Unicode ! and VC has problems having the class wxString as a member of a struct.</li><li>Note ! : Why not use const char*? There currently isn't a need for it, but it ! would be easy to add if there was.</li> </ul><i><b>%enum [Enum_Type] or [ClassName::Enum_Type]</b><br> ENUM_ITEM1<br> *************** *** 537,547 **** be used inside of the <i>%class</i> tag. </li> <li>The generated ! functions will be named Get_m_x() and Set_m_x(int x) therefore it is recommended that you use <i>%rename</i> in conjunction with <i>%member</i>. </li> <li>For example, in wxPoint <i>"%rename X ! %member int m_x"</i> will generate wxPoint methods named GetX() and ! SetX(int x) for the wxPoint class.</li> </ul><i><b>%operator bool operator==(const wxPoint& --- 547,560 ---- be used inside of the <i>%class</i> tag. </li> <li>The generated ! functions in the example above will be named Get_m_x() and Set_m_x(int x) therefore it is recommended that you use <i>%rename</i> in conjunction with <i>%member</i>. </li> <li>For example, in wxPoint <i>"%rename X ! %member int x"</i> will generate wxPoint methods named <span style="font-style: italic;">"pt:GetX()"</span> and ! <span style="font-style: italic;">"pt:SetX(5)"</span> ! for the wxPoint class as well as properties to access them as if they ! were table members, <span style="font-style: italic;">print(pt:x)</span> ! and <span style="font-style: italic;">"pt:x = 5"</span>.</li> </ul><i><b>%operator bool operator==(const wxPoint& *************** *** 605,609 **** signatures to not generate code to overload it.</li> <li>This can be used when a class has two functions ! with the same name that have mutually exclusive #ifdef conditions.</li> </ul><i><b>%override wxLua_ClassName_FunctionName <br> </b>// any code or comments can go within the %override ... %end --- 618,624 ---- signatures to not generate code to overload it.</li> <li>This can be used when a class has two functions ! with the same name that have mutually exclusive #ifdef conditions.</li><li>This ! can happen when, for example, a function is "void DoStuff()" and then ! in a later version of the C++ library "bool DoStuff(int flag)".</li> </ul><i><b>%override wxLua_ClassName_FunctionName <br> </b>// any code or comments can go within the %override ... %end *************** *** 640,644 **** automatically generate names for the functions it binds, which is by default ! wxLua_ClassName_FunctionName. There are other special cases, please review the output of the generated bindings to determine what the default will be.</li> <li>However, if the function is --- 655,660 ---- automatically generate names for the functions it binds, which is by default ! wxLua_ClassName_FunctionName. </li><li>There are ! other special cases, please review the output of the generated bindings to determine what the default will be.</li> <li>However, if the function is *************** *** 689,694 **** %rename the int width, height function to GetClientSizeWH() </li> </ul> ! </ul> ! </ul><b><i>%skip</i><br> </b><ul> <li>The next item is skipped, either a single line or a --- 705,709 ---- %rename the int width, height function to GetClientSizeWH() </li> </ul> ! </ul></ul><b><i>%skip</i><br> </b><ul> <li>The next item is skipped, either a single line or a Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** changelog.txt 12 Jun 2007 00:08:36 -0000 1.35 --- changelog.txt 14 Jun 2007 01:23:09 -0000 1.36 *************** *** 90,93 **** --- 90,103 ---- was called "base_XXX" before there would have been a problem. + - Changed the Delete() function from the %delete tag for classes to just + delete() to avoid any future name clashes since delete() is never allowed + to be a function name in C++. + + - Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. + - Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and + added more functions for inspecting userdata and the bindings. + - Added the bit library from Reuben Thomas and put it into the bit table. + - Fix mismatches between the bindings base classes and what they really are. + version 2.8.0.0 (released 24/12/2006) -------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-14 01:23:45
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings/wxwidgets Modified Files: appframe.i config.i data.i datetime.i defsutil.i dialogs.i event.i gdi.i help.i html.i menutool.i override.hpp print.i socket.i windows.i wx_datatypes.lua wx_rules.lua wxlua.i xml.i Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: config.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/config.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** config.i 1 Jun 2007 18:19:46 -0000 1.21 --- config.i 14 Jun 2007 01:23:08 -0000 1.22 *************** *** 38,42 **** // No constructor since this is a base class ! // %override wxConfigBase::Delete() - this is a wxLua provided function to // delete the config (or derived class). Created wxConfigs are NOT tracked // in memory since you MUST call wxConfigBase::Set(NULL) before --- 38,42 ---- // No constructor since this is a base class ! // %override wxConfigBase::delete() - this is a wxLua provided function to // delete the config (or derived class). Created wxConfigs are NOT tracked // in memory since you MUST call wxConfigBase::Set(NULL) before *************** *** 44,48 **** // wxConfigBase::Set may need to exist outside of the scope it was created // in and we don't want lua to garbage collect it. ! void Delete() static wxConfigBase* Create() --- 44,48 ---- // wxConfigBase::Set may need to exist outside of the scope it was created // in and we don't want lua to garbage collect it. ! void delete() static wxConfigBase* Create() *************** *** 152,156 **** %class %noclassinfo %encapsulate %delete wxConfigPathChanger ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) --- 152,156 ---- %class %noclassinfo %encapsulate %delete wxConfigPathChanger ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** wx_datatypes.lua 13 Jun 2007 04:15:22 -0000 1.66 --- wx_datatypes.lua 14 Jun 2007 01:23:09 -0000 1.67 *************** *** 295,299 **** }, wxBestHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 295,299 ---- }, wxBestHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 997,1001 **** }, wxExtHelpController = { ! BaseClass = "wxHelpController", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 997,1001 ---- }, wxExtHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1165,1168 **** --- 1165,1169 ---- }, wxFontData = { + BaseClass = "wxObject", Condition = "wxUSE_FONTDLG && wxLUA_USE_wxFontDialog", DefType = "class", *************** *** 1531,1535 **** }, wxHelpController = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", --- 1532,1536 ---- }, wxHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", *************** *** 1537,1540 **** --- 1538,1548 ---- Name = "wxHelpController", }, + wxHelpControllerBase = { + BaseClass = "wxObject", + Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", + DefType = "class", + IsNumber = false, + Name = "wxHelpControllerBase", + }, wxHelpControllerHelpProvider = { BaseClass = "wxSimpleHelpProvider", *************** *** 1577,1580 **** --- 1585,1589 ---- }, wxHtmlCell = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1604,1608 **** }, wxHtmlHelpController = { ! BaseClass = "wxHelpController", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 1613,1617 ---- }, wxHtmlHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1624,1627 **** --- 1633,1637 ---- }, wxHtmlParser = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1637,1640 **** --- 1647,1651 ---- }, wxHtmlTag = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 2076,2095 **** Name = "wxLuaHtmlWindow", }, - wxLuaMethod_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaMethod_Type", - }, wxLuaObject = { - BaseClass = "wxObject", DefType = "class", IsNumber = false, Name = "wxLuaObject", }, - wxLuaObject_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaObject_Type", - }, wxLuaPrintout = { BaseClass = "wxPrintout", --- 2087,2095 ---- *************** *** 2099,2108 **** Name = "wxLuaPrintout", }, - wxLuaState = { - BaseClass = "wxObject", - DefType = "class", - IsNumber = false, - Name = "wxLuaState", - }, wxLuaTreeItemData = { BaseClass = "wxTreeItemData", --- 2099,2102 ---- *************** *** 2199,2203 **** }, wxMenuBar = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", --- 2193,2197 ---- }, wxMenuBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", *************** *** 2523,2527 **** }, wxPreviewCanvas = { ! BaseClass = "wxScrolledWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2517,2521 ---- }, wxPreviewCanvas = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 2530,2534 **** }, wxPreviewControlBar = { ! BaseClass = "wxPanel", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2524,2528 ---- }, wxPreviewControlBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 3005,3009 **** }, wxSplitterEvent = { ! BaseClass = "wxCommandEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", --- 2999,3003 ---- }, wxSplitterEvent = { ! BaseClass = "wxNotifyEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", *************** *** 3274,3278 **** }, wxTimer = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", --- 3268,3272 ---- }, wxTimer = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", *************** *** 3323,3326 **** --- 3317,3321 ---- }, wxToolBarToolBase = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxToolbar", DefType = "class", *************** *** 3517,3521 **** }, wxWinHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 3512,3516 ---- }, wxWinHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 3530,3534 **** }, wxWindowCreateEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3525,3529 ---- }, wxWindowCreateEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3543,3547 **** }, wxWindowDestroyEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3538,3542 ---- }, wxWindowDestroyEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3612,3615 **** --- 3607,3611 ---- }, wxXmlDocument = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** html.i 13 Jun 2007 04:15:22 -0000 1.21 --- html.i 14 Jun 2007 01:23:08 -0000 1.22 *************** *** 19,23 **** %define wxHTML_COND_USER ! %class wxHtmlCell wxHtmlCell() --- 19,23 ---- %define wxHTML_COND_USER ! %class wxHtmlCell, wxObject wxHtmlCell() *************** *** 84,88 **** %include "wx/html/htmltag.h" ! %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) --- 84,88 ---- %include "wx/html/htmltag.h" ! %class wxHtmlTag, wxObject //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) *************** *** 129,133 **** %define wxHTML_ALIGN_TOP ! %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) --- 129,133 ---- %define wxHTML_ALIGN_TOP ! %class wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) *************** *** 204,208 **** //%endenum ! %class wxHtmlParser //wxHtmlParser() --- 204,208 ---- //%endenum ! %class wxHtmlParser, wxObject //wxHtmlParser() Index: print.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/print.i,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** print.i 1 Jun 2007 18:19:46 -0000 1.17 --- print.i 14 Jun 2007 01:23:09 -0000 1.18 *************** *** 431,435 **** // wxPreviewCanvas ! %class %noclassinfo wxPreviewCanvas, wxScrolledWindow wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewCanvas") --- 431,435 ---- // wxPreviewCanvas ! %class wxPreviewCanvas, wxWindow wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewCanvas") *************** *** 456,460 **** %define wxID_PREVIEW_GOTO ! %class wxPreviewControlBar, wxPanel wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewControlBar") --- 456,460 ---- %define wxID_PREVIEW_GOTO ! %class wxPreviewControlBar, wxWindow wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewControlBar") *************** *** 469,473 **** %if wxLUA_USE_wxLuaPrintout ! %class %noclassinfo wxPrintPreview, wxObject wxPrintPreview(wxLuaPrintout* printout, wxLuaPrintout* printoutForPrinting, wxPrintData* data=NULL) --- 469,473 ---- %if wxLUA_USE_wxLuaPrintout ! %class wxPrintPreview, wxObject wxPrintPreview(wxLuaPrintout* printout, wxLuaPrintout* printoutForPrinting, wxPrintData* data=NULL) Index: help.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/help.i,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** help.i 13 Jun 2007 04:15:22 -0000 1.16 --- help.i 14 Jun 2007 01:23:08 -0000 1.17 *************** *** 83,87 **** //----------------------------------------------------------------------------- ! // wxHelpController and derived help controller classes %if wxLUA_USE_wxHelpController & wxUSE_HELP --- 83,87 ---- //----------------------------------------------------------------------------- ! // wxHelpControllerBase and derived help controller classes %if wxLUA_USE_wxHelpController & wxUSE_HELP *************** *** 96,103 **** %endenum ! // Note this is actually wxHelpControllerBase, wxWidgets #defines it appropriately ! %class %delete wxHelpController, wxObject ! wxHelpController() ! //%wxchkver_2_8 wxHelpController(wxWindow* parentWindow = NULL) wxHTMLHelpController takes different params virtual void Initialize(const wxString& file) --- 96,101 ---- %endenum ! %class %delete wxHelpControllerBase, wxObject ! //wxHelpControllerBase() - base class no constructor virtual void Initialize(const wxString& file) *************** *** 110,114 **** virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos) ! // %override [wxFrame*, wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL] wxHelpController::GetFrameParameters() // C++ Func: virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) virtual wxFrame* GetFrameParameters() --- 108,112 ---- virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos) ! // %override [wxFrame*, wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL] wxHelpControllerBase::GetFrameParameters() // C++ Func: virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) virtual wxFrame* GetFrameParameters() *************** *** 125,132 **** //----------------------------------------------------------------------------- // wxWinHelpController %if %msw ! %class %delete wxWinHelpController, wxHelpController %include "wx/helpwin.h" wxWinHelpController() --- 123,139 ---- //----------------------------------------------------------------------------- + // wxHelpController - wxWidgets #defines it appropriately per platform + + %class %delete wxHelpController, wxHelpControllerBase + wxHelpController() + //%wxchkver_2_8 wxHelpController(wxWindow* parentWindow = NULL) wxHTMLHelpController takes different params + + %endclass + + //----------------------------------------------------------------------------- // wxWinHelpController %if %msw ! %class %delete wxWinHelpController, wxHelpControllerBase %include "wx/helpwin.h" wxWinHelpController() *************** *** 137,141 **** // wxCHMHelpController ! //%class %delete wxCHMHelpController, wxHelpController //%include "wx/msw/helpchm.h" //wxCHMHelpController() --- 144,148 ---- // wxCHMHelpController ! //%class %delete wxCHMHelpController, wxHelpControllerBase //%include "wx/msw/helpchm.h" //wxCHMHelpController() *************** *** 146,150 **** %if %msw ! %class %noclassinfo wxBestHelpController, wxHelpController %endclass %endif //%msw --- 153,162 ---- %if %msw ! ! %include "wx/msw/helpbest.h" ! ! %class wxBestHelpController, wxHelpControllerBase ! wxBestHelpController(wxWindow* parentWindow = NULL, int style = wxHF_DEFAULT_STYLE) ! %endclass %endif //%msw *************** *** 154,158 **** %if !%win ! %class %delete wxExtHelpController, wxHelpController %include "wx/generic/helpext.h" wxExtHelpController() --- 166,170 ---- %if !%win ! %class %delete wxExtHelpController, wxHelpControllerBase %include "wx/generic/helpext.h" wxExtHelpController() *************** *** 239,243 **** %define wxHF_DEFAULT_STYLE ! %class %delete wxHtmlHelpController, wxHelpController wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE) --- 251,255 ---- %define wxHF_DEFAULT_STYLE ! %class %delete wxHtmlHelpController, wxHelpControllerBase wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE) *************** *** 247,251 **** void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpController void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) --- 259,263 ---- void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpControllerBase void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** windows.i 13 Jun 2007 04:15:22 -0000 1.39 --- windows.i 14 Jun 2007 01:23:09 -0000 1.40 *************** *** 17,21 **** %class %noclassinfo %encapsulate %delete wxWindowDisabler ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxWindowDisabler(wxWindow *winToSkip = NULL) %endclass --- 17,21 ---- %class %noclassinfo %encapsulate %delete wxWindowDisabler ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxWindowDisabler(wxWindow *winToSkip = NULL) %endclass *************** *** 892,896 **** // wxSplitterEvent ! %class %delete wxSplitterEvent, wxCommandEvent %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING // EVT_SPLITTER_SASH_POS_CHANGING(id, fn) %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED // EVT_SPLITTER_SASH_POS_CHANGED(id, fn) --- 892,896 ---- // wxSplitterEvent ! %class %delete wxSplitterEvent, wxNotifyEvent %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING // EVT_SPLITTER_SASH_POS_CHANGING(id, fn) %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED // EVT_SPLITTER_SASH_POS_CHANGED(id, fn) Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** gdi.i 13 Jun 2007 04:15:22 -0000 1.51 --- gdi.i 14 Jun 2007 01:23:08 -0000 1.52 *************** *** 1370,1374 **** %include "wx/dcclient.h" ! %class %delete wxPaintDC, wxWindowDC wxPaintDC(wxWindow* window) %endclass --- 1370,1374 ---- %include "wx/dcclient.h" ! %class %delete wxPaintDC, wxWindowDC // base ok as wxWindowDC since only some platforms have wxClientDC as base wxPaintDC(wxWindow* window) %endclass *************** *** 1420,1424 **** %define wxALWAYS_NATIVE_DOUBLE_BUFFER ! %class %delete wxAutoBufferedPaintDC, wxDC // ok to derive from wxDC only wxAutoBufferedPaintDC(wxWindow *window) %endclass --- 1420,1427 ---- %define wxALWAYS_NATIVE_DOUBLE_BUFFER ! // This class is derived from a wxPaintDC if wxALWAYS_NATIVE_DOUBLE_BUFFER else wxBufferedPaintDC ! // In fact in release mode it's only a #define to either ! ! %class %delete wxAutoBufferedPaintDC, wxDC // base ok as wxDC since no need for others wxAutoBufferedPaintDC(wxWindow *window) %endclass *************** *** 1493,1497 **** %class %noclassinfo %encapsulate %delete wxCaretSuspend ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) %endclass --- 1496,1500 ---- %class %noclassinfo %encapsulate %delete wxCaretSuspend ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) %endclass Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** override.hpp 12 Jun 2007 00:08:36 -0000 1.74 --- override.hpp 14 Jun 2007 01:23:08 -0000 1.75 *************** *** 322,328 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxConfigBase_Delete ! // void Destroy() ! static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L) { wxLuaState wxlState(L); --- 322,328 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxConfigBase_delete ! // void delete() ! static int LUACALL wxLua_wxConfigBase_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 2750,2756 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxHelpController_GetFrameParameters // virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) ! static int LUACALL wxLua_wxHelpController_GetFrameParameters(lua_State *L) { wxLuaState wxlState(L); --- 2750,2756 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxHelpControllerBase_GetFrameParameters // virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) ! static int LUACALL wxLua_wxHelpControllerBase_GetFrameParameters(lua_State *L) { wxLuaState wxlState(L); *************** *** 2761,2765 **** wxSize *size = new wxSize(); // get this ! wxHelpController *self = (wxHelpController *)wxlState.GetUserDataType(1, s_wxluatag_wxHelpController); // call GetFrameParameters returns = self->GetFrameParameters(size, pos, &newFrameEachTime); --- 2761,2765 ---- wxSize *size = new wxSize(); // get this ! wxHelpControllerBase *self = (wxHelpControllerBase *)wxlState.GetUserDataType(1, s_wxluatag_wxHelpControllerBase); // call GetFrameParameters returns = self->GetFrameParameters(size, pos, &newFrameEachTime); *************** *** 4345,4455 **** // ---------------------------------------------------------------------------- - %override wxLua_function_CompileLuaScript - // %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) - static int LUACALL wxLua_function_CompileLuaScript(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // const wxString fileName - const wxString fileName = wxlState.GetwxStringType(2); - // const wxString luaScript - const wxString luaScript = wxlState.GetwxStringType(1); - wxString errMsg; - int line_num = -1; - wxLuaState wxlState2(true); // create a brand new empty lua state to compile in - returns = wxlState2.CompileString(luaScript, fileName, &errMsg, &line_num); - // push the result number - lua_pushnumber(L, returns); - wxlState.lua_PushString(errMsg); - lua_pushnumber(L, line_num); - return 3; - } - %end - - %override wxLua_function_wxlua_typename - // %function wxString wxlua_getwxluatypename(int wxluaarg_tag) - static int LUACALL wxLua_function_wxlua_typename(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // int wxluaarg_tag - int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); - // call wxlua_getwxluatypename - returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); - // push the result string - wxlState.lua_PushString(returns); - - return 1; - } - %end - - %override wxLua_function_wxlua_type - // %function int wxlua_wxluatype(int wxluaarg_tag) - static int LUACALL wxLua_function_wxlua_type(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // int wxluaarg_tag - int wxluaarg_tag = wxlua_ttag(L, 1); - if (wxluaarg_tag == TLUA_NOTAG) - { - int ltype = lua_type(L, 1); - wxluaarg_tag = wxlua_getwxluatype(ltype); - } - - // push the result number - lua_pushnumber(L, wxluaarg_tag); - - return 1; - } - %end - - %override wxLua_wxLuaObject_constructor - // wxLuaObject(void *object) - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) - { - wxluabind_removetableforcall(L); - wxLuaState wxlState(L); - wxLuaObject *returns; - // call constructor - returns = new wxLuaObject(wxlState, 1); - // add to tracked memory list - wxlState.AddTrackedObject(returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); - // return the number of parameters - return 1; - } - %end - - %override wxLua_wxLuaObject_SetObject - // void SetObject(void *object) - static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call SetObject - self->SetObject(1); - // return the number of parameters - return 0; - } - %end - - %override wxLua_wxLuaObject_GetObject - // void *GetObject() const - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetObject that push the item onto the stack, or nil - if (self->GetObject()) - return 1; - - return 0; - } - %end - %override wxLua_wxLuaPrintout_constructor // wxLuaPrintout(const wxString& title = "Printout", wxLuaObject *pObject = NULL) --- 4345,4348 ---- Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** datetime.i 11 Jun 2007 03:57:58 -0000 1.28 --- datetime.i 14 Jun 2007 01:23:08 -0000 1.29 *************** *** 347,351 **** %define wxTIMER_ONE_SHOT ! %class wxTimer, wxObject wxTimer(wxEvtHandler *owner, int id = -1) --- 347,351 ---- %define wxTIMER_ONE_SHOT ! %class wxTimer, wxEvtHandler wxTimer(wxEvtHandler *owner, int id = -1) Index: socket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/socket.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** socket.i 13 Jun 2007 04:15:22 -0000 1.15 --- socket.i 14 Jun 2007 01:23:09 -0000 1.16 *************** *** 216,220 **** %endenum ! %class %noclassinfo wxProtocol, wxSocketClient //wxProtocol() virtual base class --- 216,220 ---- %endenum ! %class wxProtocol, wxSocketClient //wxProtocol() virtual base class *************** *** 237,241 **** %include "wx/protocol/http.h" ! %class %delete %noclassinfo wxHTTP, wxProtocol wxHTTP() --- 237,241 ---- %include "wx/protocol/http.h" ! %class %delete wxHTTP, wxProtocol wxHTTP() *************** *** 261,265 **** %endenum ! %class %delete %noclassinfo wxFTP, wxProtocol wxFTP() --- 261,265 ---- %endenum ! %class %delete wxFTP, wxProtocol wxFTP() Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxlua.i,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxlua.i 13 Jun 2007 00:08:57 -0000 1.25 --- wxlua.i 14 Jun 2007 01:23:09 -0000 1.26 *************** *** 1,4 **** // ============================================================================ ! // Purpose: wxLua specific wrappers // Author: J Winwood, John Labenski // Created: 14/11/2001 --- 1,4 ---- // ============================================================================ ! // Purpose: wxLua specific wrappers to enhance the wxWidgets bindings // Author: J Winwood, John Labenski // Created: 14/11/2001 *************** *** 8,210 **** // ============================================================================ ! // Compile the luaScript of the given name and return the lua error code, a message ! // and the line number (or -1) of the error. ! // %override [int return, lua_string err_msg, int line_number] CompileLuaScript(const wxString& luaScript, const wxString& fileName) ! %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) ! ! ! %enum wxLuaMethod_Type // The type of a Lua method ! WXLUAMETHOD_CONSTRUCTOR // constructor ! WXLUAMETHOD_METHOD // class member function ! WXLUAMETHOD_CFUNCTION // global C function (not part of a class) ! WXLUAMETHOD_GETPROP // Get %property funcName, read ! WXLUAMETHOD_SETPROP // Set %property funcName, write ! ! WXLUAMETHOD_STATIC // Class member function is static ! WXLUAMETHOD_OVERLOAD // This is an overload function that will call others ! // and the min/maxargs for it are not valid, ! // but are the min and max of all functions ! ! WXLUAMETHOD_DELETE // This is the delete function that wxLua has generated ! // to delete this class and is not part of the ! // original class. ! ! WXLUAMETHOD_OVERLOAD_BASE // Class method has been checked to see if it is ! // overloaded from the base class. ! // Check WXLUAMETHOD::basemethod and if !NULL ! // this method is an overload from the base class ! %endenum ! ! %define WXLUAARG_None ! %define WXLUAARG_Nil ! %define WXLUAARG_Boolean ! %define WXLUAARG_LightUserData ! %define WXLUAARG_Number ! %define WXLUAARG_String ! %define WXLUAARG_LuaTable ! %define WXLUAARG_LuaFunction ! %define WXLUAARG_UserData ! %define WXLUAARG_LuaThread ! %define WXLUAARG_Integer ! ! // Is this lua_type() (or in lua type()) considered ! %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! ! // %override wxString wxlua_typename(int wxluaarg_tag) ! // C++ Func: wxString wxlua_getwxluatypename(int wxluaarg_tag) ! // Returns the tag name for both the predefined (negative) as well as the ! // binding class tags. (C function only does predefined tags) ! %function wxString wxlua_typename(int wxluaarg_tag) ! ! ! // %override int wxlua_type(void* object) ! // Get the wxlua type (tag) of the object, this is the arg tags number ! %function int wxlua_type(void* object) ! ! //----------------------------------------------------------------------------- ! // wxLuaBinding - This is NOT wrapped, but implemented in wxlbind.cpp ! ! // These items follow the structure below and ALL items are called as if they ! // were table members. ! // Example : wxLuaBinding_wx.GetClassCount ! // Example : print(wxLuaBinding_wx.GetClassArray[1].methods[1].name) ! // Note: Use only '.' and NO () to make it a function call, also check to see ! // if the item exists first (unlike the example above)! ! ! /* ! ! %class wxLuaBinding_XXX - where XXX is the name of the binding ! // No constructor as this is read only ! ! wxString GetBindingName ! wxString GetLuaNamespace ! ! int GetClassCount ! int GetDefineCount ! int GetStringCount ! int GetEventCount ! int GetObjectCount ! int GetFunctionCount ! ! {wxLuaBindClass*} GetClassArray ! {wxLuaBindMethod*} GetFunctionArray ! {name, value} GetDefineArray ! {name, value} GetStringArray ! {name, eventType, class_tag} GetEventArray ! {name, object, class_tag} GetObjectArray ! ! %endclass ! ! %class wxLuaBindClass ! // No constructor as this is read only ! ! wxString name ! {wxLuaBindMethod*} methods ! int methods_n ! wxClassInfo* classInfo ! int class_tag ! wxString baseclassName ! wxLuaBindClass* baseclass ! {name, value} enums ! int enums_n ! ! %endclass ! ! %class wxLuaBindMethod ! // No constructor as this is read only ! ! wxString name ! int type ! {wxLuaBindCFunc*} funcs ! int funcs_n ! wxLuaBindMethod* basemethod ! ! wxLuaBindClass* class // class this is part of (not in struct) ! wxString class_name // class name this is part of (not in struct) ! ! %endclass ! ! %class wxLuaBindCFunc ! // No constructor as this is read only ! ! cfunction func ! int type ! int minargs ! int maxargs ! {int} argtags ! ! wxString class_name // added, not in struct ! ! %endclass ! ! */ ! ! ! //----------------------------------------------------------------------------- ! // wxLuaState ! ! %include "wxlua/include/wxlstate.h" ! ! %class %delete wxLuaState, wxObject ! /* ! wxLuaState(bool create = false) ! wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) ! ! bool Ok() const ! void Destroy() ! bool CloseLuaState(bool force) ! bool IsClosing() const ! wxEventType GetInEventType() const ! void SetEventHandler(wxEvtHandler *evtHandler) ! wxEvtHandler *GetEventHandler() const ! void SetId(wxWindowID id) ! wxWindowID GetId() const ! void SendEvent( wxLuaEvent &event ) const ! ! int RunFile(const wxString &fileName) ! int RunString(const wxString &script, const wxString& name = "") ! bool IsRunning() const ! ! wxString GetLuaTagName(int tag) const ! */ ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLuaObject - Allows Lua data items to be used for client data. ! ! %enum wxLuaObject_Type ! wxLUAOBJECT_NONE ! wxLUAOBJECT_BOOL ! wxLUAOBJECT_INT ! wxLUAOBJECT_STRING ! wxLUAOBJECT_ARRAYINT ! %endenum ! ! %class %delete wxLuaObject, wxObject ! // %override wxLuaObject(any value type) ! // C++ Func: wxLuaObject(const wxLuaState& wxlState, int stack_idx = 1) ! // Wrap the single value passed in with a wxLuaObject ! wxLuaObject() ! ! // %override void wxLuaObject::SetObject(any value type) ! // C++ Func: void SetObject(int stack_idx = 1) ! // Discard the old reference and create a new one for the item passed in ! void SetObject() ! ! // %override [any value type] wxLuaObject::GetObject() ! // C++ Func: bool GetObject() ! // get the object, note C++ returns bool, in lua it "returns" the referenced object ! void GetObject() const ! ! // These are not useful in lua ! //bool *GetBoolPtr(); ! //int *GetIntPtr(); ! //wxString *GetStringPtr(); ! //wxArrayInt *GetArrayPtr(); ! ! int GetAllocationFlags() const ! bool HasAllocationFlag(wxLuaObject_Type flag) ! //int SetAllocationFlag(wxLuaObject_Type flag, bool set) // NOT for use in lua ! %endclass //----------------------------------------------------------------------------- --- 8,12 ---- // ============================================================================ ! %include "wxlua/include/wxlua_bind.h" // for wxLuaObject tag //----------------------------------------------------------------------------- Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** menutool.i 13 Jun 2007 04:15:22 -0000 1.19 --- menutool.i 14 Jun 2007 01:23:08 -0000 1.20 *************** *** 81,85 **** // wxMenuBar ! %class wxMenuBar, wxEvtHandler wxMenuBar(long style = 0) // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) --- 81,85 ---- // wxMenuBar ! %class wxMenuBar, wxWindow wxMenuBar(long style = 0) // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) *************** *** 294,298 **** %endenum ! %class %noclassinfo wxToolBarToolBase // no constructors --- 294,298 ---- %endenum ! %class wxToolBarToolBase, wxObject // no constructors Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** defsutil.i 31 May 2007 21:38:39 -0000 1.42 --- defsutil.i 14 Jun 2007 01:23:08 -0000 1.43 *************** *** 610,614 **** %class %noclassinfo %encapsulate %delete wxBusyCursor ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) %endclass --- 610,614 ---- %class %noclassinfo %encapsulate %delete wxBusyCursor ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) %endclass *************** *** 617,624 **** // wxBusyCursorSuspender - we don't wrap this since lua's garbage collector doesn't // automatically collect items when they go out of scope so you would have to ! // Delete this anyway which is just as easy as //%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough // wxBusyCursorSuspender() --- 617,624 ---- // wxBusyCursorSuspender - we don't wrap this since lua's garbage collector doesn't // automatically collect items when they go out of scope so you would have to ! // delete() this anyway which is just as easy as wxBegin/EndBusyCursor //%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough // wxBusyCursorSuspender() *************** *** 635,639 **** %class %delete %noclassinfo wxBusyInfo, wxObject ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) %endclass --- 635,639 ---- %class %delete %noclassinfo wxBusyInfo, wxObject ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) %endclass Index: xml.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/xml.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xml.i 1 Jun 2007 18:19:46 -0000 1.11 --- xml.i 14 Jun 2007 01:23:09 -0000 1.12 *************** *** 84,88 **** // wxXmlDocument ! %class %delete %noclassinfo wxXmlDocument wxXmlDocument(); wxXmlDocument(const wxString& filename, const wxString& encoding = "UTF-8"); --- 84,88 ---- // wxXmlDocument ! %class %delete wxXmlDocument, wxObject wxXmlDocument(); wxXmlDocument(const wxString& filename, const wxString& encoding = "UTF-8"); Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** dialogs.i 13 Jun 2007 04:15:22 -0000 1.32 --- dialogs.i 14 Jun 2007 01:23:08 -0000 1.33 *************** *** 279,283 **** %wxchkver_2_8 %define wxDD_DIR_MUST_EXIST ! %class %noclassinfo wxDirDialog, wxDialog wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition) --- 279,283 ---- %wxchkver_2_8 %define wxDD_DIR_MUST_EXIST ! %class wxDirDialog, wxDialog wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition) *************** *** 386,390 **** %include "wx/cmndata.h" ! %class %delete %noclassinfo wxFontData wxFontData() wxFontData(const wxFontData& data) --- 386,390 ---- %include "wx/cmndata.h" ! %class %delete wxFontData, wxObject wxFontData() wxFontData(const wxFontData& data) Index: event.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/event.i,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** event.i 11 Jun 2007 03:57:59 -0000 1.24 --- event.i 14 Jun 2007 01:23:08 -0000 1.25 *************** *** 82,86 **** %class %delete %noclassinfo %encapsulate wxPropagationDisabler ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) --- 82,86 ---- %class %delete %noclassinfo %encapsulate wxPropagationDisabler ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) *************** *** 93,97 **** %class %noclassinfo %encapsulate %delete wxPropagateOnce ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) --- 93,97 ---- %class %noclassinfo %encapsulate %delete wxPropagateOnce ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) *************** *** 756,760 **** %include "wx/event.h" ! %class wxWindowCreateEvent, wxCommandEvent %define_event wxEVT_CREATE // EVT_WINDOW_CREATE(func) --- 756,760 ---- %include "wx/event.h" ! %class wxWindowCreateEvent, wxEvent %define_event wxEVT_CREATE // EVT_WINDOW_CREATE(func) *************** *** 769,773 **** %include "wx/event.h" ! %class wxWindowDestroyEvent, wxCommandEvent %define_event wxEVT_DESTROY // EVT_WINDOW_DESTROY(func) --- 769,773 ---- %include "wx/event.h" ! %class wxWindowDestroyEvent, wxEvent %define_event wxEVT_DESTROY // EVT_WINDOW_DESTROY(func) Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** data.i 13 Jun 2007 04:15:22 -0000 1.31 --- data.i 14 Jun 2007 01:23:08 -0000 1.32 *************** *** 169,173 **** %include "wx/valgen.h" ! %class %delete %noclassinfo wxGenericValidator, wxValidator // See the validator.wx.lua sample for usage of this class --- 169,173 ---- %include "wx/valgen.h" ! %class %delete wxGenericValidator, wxValidator // See the validator.wx.lua sample for usage of this class *************** *** 210,214 **** %endenum ! %class %noclassinfo wxList, wxObject wxList() --- 210,214 ---- %endenum ! %class wxList, wxObject wxList() Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** appframe.i 13 Jun 2007 04:15:22 -0000 1.37 --- appframe.i 14 Jun 2007 01:23:08 -0000 1.38 *************** *** 130,134 **** %class %noclassinfo %encapsulate %delete wxLogNull ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxLogNull() --- 130,134 ---- %class %noclassinfo %encapsulate %delete wxLogNull ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxLogNull() Index: wx_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_rules.lua,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wx_rules.lua 31 May 2007 17:18:47 -0000 1.27 --- wx_rules.lua 14 Jun 2007 01:23:09 -0000 1.28 *************** *** 288,292 **** ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --============================================================================= --- 288,292 ---- ------------------------------------------------------------------------------- -- Add additional data types here ! AllocDataType("wxLuaObject", "class", false) --============================================================================= |
From: John L. <jr...@us...> - 2007-06-14 01:23:44
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** wxbind.h 13 Jun 2007 00:08:57 -0000 1.71 --- wxbind.h 14 Jun 2007 01:23:10 -0000 1.72 *************** *** 43,49 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 12 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 12 // --------------------------------------------------------------------------- --- 43,49 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 13 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 13 // --------------------------------------------------------------------------- *************** *** 94,97 **** --- 94,98 ---- #if (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) #include "wx/helpwin.h" + #include "wx/msw/helpbest.h" #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) *************** *** 183,187 **** #include "wx/timer.h" #include "wx/utils.h" ! #include "wxlua/include/wxlstate.h" #if wxCHECK_VERSION(2,4,0) --- 184,188 ---- #include "wx/timer.h" #include "wx/utils.h" ! #include "wxlua/include/wxlua_bind.h" #if wxCHECK_VERSION(2,4,0) *************** *** 1000,1009 **** extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxKeyEvent_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxKeyEvent_methodCount; - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLuaObject; - extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxLuaObject_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxLuaObject_methodCount; - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLuaState; - extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxLuaState_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxLuaState_methodCount; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxMaximizeEvent; extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxMaximizeEvent_methods[]; --- 1001,1004 ---- *************** *** 1706,1709 **** --- 1701,1707 ---- extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxHelpController_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxHelpController_methodCount; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxHelpControllerBase; + extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxHelpControllerBase_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxHelpControllerBase_methodCount; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxHelpControllerHelpProvider; extern WXDLLIMPEXP_WXBIND wxLuaBindMethod wxHelpControllerHelpProvider_methods[]; |
From: John L. <jr...@us...> - 2007-06-14 01:23:43
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings Modified Files: Makefile genidocs.lua genwxbind.bat genwxbind.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 1 Jun 2007 18:19:46 -0000 1.2 --- Makefile 14 Jun 2007 01:23:07 -0000 1.3 *************** *** 16,20 **** endif ! all: wxwidgets wxstc wxluasocket wxluacan wxwidgets: --- 16,20 ---- endif ! all: wxwidgets wxstc wxlua wxluasocket wxluacan wxwidgets: *************** *** 27,30 **** --- 27,34 ---- @($(LUA) -e"rulesFilename=\"wxstc/wxstc_rules.lua\"" genwxbind.lua > wxstc/error.txt) + wxlua: + @echo Building wxLua + @($(LUA) -e"rulesFilename=\"wxlua/wxlua_rules.lua\"" genwxbind.lua > wxlua/error.txt) + wxluasocket: @echo Building wxLuaSocket Index: genwxbind.bat =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.bat,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** genwxbind.bat 4 Jan 2007 23:28:03 -0000 1.9 --- genwxbind.bat 14 Jun 2007 01:23:07 -0000 1.10 *************** *** 3,26 **** REM The C++ source files are only modified if any changes have been made. REM @echo on ! SET LUA=..\bin\wxlua-lua.exe ! REM Find a suitable wxlua-lua.exe to run ! IF EXIST ..\bin\gccud_lib\wxlua-lua.exe SET LUA=..\bin\gccud_lib\wxlua-lua.exe ! IF EXIST ..\bin\gccud_dll\wxlua-lua.exe SET LUA=..\bin\gccud_dll\wxlua-lua.exe ! IF EXIST ..\bin\gccu_lib\wxlua-lua.exe SET LUA=..\bin\gccu_lib\wxlua-lua.exe ! IF EXIST ..\bin\gccu_dll\wxlua-lua.exe SET LUA=..\bin\gccu_dll\wxlua-lua.exe ! IF EXIST ..\bin\gccd_lib\wxlua-lua.exe SET LUA=..\bin\gccd_lib\wxlua-lua.exe ! IF EXIST ..\bin\gccd_dll\wxlua-lua.exe SET LUA=..\bin\gccd_dll\wxlua-lua.exe ! IF EXIST ..\bin\gcc_lib\wxlua-lua.exe SET LUA=..\bin\gcc_lib\wxlua-lua.exe ! IF EXIST ..\bin\gcc_dll\wxlua-lua.exe SET LUA=..\bin\gcc_dll\wxlua-lua.exe ! IF EXIST ..\bin\vcud_lib\wxlua-lua.exe SET LUA=..\bin\vcud_lib\wxlua-lua.exe ! IF EXIST ..\bin\vcud_dll\wxlua-lua.exe SET LUA=..\bin\vcud_dll\wxlua-lua.exe ! IF EXIST ..\bin\vcu_lib\wxlua-lua.exe SET LUA=..\bin\vcu_lib\wxlua-lua.exe ! IF EXIST ..\bin\vcu_dll\wxlua-lua.exe SET LUA=..\bin\vcu_dll\wxlua-lua.exe ! IF EXIST ..\bin\vcd_lib\wxlua-lua.exe SET LUA=..\bin\vcd_lib\wxlua-lua.exe ! IF EXIST ..\bin\vcd_dll\wxlua-lua.exe SET LUA=..\bin\vcd_dll\wxlua-lua.exe ! IF EXIST ..\bin\vc_lib\wxlua-lua.exe SET LUA=..\bin\vc_lib\wxlua-lua.exe ! IF EXIST ..\bin\vc_dll\wxlua-lua.exe SET LUA=..\bin\vc_dll\wxlua-lua.exe echo Generating wxWidgets Binding --- 3,26 ---- REM The C++ source files are only modified if any changes have been made. REM @echo on ! SET LUA=..\bin\lua.exe ! REM Find a suitable lua.exe to run ! IF EXIST ..\bin\gccud_lib\lua.exe SET LUA=..\bin\gccud_lib\lua.exe ! IF EXIST ..\bin\gccud_dll\lua.exe SET LUA=..\bin\gccud_dll\lua.exe ! IF EXIST ..\bin\gccu_lib\lua.exe SET LUA=..\bin\gccu_lib\lua.exe ! IF EXIST ..\bin\gccu_dll\lua.exe SET LUA=..\bin\gccu_dll\lua.exe ! IF EXIST ..\bin\gccd_lib\lua.exe SET LUA=..\bin\gccd_lib\lua.exe ! IF EXIST ..\bin\gccd_dll\lua.exe SET LUA=..\bin\gccd_dll\lua.exe ! IF EXIST ..\bin\gcc_lib\lua.exe SET LUA=..\bin\gcc_lib\lua.exe ! IF EXIST ..\bin\gcc_dll\lua.exe SET LUA=..\bin\gcc_dll\lua.exe ! IF EXIST ..\bin\vcud_lib\lua.exe SET LUA=..\bin\vcud_lib\lua.exe ! IF EXIST ..\bin\vcud_dll\lua.exe SET LUA=..\bin\vcud_dll\lua.exe ! IF EXIST ..\bin\vcu_lib\lua.exe SET LUA=..\bin\vcu_lib\lua.exe ! IF EXIST ..\bin\vcu_dll\lua.exe SET LUA=..\bin\vcu_dll\lua.exe ! IF EXIST ..\bin\vcd_lib\lua.exe SET LUA=..\bin\vcd_lib\lua.exe ! IF EXIST ..\bin\vcd_dll\lua.exe SET LUA=..\bin\vcd_dll\lua.exe ! IF EXIST ..\bin\vc_lib\lua.exe SET LUA=..\bin\vc_lib\lua.exe ! IF EXIST ..\bin\vc_dll\lua.exe SET LUA=..\bin\vc_dll\lua.exe echo Generating wxWidgets Binding *************** *** 30,33 **** --- 30,36 ---- %LUA% -e"rulesFilename=\"wxstc/wxstc_rules.lua\"" genwxbind.lua > wxstc_error.txt + echo Generating wxLua Binding + %LUA% -e"rulesFilename=\"wxlua/wxlua_rules.lua\"" genwxbind.lua > wxlua_error.txt + echo Generating wxLuaDebugger Binding %LUA% -e"rulesFilename=\"wxluasocket/wxluasocket_rules.lua\"" genwxbind.lua > wxluasocket_error.txt Index: genidocs.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genidocs.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** genidocs.lua 19 Dec 2006 06:18:01 -0000 1.5 --- genidocs.lua 14 Jun 2007 01:23:07 -0000 1.6 *************** *** 14,47 **** preprocConditionTable = {} ! classColour = "AA0000" ! propColour = "000077" ! memberColour = "005577" ! renameColour = "CC0033" ! overrideColour = "CC3300" ! overloadColour = "CC3333" ! operatorColour = "550077" ! enumColour = "007700" ! defineColour = "007755" ! eventColour = "557700" function GenerateTestColours(fileTable) table.insert(fileTable, "<h2>Colours used to denote types</h2>") ! table.insert(fileTable, MakeColour("Enums - %enum", enumColour).."<br>") ! table.insert(fileTable, MakeColour("Defines - %define [%string] [%object] [%pointer]", defineColour).."<br>") ! table.insert(fileTable, MakeColour("Events - %define %event", eventColour).."<br>") ! table.insert(fileTable, MakeColour("Classes - %class", classColour).."<br>") ! table.insert(fileTable, MakeColour("Class Properties - %property", propColour).."<br>") ! table.insert(fileTable, MakeColour("Class Members - %member", memberColour).."<br>") ! table.insert(fileTable, MakeColour("Renamed Functions - %rename", renameColour).."<br>") ! table.insert(fileTable, MakeColour("Overridden Functions - %override", overrideColour).."<br>") ! table.insert(fileTable, MakeColour("Overloaded Functions - %overload", overloadColour).."<br>") ! table.insert(fileTable, MakeColour("Operator Functions - %operator", operatorColour).."<br>") end ! --<a name="papers">Papers</a> ! --<a href="#papers">papers</a> function MakeColour(name, color) -- color is "RRGGBB" in hex --- 14,62 ---- preprocConditionTable = {} ! colours = {} ! colours.class = "AA0000" ! colours.prop = "000077" ! colours.member = "005577" ! colours.rename = "CC0033" ! colours.override = "CC3300" ! colours.overload = "CC3333" ! colours.operator = "550077" ! ! colours.enum = "007700" ! colours.define = "007755" ! colours.event = "557700" ! ! ! -- ---------------------------------------------------------------------------- ! -- Dummy function that genwxbind.lua has and the XXX_rules.lua might use ! -- ---------------------------------------------------------------------------- ! ! function AllocDataType() end ! ! -- ---------------------------------------------------------------------------- ! -- For testing and choosing pleasing colors ! -- ---------------------------------------------------------------------------- function GenerateTestColours(fileTable) table.insert(fileTable, "<h2>Colours used to denote types</h2>") ! table.insert(fileTable, MakeColour("Enums - %enum", colours.enum).."<br>") ! table.insert(fileTable, MakeColour("Defines - %define [%string] [%object] [%pointer]", colours.define).."<br>") ! table.insert(fileTable, MakeColour("Events - %define %event", colours.event).."<br>") ! table.insert(fileTable, MakeColour("Classes - %class", colours.class).."<br>") ! table.insert(fileTable, MakeColour("Class Properties - %property", colours.prop).."<br>") ! table.insert(fileTable, MakeColour("Class Members - %member", colours.member).."<br>") ! table.insert(fileTable, MakeColour("Renamed Functions - %rename", colours.rename).."<br>") ! table.insert(fileTable, MakeColour("Overridden Functions - %override", colours.override).."<br>") ! table.insert(fileTable, MakeColour("Overloaded Functions - %overload", colours.overload).."<br>") ! table.insert(fileTable, MakeColour("Operator Functions - %operator", colours.operator).."<br><br>") end ! ! -- ---------------------------------------------------------------------------- ! -- Make simple HTML tag items ! -- ---------------------------------------------------------------------------- function MakeColour(name, color) -- color is "RRGGBB" in hex *************** *** 55,64 **** --- 70,85 ---- end function MakeLink(name) + --<a href="#papers">papers</a> return "<a href=\"#"..name.."\">"..name.."</a>" end function MakeTag(name) + --<a name="papers">Papers</a> return "<b><a name=\""..name.."\">"..name.."</a></b>" end + -- ---------------------------------------------------------------------------- + -- Make the HTML header + -- ---------------------------------------------------------------------------- + function GenerateHeader(fileTable) table.insert(fileTable, "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">") *************** *** 71,79 **** table.insert(fileTable, "<body>") ! table.insert(fileTable, "<h1>wxLua 2.8.0.0 Class Reference for wxWidgets 2.8.0</h1>") return fileTable end function GenerateFooter(fileTable) table.insert(fileTable, "</body>") --- 92,104 ---- table.insert(fileTable, "<body>") ! table.insert(fileTable, "<h1>wxLua 2.8.4.0 Class Reference for wxWidgets 2.8.4</h1>") return fileTable end + -- ---------------------------------------------------------------------------- + -- Make the HTML footer + -- ---------------------------------------------------------------------------- + function GenerateFooter(fileTable) table.insert(fileTable, "</body>") *************** *** 83,86 **** --- 108,115 ---- end + -- ---------------------------------------------------------------------------- + -- Make the Class reference HTML code + -- ---------------------------------------------------------------------------- + function GenerateClassReference(fileTable) local names = {} *************** *** 123,126 **** --- 152,159 ---- end + -- ---------------------------------------------------------------------------- + -- Make the Enum reference HTML code + -- ---------------------------------------------------------------------------- + function GenerateEnumReference(fileTable) local names = {} *************** *** 143,146 **** --- 176,183 ---- end + -- ---------------------------------------------------------------------------- + -- Helper functions + -- ---------------------------------------------------------------------------- + local nameChars = {} -- valid chars for C variables for function names for n = string.byte("a"), string.byte("z") do nameChars[n] = true end *************** *** 170,177 **** --- 207,238 ---- end + -- ---------------------------------------------------------------------------- + -- Read the .i files and convert them to HTML + -- ---------------------------------------------------------------------------- + + function InterfaceFileNameToTag(name) + local s = name + s = string.gsub(s, "%.%./wxstc/", "wxstc_") + s = string.gsub(s, "%.%./wxlua/", "wxlua_") + s = string.gsub(s, "%.%./wxluasocket/", "wxluasocket_") + if not string.find(s, "_", 1, 1) then s = "wxwidgets_"..s end + s = string.gsub(s, "%.", "_") + + return s + end + function ReadInterfaceFiles(fileTable) table.insert(fileTable, "<h2>Interface files</h2>") + local idx = 0 + while interface_fileTable[idx+1] do + idx = idx + 1 + local s = InterfaceFileNameToTag(interface_fileTable[idx]) + + table.insert(fileTable, MakeLink(s).."<br>") + + end + local strSp = string.byte(" ") *************** *** 180,184 **** idx = idx + 1 ! table.insert(fileTable, "<HR>\n<h2>"..interface_fileTable[idx].."</h2>") local filename = interface_filepath.."/"..interface_fileTable[idx] --- 241,246 ---- idx = idx + 1 ! table.insert(fileTable, "<br><HR>\n") ! table.insert(fileTable, "<h2>"..MakeTag(InterfaceFileNameToTag(interface_fileTable[idx])).."</h2>") local filename = interface_filepath.."/"..interface_fileTable[idx] *************** *** 208,218 **** out_line = "<font size=+1>"..string.sub(out_line, 1, start_pos-1)..MakeTag(cname)..string.sub(out_line, start_pos+string.len(cname)).."</font>" ! if class_pos then out_line = MakeColour(out_line, classColour) end ! if enum_pos then out_line = "<font color=#"..enumColour..">"..out_line end else -- priortize the colouring so we don't have to check for every single case if TagIsBefore(line, "%endclass", comment_pos) then ! out_line = MakeColour(out_line, classColour) end_block = true elseif TagIsBefore(line, "%endenum", comment_pos) then --- 270,280 ---- out_line = "<font size=+1>"..string.sub(out_line, 1, start_pos-1)..MakeTag(cname)..string.sub(out_line, start_pos+string.len(cname)).."</font>" ! if class_pos then out_line = MakeColour(out_line, colours.class) end ! if enum_pos then out_line = "<font color=#"..colours.enum..">"..out_line end else -- priortize the colouring so we don't have to check for every single case if TagIsBefore(line, "%endclass", comment_pos) then ! out_line = MakeColour(out_line, colours.class) end_block = true elseif TagIsBefore(line, "%endenum", comment_pos) then *************** *** 220,236 **** end_block = true elseif TagIsBefore(line, "%property", comment_pos) then ! out_line = MakeColour(out_line, propColour) elseif TagIsBefore(line, "%member", comment_pos) then ! out_line = MakeColour(out_line, memberColour) elseif TagIsBefore(line, "%overload", comment_pos) then ! out_line = MakeColour(out_line, overloadColour) elseif TagIsBefore(line, "%rename", comment_pos) then ! out_line = MakeColour(out_line, renameColour) elseif TagIsBefore(line, "%override", 1E6) then ! out_line = MakeColour(out_line, overrideColour) elseif TagIsBefore(line, "%event", comment_pos) then ! out_line = MakeColour(out_line, eventColour) elseif TagIsBefore(line, "%define", comment_pos) then ! out_line = MakeColour(out_line, defineColour) end end --- 282,298 ---- end_block = true elseif TagIsBefore(line, "%property", comment_pos) then ! out_line = MakeColour(out_line, colours.prop) elseif TagIsBefore(line, "%member", comment_pos) then ! out_line = MakeColour(out_line, colours.member) elseif TagIsBefore(line, "%overload", comment_pos) then ! out_line = MakeColour(out_line, colours.overload) elseif TagIsBefore(line, "%rename", comment_pos) then ! out_line = MakeColour(out_line, colours.rename) elseif TagIsBefore(line, "%override", 1E6) then ! out_line = MakeColour(out_line, colours.override) elseif TagIsBefore(line, "%event", comment_pos) then ! out_line = MakeColour(out_line, colours.event) elseif TagIsBefore(line, "%define", comment_pos) then ! out_line = MakeColour(out_line, colours.define) end end *************** *** 292,295 **** --- 354,361 ---- end + -- ---------------------------------------------------------------------------- + -- Load a file of the classes listed in the wxWidgets manual + -- ---------------------------------------------------------------------------- + function LoadwxClassRef() for line in io.lines(interface_filepath.."/".."wxclassref.txt") do *************** *** 300,303 **** --- 366,373 ---- end + -- ---------------------------------------------------------------------------- + -- main() + -- ---------------------------------------------------------------------------- + function main() -- load rules file *************** *** 313,318 **** end ! -- FIXME - hack to add wxSTC table.insert(interface_fileTable, "../wxstc/stc.i") local datatypes_file = loadfile(interface_filepath.."/"..datatypes_cache_output_filename) --- 383,390 ---- end ! -- FIXME - hack to add wxSTC and other bindings table.insert(interface_fileTable, "../wxstc/stc.i") + table.insert(interface_fileTable, "../wxlua/wxlua.i") + table.insert(interface_fileTable, "../wxluasocket/wxluasocket.i") local datatypes_file = loadfile(interface_filepath.."/"..datatypes_cache_output_filename) *************** *** 330,340 **** local cache = loadfile(filename) cache() -- run loaded file - --print("loaded datatypes cache file: "..filename) else ! --print("unable to load datatypes cache file: "..filename) end end end LoadwxClassRef() --- 402,412 ---- local cache = loadfile(filename) cache() -- run loaded file else ! assert(false, "unable to load datatypes cache file: "..filename) end end end + LoadwxClassRef() Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** genwxbind.lua 13 Jun 2007 04:15:21 -0000 1.121 --- genwxbind.lua 14 Jun 2007 01:23:07 -0000 1.122 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 12 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. --- 18,22 ---- -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 13 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. *************** *** 3716,3720 **** -- delete routine codeList = {} ! local funcName = "wxLua_"..MakeVar(parseObject.Name).."_Delete" table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") --- 3716,3720 ---- -- delete routine codeList = {} ! local funcName = "wxLua_"..MakeVar(parseObject.Name).."_delete" table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") table.insert(codeList, " wxLuaState wxlState(L);\n") *************** *** 3738,3742 **** local delMethodBinding = { ! LuaName = "Delete", CFunctionName = funcName, Method = codeList, --- 3738,3742 ---- local delMethodBinding = { ! LuaName = "delete", CFunctionName = funcName, Method = codeList, *************** *** 3748,3752 **** ParamCount = 1, RequiredParamCount = 1, ! Map = " { \"Delete\", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, "..funcMapName..", 1, NULL },\n", Condition = condition } --- 3748,3752 ---- ParamCount = 1, RequiredParamCount = 1, ! Map = " { \"delete\", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, "..funcMapName..", 1, NULL },\n", Condition = condition } |
From: John L. <jr...@us...> - 2007-06-14 01:23:42
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings/wxstc Modified Files: Makefile wxstc_datatypes.lua wxstc_rules.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxstc_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_rules.lua,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxstc_rules.lua 9 Jun 2006 03:24:49 -0000 1.18 --- wxstc_rules.lua 14 Jun 2007 01:23:08 -0000 1.19 *************** *** 11,15 **** -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) ! hook_lua_namespace = "wx" -- Set the C++ "namespace" that the bindings will be placed. --- 11,15 ---- -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) ! hook_lua_namespace = "wxstc" -- Set the C++ "namespace" that the bindings will be placed. *************** *** 134,138 **** ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --============================================================================= --- 134,138 ---- ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: AllocDataType("wxArrayInt", "class",false) --============================================================================= Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 31 May 2007 17:18:46 -0000 1.5 --- Makefile 14 Jun 2007 01:23:08 -0000 1.6 *************** *** 11,18 **** WXLUA_DIR = ../.. - include $(WXLUA_DIR)/bindings/wxwidgets/wrappers.lst - THEWRAPPERS=$(addprefix $(WXLUA_DIR)/bindings/wxwidgets/, $(WRAPPERS)) - #DEPFILES=$(WXLUA_DIR)/bindings/genwxbind.lua $(WXLUA_DIR)/bindings/wxstc/override.hpp # $(THEWRAPPERS) - all: genwxbind --- 11,14 ---- Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** wxstc_datatypes.lua 13 Jun 2007 04:15:21 -0000 1.56 --- wxstc_datatypes.lua 14 Jun 2007 01:23:08 -0000 1.57 *************** *** 295,299 **** }, wxBestHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 295,299 ---- }, wxBestHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 997,1001 **** }, wxExtHelpController = { ! BaseClass = "wxHelpController", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 997,1001 ---- }, wxExtHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1165,1168 **** --- 1165,1169 ---- }, wxFontData = { + BaseClass = "wxObject", Condition = "wxUSE_FONTDLG && wxLUA_USE_wxFontDialog", DefType = "class", *************** *** 1531,1535 **** }, wxHelpController = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", --- 1532,1536 ---- }, wxHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", *************** *** 1537,1540 **** --- 1538,1548 ---- Name = "wxHelpController", }, + wxHelpControllerBase = { + BaseClass = "wxObject", + Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", + DefType = "class", + IsNumber = false, + Name = "wxHelpControllerBase", + }, wxHelpControllerHelpProvider = { BaseClass = "wxSimpleHelpProvider", *************** *** 1577,1580 **** --- 1585,1589 ---- }, wxHtmlCell = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1604,1608 **** }, wxHtmlHelpController = { ! BaseClass = "wxHelpController", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 1613,1617 ---- }, wxHtmlHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1624,1627 **** --- 1633,1637 ---- }, wxHtmlParser = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1637,1640 **** --- 1647,1651 ---- }, wxHtmlTag = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 2076,2095 **** Name = "wxLuaHtmlWindow", }, - wxLuaMethod_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaMethod_Type", - }, wxLuaObject = { - BaseClass = "wxObject", DefType = "class", IsNumber = false, Name = "wxLuaObject", }, - wxLuaObject_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaObject_Type", - }, wxLuaPrintout = { BaseClass = "wxPrintout", --- 2087,2095 ---- *************** *** 2099,2108 **** Name = "wxLuaPrintout", }, - wxLuaState = { - BaseClass = "wxObject", - DefType = "class", - IsNumber = false, - Name = "wxLuaState", - }, wxLuaTreeItemData = { BaseClass = "wxTreeItemData", --- 2099,2102 ---- *************** *** 2199,2203 **** }, wxMenuBar = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", --- 2193,2197 ---- }, wxMenuBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", *************** *** 2523,2527 **** }, wxPreviewCanvas = { ! BaseClass = "wxScrolledWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2517,2521 ---- }, wxPreviewCanvas = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 2530,2534 **** }, wxPreviewControlBar = { ! BaseClass = "wxPanel", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2524,2528 ---- }, wxPreviewControlBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 3005,3009 **** }, wxSplitterEvent = { ! BaseClass = "wxCommandEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", --- 2999,3003 ---- }, wxSplitterEvent = { ! BaseClass = "wxNotifyEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", *************** *** 3285,3289 **** }, wxTimer = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", --- 3279,3283 ---- }, wxTimer = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", *************** *** 3334,3337 **** --- 3328,3332 ---- }, wxToolBarToolBase = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxToolbar", DefType = "class", *************** *** 3528,3532 **** }, wxWinHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 3523,3527 ---- }, wxWinHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 3541,3545 **** }, wxWindowCreateEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3536,3540 ---- }, wxWindowCreateEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3554,3558 **** }, wxWindowDestroyEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3549,3553 ---- }, wxWindowDestroyEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3623,3626 **** --- 3618,3622 ---- }, wxXmlDocument = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", |
From: John L. <jr...@us...> - 2007-06-14 01:23:42
|
Update of /cvsroot/wxlua/wxLua/apps/wxluafreeze/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/apps/wxluafreeze/src Modified Files: wxluafreeze.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxluafreeze.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluafreeze/src/wxluafreeze.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluafreeze.cpp 27 Feb 2007 20:52:37 -0000 1.8 --- wxluafreeze.cpp 14 Jun 2007 01:23:06 -0000 1.9 *************** *** 35,38 **** --- 35,39 ---- // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. + extern bool wxLuaBinding_wxlua_init(); extern bool wxLuaBinding_wx_init(); //extern bool wxLuaBinding_wxstc_init(); *************** *** 102,105 **** --- 103,107 ---- // Initialize wxLua by first attaching the bindings we want to use // note: make sure you link to the binding libraries + wxLuaBinding_wxlua_init(); wxLuaBinding_wx_init(); //wxLuaBinding_wxstc_init(); |
From: John L. <jr...@us...> - 2007-06-14 01:23:42
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxluaedit.cpp 31 May 2007 17:18:45 -0000 1.32 --- wxluaedit.cpp 14 Jun 2007 01:23:06 -0000 1.33 *************** *** 41,44 **** --- 41,45 ---- // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. + extern bool wxLuaBinding_wxlua_init(); extern bool wxLuaBinding_wx_init(); extern bool wxLuaBinding_wxstc_init(); *************** *** 170,173 **** --- 171,175 ---- // Initialize wxLua by first attaching the bindings we want to use // note: make sure you link to the binding libraries + wxLuaBinding_wxlua_init(); wxLuaBinding_wx_init(); wxLuaBinding_wxstc_init(); |
From: John L. <jr...@us...> - 2007-06-14 01:23:41
|
Update of /cvsroot/wxlua/wxLua/bindings/wxluasocket In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings/wxluasocket Modified Files: Makefile override.hpp wxluasocket.i wxluasocket_rules.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 31 May 2007 17:18:45 -0000 1.3 --- Makefile 14 Jun 2007 01:23:07 -0000 1.4 *************** *** 11,18 **** WXLUA_DIR = ../.. - include $(WXLUA_DIR)/bindings/wxwidgets/wrappers.lst - THEWRAPPERS=$(addprefix $(WXLUA_DIR)/bindings/wxwidgets/, $(WRAPPERS)) - #DEPFILES=$(WXLUA_DIR)/bindings/genwxbind.lua $(WXLUA_DIR)/bindings/wxluasocket/override.hpp # $(THEWRAPPERS) - all: genwxbind --- 11,14 ---- Index: wxluasocket_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/wxluasocket_rules.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxluasocket_rules.lua 9 Jun 2006 03:24:49 -0000 1.4 --- wxluasocket_rules.lua 14 Jun 2007 01:23:07 -0000 1.5 *************** *** 11,15 **** -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) ! hook_lua_namespace = "wx" -- Set the C++ "namespace" that the bindings will be placed. --- 11,15 ---- -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) ! hook_lua_namespace = "wxlua" -- Set the C++ "namespace" that the bindings will be placed. *************** *** 135,139 **** ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --============================================================================= --- 135,139 ---- ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: AllocDataType("wxArrayInt", "class",false) --============================================================================= Index: wxluasocket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/wxluasocket.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxluasocket.i 11 Jun 2007 03:57:58 -0000 1.11 --- wxluasocket.i 14 Jun 2007 01:23:07 -0000 1.12 *************** *** 14,17 **** --- 14,24 ---- %include "wxlua/include/wxlbind.h" + + // Show a dialog of the current stack and all of the global data in a wxListCtrl + // This also shows information about the number and kind of userdata items that + // wxLua is tracking and will delete. + // %override void StackDialog() + %function void LuaStackDialog() + //----------------------------------------------------------------------------- // wxLuaDebugServer Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/override.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** override.hpp 28 Sep 2006 22:26:02 -0000 1.4 --- override.hpp 14 Jun 2007 01:23:07 -0000 1.5 *************** *** 0 **** --- 1,23 ---- + // ---------------------------------------------------------------------------- + // Overridden functions for the wxLuaSocket binding for wxLua + // + // Please keep these functions in the same order as the .i file and in the + // same order as the listing of the functions in that file. + // ---------------------------------------------------------------------------- + + // ---------------------------------------------------------------------------- + // Overrides for wxluasocket.i + // ---------------------------------------------------------------------------- + + %override wxLua_function_LuaStackDialog + // %function void LuaStackDialog() + static int LUACALL wxLua_function_LuaStackDialog(lua_State *L) + { + // call StackDialog + + wxLuaStackDialog stackDialog(wxLuaState(L), NULL); + stackDialog.ShowModal(); + + return 0; + } + %end |
From: John L. <jr...@us...> - 2007-06-14 01:23:40
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/apps/wxluacan/src Modified Files: cansim.cpp wxluacan.h wxluacan_rules.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: cansim.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/cansim.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** cansim.cpp 17 Dec 2006 10:47:07 -0000 1.11 --- cansim.cpp 14 Jun 2007 01:23:06 -0000 1.12 *************** *** 29,32 **** --- 29,33 ---- // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. + extern bool wxLuaBinding_wxlua_init(); extern bool wxLuaBinding_wx_init(); extern bool wxLuaBinding_wxluacan_init(); *************** *** 292,295 **** --- 293,297 ---- // Initialize wxLua by first attaching the bindings we want to use // note: make sure you link to the binding libraries + wxLuaBinding_wxlua_init(); wxLuaBinding_wx_init(); wxLuaBinding_wxluacan_init(); Index: wxluacan.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** wxluacan.h 13 Jun 2007 00:08:57 -0000 1.29 --- wxluacan.h 14 Jun 2007 01:23:06 -0000 1.30 *************** *** 18,24 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 12 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 12 // --------------------------------------------------------------------------- --- 18,24 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 13 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 13 // --------------------------------------------------------------------------- Index: wxluacan_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_rules.lua,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxluacan_rules.lua 9 Jun 2006 03:24:48 -0000 1.12 --- wxluacan_rules.lua 14 Jun 2007 01:23:06 -0000 1.13 *************** *** 129,133 **** ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --============================================================================= --- 129,133 ---- ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: AllocDataType("wxArrayInt", "class",false) --============================================================================= |
From: John L. <jr...@us...> - 2007-06-14 01:23:39
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/apps/wxlua/src Modified Files: wxlua.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wxlua.cpp 31 May 2007 17:18:45 -0000 1.46 --- wxlua.cpp 14 Jun 2007 01:23:06 -0000 1.47 *************** *** 44,47 **** --- 44,48 ---- // Declare the binding initialization functions as extern so we don't have to // #include the binding header for simplicity. + extern bool wxLuaBinding_wxlua_init(); // modules/wxlua extern bool wxLuaBinding_wx_init(); // modules/wxbind extern bool wxLuaBinding_wxstc_init(); // modules/wxstcbind *************** *** 143,146 **** --- 144,148 ---- // Initialize wxLua by first attaching the bindings we want to use // note: make sure you link to the binding libraries + wxLuaBinding_wxlua_init(); wxLuaBinding_wx_init(); wxLuaBinding_wxstc_init(); |
From: John L. <jr...@us...> - 2007-06-14 01:23:25
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/samples Modified Files: bindings.wx.lua calculator.wx.lua debug.wx.lua editor.wx.lua fldemo.wx.lua mdi.wx.lua minimal.wx.lua printing.wx.lua scribble.wx.lua validator.wx.lua wxluasudoku.wx.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: debug.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/debug.wx.lua,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** debug.wx.lua 12 Jun 2007 00:08:42 -0000 1.12 --- debug.wx.lua 14 Jun 2007 01:23:20 -0000 1.13 *************** *** 110,114 **** end ! dc:Delete() -- ALWAYS Delete() any wxDCs created when done end --- 110,114 ---- end ! dc:delete() -- ALWAYS delete() any wxDCs created when done end *************** *** 411,416 **** running = nil bitmapDC:SelectObject(wx.wxNullBitmap) ! bitmapDC:Delete() -- ALWAYS Delete() any wxDCs created when done ! bitmap:Delete() local x, y, w, h --- 411,416 ---- running = nil bitmapDC:SelectObject(wx.wxNullBitmap) ! bitmapDC:delete() -- ALWAYS delete() any wxDCs created when done ! bitmap:delete() local x, y, w, h Index: mdi.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/mdi.wx.lua,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mdi.wx.lua 31 May 2007 17:18:56 -0000 1.12 --- mdi.wx.lua 14 Jun 2007 01:23:20 -0000 1.13 *************** *** 28,32 **** dc:DrawEllipse(30, 30, 260, 260); dc:DrawText("A test string for window Id "..tostring(win:GetId()), 50, 150); ! dc:Delete() -- ALWAYS Delete() any wxDCs created when done end child:Connect(wx.wxEVT_PAINT, OnPaint) --- 28,32 ---- dc:DrawEllipse(30, 30, 260, 260); dc:DrawText("A test string for window Id "..tostring(win:GetId()), 50, 150); ! dc:delete() -- ALWAYS delete() any wxDCs created when done end child:Connect(wx.wxEVT_PAINT, OnPaint) Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bindings.wx.lua 13 Jun 2007 04:15:29 -0000 1.6 --- bindings.wx.lua 14 Jun 2007 01:23:20 -0000 1.7 *************** *** 116,121 **** frame = nil listCtrl = nil ! ID_LISTCTRL = 1000 -- id of the listctrl ID_VIEW_BASECLASS_FUNCTIONS = 1001 img_normal = 0 -- a "file" image in the listctrl img_folder = 1 -- a "folder" image in the listctrl --- 116,124 ---- frame = nil listCtrl = nil ! ! ID_LISTCTRL = 1000 -- id of the listctrl ID_VIEW_BASECLASS_FUNCTIONS = 1001 + ID_STACK_DIALOG = 1002 + img_normal = 0 -- a "file" image in the listctrl img_folder = 1 -- a "folder" image in the listctrl *************** *** 137,150 **** bindingList = {} -- Table of {"name space", "wxLuaBinding_XXX function"} -- ---------------------------------------------------------------------------- ! -- Find the bindings installed into wxLua -- ---------------------------------------------------------------------------- ! for k, v in pairs(wx) do ! if string.find(k, "wxLuaBinding_", 1, 1) then ! table.insert(bindingList, {"wx", k}) end end -- ---------------------------------------------------------------------------- --- 140,229 ---- bindingList = {} -- Table of {"name space", "wxLuaBinding_XXX function"} + wxclassInfo = {} -- Table of all wxWidget wxClassInfo + -- ---------------------------------------------------------------------------- ! -- Load all the wxWidgets wxClassInfo -- ---------------------------------------------------------------------------- + function CreatewxClassInfoTable() ! -- create a table of tables of cols of the classname and baseclass names ! -- if there is a baseclass2 then the returned table will have > 1 tables ! local function GetBases(ci) ! local c = ci ! local t = {{}} ! ! while c do ! table.insert(t[1], c:GetClassName()) ! ! if c:GetBaseClass2() then ! --print(c:GetClassName(), "Has Base2", c:GetBaseClass2()) ! ! local t2 = GetBases(c:GetBaseClass2()) ! for i = 1, #t2 do ! -- insert back in the original info ! for j = 1, #t do ! table.insert(t2[i], j, t[1][j]) ! end ! t2[i][1] = t2[i][1].." "..tostring(i) ! table.insert(t, t2[i]) ! end ! end ! ! c = c:GetBaseClass1() ! end ! ! return t end + + local t = { + {"..", ["icon"] = img_folder}, + ["col_labels"] = {"wxClassInfo::GetClassName()"}, + ["object_type"] = "All Classes" + } + + local ci = wx.wxClassInfo.GetFirst() + local max_cols = 0 + + while ci do + local tc = GetBases(ci) + for i = 1, #tc do + if max_cols < #tc[i] then max_cols = #tc[i] end + table.insert(t, tc[i]) + end + + ci = ci:GetNext() + end + + for i = 1, #t do + for j = #t[i], max_cols do + table.insert(t[i], "") + end + end + + for i = 2, max_cols do + table.insert(t.col_labels, "Base Class "..tostring(i-1)) + end + + table.sort(t, function(t1, t2) return t1[1] < t2[1] end) + + return t end + wxclassInfo = CreatewxClassInfoTable() + + -- ---------------------------------------------------------------------------- + -- Find the bindings installed into wxLua + -- ---------------------------------------------------------------------------- + wxlua_tables = { "wxlua", "wx", "wxstc" } + + for i = 1, #wxlua_tables do + if _G[wxlua_tables[i]] then + for k, v in pairs(_G[wxlua_tables[i]]) do + if string.find(k, "wxLuaBinding_", 1, 1) then + table.insert(bindingList, {wxlua_tables[i], k}) + end + end + end + end -- ---------------------------------------------------------------------------- *************** *** 290,307 **** -- subtract values from high to low value ! t = HasBit(t, wx.WXLUAMETHOD_OVERLOAD_BASE, nil, nil) -- nobody should care about this ! t = HasBit(t, wx.WXLUAMETHOD_DELETE, s, "Delete") ! t = HasBit(t, wx.WXLUAMETHOD_OVERLOAD, s, "Overload") ! t = HasBit(t, wx.WXLUAMETHOD_STATIC, s, "Static") ! t = HasBit(t, wx.WXLUAMETHOD_SETPROP, s, "SetProp") ! t = HasBit(t, wx.WXLUAMETHOD_GETPROP, s, "GetProp") ! t = HasBit(t, wx.WXLUAMETHOD_CFUNCTION, s, "CFunc") ! t = HasBit(t, wx.WXLUAMETHOD_METHOD, s, "Method") ! t = HasBit(t, wx.WXLUAMETHOD_CONSTRUCTOR, s, "Constructor") assert(t == 0, "The wxLuaMethod_Type is not handled correctly, remainder "..tostring(t).." of "..tostring(t_)) -- remove this, nobody should care and it'll probably be confusing ! t = HasBit(t_, wx.WXLUAMETHOD_OVERLOAD_BASE, nil, nil) return string.format("0x%04X (%s)", t, table.concat(s, ", ")) --- 369,386 ---- -- subtract values from high to low value ! t = HasBit(t, wxlua.WXLUAMETHOD_OVERLOAD_BASE, nil, nil) -- nobody should care about this ! t = HasBit(t, wxlua.WXLUAMETHOD_DELETE, s, "Delete") ! t = HasBit(t, wxlua.WXLUAMETHOD_OVERLOAD, s, "Overload") ! t = HasBit(t, wxlua.WXLUAMETHOD_STATIC, s, "Static") ! t = HasBit(t, wxlua.WXLUAMETHOD_SETPROP, s, "SetProp") ! t = HasBit(t, wxlua.WXLUAMETHOD_GETPROP, s, "GetProp") ! t = HasBit(t, wxlua.WXLUAMETHOD_CFUNCTION, s, "CFunc") ! t = HasBit(t, wxlua.WXLUAMETHOD_METHOD, s, "Method") ! t = HasBit(t, wxlua.WXLUAMETHOD_CONSTRUCTOR, s, "Constructor") assert(t == 0, "The wxLuaMethod_Type is not handled correctly, remainder "..tostring(t).." of "..tostring(t_)) -- remove this, nobody should care and it'll probably be confusing ! t = HasBit(t_, wxlua.WXLUAMETHOD_OVERLOAD_BASE, nil, nil) return string.format("0x%04X (%s)", t, table.concat(s, ", ")) *************** *** 311,320 **** -- Convert the argtags table into a readable string -- ---------------------------------------------------------------------------- - function CreateArgTagsString(args_table) local arg_names = {} for j = 1, #args_table do ! table.insert(arg_names, wx.wxlua_typename(args_table[j])) end --- 390,398 ---- -- Convert the argtags table into a readable string -- ---------------------------------------------------------------------------- function CreateArgTagsString(args_table) local arg_names = {} for j = 1, #args_table do ! table.insert(arg_names, wxlua.wxlua_typename(args_table[j])) end *************** *** 323,327 **** -- ---------------------------------------------------------------------------- ! -- Create tables from the different binding structs type -- ---------------------------------------------------------------------------- function CreatewxLuaBindClass(tbl) --- 401,405 ---- -- ---------------------------------------------------------------------------- ! -- Create a list table from a wxLuaBindClass struct table -- ---------------------------------------------------------------------------- function CreatewxLuaBindClass(tbl) *************** *** 360,363 **** --- 438,445 ---- return t end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindMethod struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindMethod(tbl, classname) local keys = { "name", "type", "funcs", "funcs_n", "basemethod" } *************** *** 404,407 **** --- 486,493 ---- return t end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindDefine struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindDefine(tbl) local keys = { "name", "value" } *************** *** 420,427 **** --- 506,521 ---- return t end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindString struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindString(tbl) local keys = { "name", "value" } return CreatewxLuaBindTable(tbl, keys, "wxLuaBindString") end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindEvent struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindEvent(tbl) local keys = { "name", "eventType", "class_tag" } *************** *** 430,438 **** -- Add the class tag name for the event for i = 2, #t do ! t[i][3] = wx.wxlua_typename(t[i][3]).." ("..t[i][3]..")" end return t end function CreatewxLuaBindObject(tbl) local keys = { "name", "object", "class_tag" } --- 524,537 ---- -- Add the class tag name for the event for i = 2, #t do ! t[i][3] = wxlua.wxlua_typename(t[i][3]).." ("..t[i][3]..")" ! -- if t[i-1][2] == t[i][2] then t[i].color = wx.wxRED end -- see if there's dups, there's a couple, but they're right end return t end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindObject struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindObject(tbl) local keys = { "name", "object", "class_tag" } *************** *** 441,449 **** -- Add the class tag name for the user data for i = 2, #t do ! t[i][3] = wx.wxlua_typename(t[i][3]).." ("..t[i][3]..")" end return t end function CreatewxLuaBindCFunc(tbl) local keys = { "func", "type", "minargs", "maxargs", "argtags" } --- 540,552 ---- -- Add the class tag name for the user data for i = 2, #t do ! t[i][3] = wxlua.wxlua_typename(t[i][3]).." ("..t[i][3]..")" end return t end + + -- ---------------------------------------------------------------------------- + -- Create a list table from a wxLuaBindCFunc struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindCFunc(tbl) local keys = { "func", "type", "minargs", "maxargs", "argtags" } *************** *** 466,469 **** --- 569,575 ---- end + -- ---------------------------------------------------------------------------- + -- Generically Create a list table from a wxLuaBindXXX struct table + -- ---------------------------------------------------------------------------- function CreatewxLuaBindTable(tbl, cols, object_type) local t = { *************** *** 473,477 **** } ! local keys = {} for i = 1, #tbl do --- 579,583 ---- } ! --local keys = {} -- used to find dups for i = 1, #tbl do *************** *** 504,507 **** --- 610,616 ---- end + -- ---------------------------------------------------------------------------- + -- Sort items in the listctrl based on the column (0 based) and also the data table + -- ---------------------------------------------------------------------------- function SortListItems(col) local data = listData[list_level] *************** *** 511,515 **** end ! local sorted = data.col_sorted[col+1] local function SortListItems(item1, item2, col) --- 620,624 ---- end ! local sorted = data.col_sorted[col+1] or false local function SortListItems(item1, item2, col) *************** *** 558,561 **** --- 667,671 ---- listCtrl:SortItems(SortListItems, col+1) + data.col_sorted[col+1] = (not sorted) -- now make the table of data match what's in the listctrl so when you *************** *** 574,589 **** end ! for c = 1, listCtrl:GetColumnCount() do ! listCtrl:SetColumnImage(c-1, -1) end - if not sorted then - data.col_sorted[col+1] = true - listCtrl:SetColumnImage(col, img_sort_dn) - else - data.col_sorted[col+1] = false - listCtrl:SetColumnImage(col, img_sort_up) - end end --- 684,698 ---- end ! -- put the arrow in the col header that we've sorted this col and clear others for c = 1, listCtrl:GetColumnCount() do ! if c ~= col+1 then ! listCtrl:SetColumnImage(c-1, -1) ! elseif not sorted then ! listCtrl:SetColumnImage(col, img_sort_dn) ! else ! listCtrl:SetColumnImage(col, img_sort_up) ! end end end *************** *** 633,828 **** elseif (list_level == 1) then if itemText == "wxLua Types" then ! local t = { ! {"..", ["icon"] = img_folder}, ! ["col_labels"] = {"wxLua Type", "none -1", "nil 0", "bool 1", "lightuserdata 2", "number 3", "string 4", "table 5", "function 6", "userdata 7", "thread 8"}, ! ["object_type"] = "wxLua Types" ! } ! ! local wxltype_names = { ! "WXLUAARG_None", ! "WXLUAARG_Nil", ! "WXLUAARG_Boolean", ! "WXLUAARG_LightUserData", ! "WXLUAARG_Number", ! "WXLUAARG_String", ! "WXLUAARG_LuaTable", ! "WXLUAARG_LuaFunction", ! "WXLUAARG_UserData", ! "WXLUAARG_LuaThread", ! "WXLUAARG_Integer" ! } ! ! for i = 1, #wxltype_names do ! local wxltype = wx[wxltype_names[i]] ! local row = { wxltype_names[i].." "..tostring(wxltype) } ! for j = 2, #t.col_labels do ! local ltype = j - 3 ! local ok = wx.wxlua_iswxluatype(ltype, wxltype) ! if ok == 1 then ok = "X" end ! if ok == 0 then ok = "" end ! if ok == -1 then ok = "?" end -- shouldn't happen! ! table.insert(row, ok) ! end ! table.insert(t, row) ! end list_level = list_level + 1 listData[list_level] = t GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "All Classes" then ! local t = { ! {"..", ["icon"] = img_folder}, ! ["col_labels"] = {"wxLua Class Name - wxClassInfo Name (wxClassInfo Base Name)"}, ! ["object_type"] = "All Classes" ! } ! ! local max_cols = 1 ! ! local function GetClassInfoStr(ci) ! local s = "" ! if type(ci) == "userdata" then ! s = s.." - "..ci:GetClassName() ! local b1 = ci:GetBaseClassName1() ! local b2 = ci:GetBaseClassName2() ! ! if (string.len(b1) > 0) then ! s = s.." ("..b1..")" ! end ! if (string.len(b2) > 0) then ! s = s.."("..b2..")" ! end ! end ! return s ! end ! ! for b = 1, #bindingList do ! local binding = _G ! for i = 1, #bindingList[b] do ! binding = binding[bindingList[b][i]] ! end ! ! local t1 = binding.GetClassArray ! ! for i = 1, #t1 do ! local a = string.format("%s%03d. ", string.char(string.byte('a')+b-1), i) ! ! local c = t1[i] ! local c_table = {a..c.name, ["color"] = wx.wxBLUE} -- GetClassInfoStr(c.classInfo) ! ! -- traverse through the base classes ! local bc = c.baseclass ! while bc do ! table.insert(c_table, bc.name) -- ..GetClassInfoStr(bc.classInfo) ! bc = bc.baseclass ! end ! ! if max_cols < #c_table then max_cols = #c_table end ! table.insert(t, c_table) ! ! -- now do wxWidgets base class info ! if c.classInfo then ! local ci = c.classInfo ! local c_table2 = {a..ci:GetClassName()} ! if ci:GetBaseClass2() then print(ci:GetClassName(), "Has two bases!") end ! ci = ci:GetBaseClass1() -- FIXME handle two base classes, maybe? ! while ci do ! -- we don't bind wxWindowBase since we'd never need it ! if ci:GetClassName() == "wxWindowBase" then ! c_table2[#c_table2] = c_table2[#c_table2].."("..ci:GetClassName()..")" ! else ! table.insert(c_table2, ci:GetClassName()) ! if c_table[#c_table2] ~= c_table2[#c_table2] then ! c_table2.color = wx.wxRED ! end ! end ! ! if ci:GetBaseClass2() then print(ci:GetClassName(), "Has two bases!") end ! ci = ci:GetBaseClass1() -- FIXME handle two base classes, maybe? ! end ! ! if max_cols < #c_table2 then max_cols = #c_table2 end ! table.insert(t, c_table2) ! end ! end ! end ! ! -- Set the col labels after counting them ! for i = 2, max_cols do ! t.col_labels[i] = "Base class "..tostring(i-1) ! end ! ! -- Put strings where there is no base class ! for i = 1, #t do ! for j = 1, max_cols do ! if t[i][j] == nil then t[i][j] = "" end ! end ! end list_level = list_level + 1 listData[list_level] = t GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "Overloaded Baseclass Functions" then ! local t = { ! {"..", ["icon"] = img_folder}, ! ["col_labels"] = {"Class Name", "Function Name", "Args"}, ! ["object_type"] = "Overloaded Baseclass Functions" ! } ! ! local max_cols = 2 ! ! for b = 1, #bindingList do ! local binding = _G ! for i = 1, #bindingList[b] do ! binding = binding[bindingList[b][i]] ! end ! ! local t1 = binding.GetClassArray ! ! for i = 1, #t1 do ! local methods = t1[i].methods ! ! -- some classes don't have methods, wxBestHelpController for example ! for j = 1, t1[i].methods_n do ! local m = methods[j] ! local m_table = {m.class_name, m.name} ! ! local funcs = m.funcs ! local s = "" ! for f = 1, m.funcs_n do ! s = s.."("..CreateArgTagsString(funcs[f].argtags)..") " ! end ! table.insert(m_table, s) ! ! while m.basemethod do ! m = m.basemethod ! table.insert(m_table, m.class_name) ! ! local funcs = m.funcs ! local s = "" ! for f = 1, m.funcs_n do ! s = s.."("..CreateArgTagsString(funcs[f].argtags)..") " ! end ! table.insert(m_table, s) ! end ! if #m_table > 3 then ! if max_cols < #m_table then max_cols = #m_table end ! table.insert(t, m_table) ! end ! end ! end ! end ! -- Set the col labels after counting them ! for i = 4, max_cols, 2 do ! t.col_labels[i] = "Base Class" ! t.col_labels[i+1] = "Args" ! end ! -- Put strings where there is no base class ! for i = 1, #t do ! for j = 1, max_cols do ! if t[i][j] == nil then t[i][j] = "" end ! end ! end list_level = list_level + 1 --- 742,765 ---- elseif (list_level == 1) then if itemText == "wxLua Types" then ! local t = CreatewxLuaTypeTable() list_level = list_level + 1 listData[list_level] = t GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "All wxLua Classes" then ! local t = CreateAllClassesTable() list_level = list_level + 1 listData[list_level] = t GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "All wxWidgets wxClassInfo" then ! local t = wxclassInfo ! list_level = list_level + 1 ! listData[list_level] = t ! GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "Overloaded Baseclass Functions" then ! local t = CreateOverloadedBasecassFunctionsTable() list_level = list_level + 1 *************** *** 934,937 **** --- 871,1138 ---- -- ---------------------------------------------------------------------------- + -- Show the wxLua types vs. the lua_type() + -- ---------------------------------------------------------------------------- + function CreatewxLuaTypeTable() + local t = { + {"..", ["icon"] = img_folder}, + ["col_labels"] = {"wxLua Type"}, + ["object_type"] = "wxLua Types" + } + + local lua_types = { + "LUA_TNONE", + "LUA_TNIL", + "LUA_TBOOLEAN", + "LUA_TLIGHTUSERDATA", + "LUA_TNUMBER", + "LUA_TSTRING", + "LUA_TTABLE", + "LUA_TFUNCTION", + "LUA_TUSERDATA", + "LUA_TTHREAD" + } + + for i = 1, #lua_types do + table.insert(t.col_labels, lua_types[i].." "..tostring(wxlua[lua_types[i]])) + end + + local wxltype_names = { + "WXLUAARG_None", + "WXLUAARG_Nil", + "WXLUAARG_Boolean", + "WXLUAARG_LightUserData", + "WXLUAARG_Number", + "WXLUAARG_String", + "WXLUAARG_LuaTable", + "WXLUAARG_LuaFunction", + "WXLUAARG_UserData", + "WXLUAARG_LuaThread", + "WXLUAARG_Integer" + } + + for i = 1, #wxltype_names do + local wxltype = wxlua[wxltype_names[i]] + local row = { wxltype_names[i].." "..tostring(wxltype) } + for j = 2, #t.col_labels do + local ltype = wxlua[lua_types[j-1]] + local ok = wxlua.wxlua_iswxluatype(ltype, wxltype) + if ok == 1 then ok = "X" end + if ok == 0 then ok = "" end + if ok == -1 then ok = "?" end -- shouldn't happen! + table.insert(row, ok) + end + table.insert(t, row) + end + + return t + end + + -- ---------------------------------------------------------------------------- + -- Show all classes that wxLua has wrapped + -- ---------------------------------------------------------------------------- + function CreateAllClassesTable() + local t = { + {"..", ["icon"] = img_folder}, + ["col_labels"] = {"wxLua Class Name (1st line) / wxClassInfo Name (2nd line)"}, + ["object_type"] = "All wxLua Classes" + } + + local max_cols = 1 + + local function GetClassInfoStr(ci) + local s = "" + if type(ci) == "userdata" then + s = s.." - "..ci:GetClassName() + local b1 = ci:GetBaseClassName1() + local b2 = ci:GetBaseClassName2() + + if (string.len(b1) > 0) then + s = s.." ("..b1..")" + end + if (string.len(b2) > 0) then + s = s.."("..b2..")" + end + end + return s + end + + local unwrappedBaseClasses = { + ["wxDCBase"] = 1, + ["wxFileDialogBase"] = 1, + ["wxPrinterBase"] = 1, + ["wxPrintPreviewBase"] = 1, + ["wxTextCtrlBase"] = 1, + ["wxWindowBase"] = 1, + + ["wxLuaDebuggerBase"] = 1, + } + + local wxwidgetsNoClassInfo = { + ["wxBookCtrlBaseEvent"] = "wxNotifyEvent", + ["wxControlWithItems"] = "wxControl", + ["wxMirrorDC"] = "wxDC", + ["wxSplashScreenWindow"] = "wxWindow", + ["wxToolBarBase"] = "wxControl", + } + + for b = 1, #bindingList do + local binding = _G + for i = 1, #bindingList[b] do + binding = binding[bindingList[b][i]] + end + + local t1 = binding.GetClassArray + + for i = 1, #t1 do + -- this string is to force the wxLua classname and the wxClassInfo names + -- to be together and the first char is to keep bindings together + local a = string.format("%s%03d. ", string.char(string.byte('a')+b-1), i) + + local c = t1[i] + local c_table = {["color"] = wx.wxBLUE} + + -- check for mistakes in the bindings + if (not c.classInfo) and wx.wxClassInfo.FindClass(c.name) then + print(c.name.." is missing it's wxClassInfo.") + end + + -- traverse through the wxLua defined base classes + local bc = c + while bc do + -- check for mistakes in the bindings + if (not bc.classInfo) and wx.wxClassInfo.FindClass(bc.name) then + print(bc.name.." is missing it's wxClassInfo.") + end + + table.insert(c_table, bc.name) + bc = bc.baseclass + end + + if max_cols < #c_table then max_cols = #c_table end + table.insert(t, c_table) + + -- now do wxWidgets base class info + if c.classInfo then + local ci = c.classInfo + local c_table2 = {} + + while ci do + local item + + -- we don't bind some classes since we wouldn't need them + if unwrappedBaseClasses[ci:GetClassName()] then + c_table2[#c_table2] = c_table2[#c_table2].."("..ci:GetClassName()..")" + elseif c_table[#c_table2+1] and (wxwidgetsNoClassInfo[c_table[#c_table2+1]] == ci:GetClassName()) then + table.insert(c_table2, c_table[#c_table2+1].." - No wxClassInfo") + table.insert(c_table2, ci:GetClassName()) + else + table.insert(c_table2, ci:GetClassName()) + if (c_table[#c_table2] ~= c_table2[#c_table2]) then + c_table2.color = wx.wxRED + end + end + + if ci:GetBaseClass2() then print(ci:GetClassName(), "Has two bases!") end + ci = ci:GetBaseClass1() -- FIXME handle two base classes, maybe? + end + + t[#t][1] = a..t[#t][1] + c_table2[1] = a..c_table2[1] + if max_cols < #c_table2 then max_cols = #c_table2 end + table.insert(t, c_table2) + else + t[#t][1] = a..t[#t][1] + end + + end + end + + -- Set the col labels after counting them + for i = 2, max_cols do + t.col_labels[i] = "Base class "..tostring(i-1) + end + + -- Put strings where there is no base class + for i = 1, #t do + for j = 1, max_cols do + if t[i][j] == nil then t[i][j] = "" end + end + end + + return t + end + + + -- ---------------------------------------------------------------------------- + -- Show all functions that overload a baseclass function (for debugging bindings...) + -- ---------------------------------------------------------------------------- + function CreateOverloadedBasecassFunctionsTable() + local t = { + {"..", ["icon"] = img_folder}, + ["col_labels"] = {"Class Name", "Function Name", "Args"}, + ["object_type"] = "Overloaded Baseclass Functions" + } + + local max_cols = 2 + + for b = 1, #bindingList do + local binding = _G + for i = 1, #bindingList[b] do + binding = binding[bindingList[b][i]] + end + + local t1 = binding.GetClassArray + + for i = 1, #t1 do + local methods = t1[i].methods + + -- some classes don't have methods, wxBestHelpController for example + for j = 1, t1[i].methods_n do + local m = methods[j] + local m_table = {m.class_name, m.name} + + local funcs = m.funcs + local s = "" + for f = 1, m.funcs_n do + s = s.."("..CreateArgTagsString(funcs[f].argtags)..") " + end + table.insert(m_table, s) + + while m.basemethod do + m = m.basemethod + table.insert(m_table, m.class_name) + + local funcs = m.funcs + local s = "" + for f = 1, m.funcs_n do + s = s.."("..CreateArgTagsString(funcs[f].argtags)..") " + end + table.insert(m_table, s) + end + if #m_table > 3 then + if max_cols < #m_table then max_cols = #m_table end + table.insert(t, m_table) + end + end + end + end + + -- Set the col labels after counting them + for i = 4, max_cols, 2 do + t.col_labels[i] = "Base Class" + t.col_labels[i+1] = "Args" + end + + -- Put strings where there is no base class + for i = 1, #t do + for j = 1, max_cols do + if t[i][j] == nil then t[i][j] = "" end + end + end + + return t + end + + -- ---------------------------------------------------------------------------- -- The main program, call this to start the program -- ---------------------------------------------------------------------------- *************** *** 946,950 **** local viewMenu = wx.wxMenu() ! viewMenu:AppendCheckItem(ID_VIEW_BASECLASS_FUNCTIONS, "View baseclass functions", "View all baseclass functions for class methods") local helpMenu = wx.wxMenu() --- 1147,1153 ---- local viewMenu = wx.wxMenu() ! viewMenu:Append(ID_STACK_DIALOG, "Show lua stack dialog...", "View the current lua stack, stack top shows globals.") ! viewMenu:AppendSeparator() ! viewMenu:AppendCheckItem(ID_VIEW_BASECLASS_FUNCTIONS, "View baseclass functions", "View all baseclass functions for class methods.") local helpMenu = wx.wxMenu() *************** *** 961,964 **** --- 1164,1170 ---- function (event) frame:Close(true) end ) + frame:Connect(ID_STACK_DIALOG, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) wxlua.LuaStackDialog() end ) + -- connect the selection event of the about menu item frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, *************** *** 1010,1014 **** listData[1] = { {"wxLua Types", "Compare Lua's type to wxLua's type", ["icon"] = img_folder }, ! {"All Classes", "Classes and their base classes (red may not indicate error)", ["icon"] = img_folder }, {"Overloaded Baseclass Functions", "See all functions that also have a baseclass function", ["icon"] = img_folder }, --- 1216,1221 ---- listData[1] = { {"wxLua Types", "Compare Lua's type to wxLua's type", ["icon"] = img_folder }, ! {"All wxLua Classes", "Classes and their base classes (red may not indicate error)", ["icon"] = img_folder }, ! {"All wxWidgets wxClassInfo", "All wxObjects having wxClassInfo and their base classes", ["icon"] = img_folder }, {"Overloaded Baseclass Functions", "See all functions that also have a baseclass function", ["icon"] = img_folder }, Index: fldemo.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/fldemo.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** fldemo.wx.lua 31 May 2007 17:18:55 -0000 1.8 --- fldemo.wx.lua 14 Jun 2007 01:23:20 -0000 1.9 *************** *** 125,129 **** function ( event ) event:Skip() ! layout:Delete() layout = nil end) --- 125,129 ---- function ( event ) event:Skip() ! layout:delete() layout = nil end) Index: minimal.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/minimal.wx.lua,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** minimal.wx.lua 31 May 2007 17:18:56 -0000 1.8 --- minimal.wx.lua 14 Jun 2007 01:23:20 -0000 1.9 *************** *** 24,28 **** -- however on Windows 9x/Me this may be too late (DC's are precious resource) -- so delete it here ! dc:Delete() -- ALWAYS Delete() any wxDCs created when done end --- 24,28 ---- -- however on Windows 9x/Me this may be too late (DC's are precious resource) -- so delete it here ! dc:delete() -- ALWAYS delete() any wxDCs created when done end Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wxluasudoku.wx.lua 12 Jun 2007 00:08:42 -0000 1.70 --- wxluasudoku.wx.lua 14 Jun 2007 01:23:20 -0000 1.71 *************** *** 2232,2236 **** sudokuGUI.valueFont_cache, sudokuGUI.possibleFont_cache) ! dc:Delete() -- ALWAYS Delete() any wxDCs created when done return size end --- 2232,2236 ---- sudokuGUI.valueFont_cache, sudokuGUI.possibleFont_cache) ! dc:delete() -- ALWAYS delete() any wxDCs created when done return size end *************** *** 2336,2340 **** sudokuGUI.PaintCell(dc, cell, width, height, sudokuGUI.valueFont, sudokuGUI.possibleFont) end ! dc:Delete() -- ALWAYS Delete() any wxDCs created when done end --- 2336,2340 ---- sudokuGUI.PaintCell(dc, cell, width, height, sudokuGUI.valueFont, sudokuGUI.possibleFont) end ! dc:delete() -- ALWAYS delete() any wxDCs created when done end *************** *** 2355,2359 **** dc:SetBrush(brush) dc:DrawRectangle(0, 0, width, height) ! brush:Delete() local sudokuTable = sudokuGUI.GetCurrentTable() --- 2355,2359 ---- dc:SetBrush(brush) dc:DrawRectangle(0, 0, width, height) ! brush:delete() local sudokuTable = sudokuGUI.GetCurrentTable() *************** *** 2429,2433 **** end ! pen:Delete() end --- 2429,2433 ---- end ! pen:delete() end *************** *** 2473,2477 **** local pen = wx.wxPen(sudokuGUI.Colours[sudokuGUI.INVALID_VALUE_COLOUR], 1, wx.wxSOLID) dc:SetPen(pen) ! pen:Delete() dc:DrawLine(0, 0, width, height) end --- 2473,2477 ---- local pen = wx.wxPen(sudokuGUI.Colours[sudokuGUI.INVALID_VALUE_COLOUR], 1, wx.wxSOLID) dc:SetPen(pen) ! pen:delete() dc:DrawLine(0, 0, width, height) end *************** *** 2628,2633 **** end ! valueFont.wxfont:Delete() ! possibleFont.wxfont:Delete() sudokuGUI.focused_cell_id = old_focused_cell_id -- restore focus --- 2628,2633 ---- end ! valueFont.wxfont:delete() ! possibleFont.wxfont:delete() sudokuGUI.focused_cell_id = old_focused_cell_id -- restore focus *************** *** 2638,2642 **** local pen = wx.wxPen(wx.wxBLACK, iff(borders[i], 4, 2), wx.wxSOLID) dc:SetPen(pen) ! pen:Delete() dc:DrawLine(ColOrigin(1), RowOrigin(i), ColOrigin(10), RowOrigin(i)) dc:DrawLine(ColOrigin(i), RowOrigin(1), ColOrigin(i), RowOrigin(10)) --- 2638,2642 ---- local pen = wx.wxPen(wx.wxBLACK, iff(borders[i], 4, 2), wx.wxSOLID) dc:SetPen(pen) ! pen:delete() dc:DrawLine(ColOrigin(1), RowOrigin(i), ColOrigin(10), RowOrigin(i)) dc:DrawLine(ColOrigin(i), RowOrigin(1), ColOrigin(i), RowOrigin(10)) *************** *** 3851,3855 **** local brush = wx.wxBrush(c, wx.wxSOLID) dc:SetBrush(brush) ! brush:Delete() dc:DrawRectangle(0, 0, width, height) --- 3851,3855 ---- local brush = wx.wxBrush(c, wx.wxSOLID) dc:SetBrush(brush) ! brush:delete() dc:DrawRectangle(0, 0, width, height) *************** *** 3876,3880 **** dc:DrawText(value, pos[n].x, pos[n].y) local pen = wx.wxPen(listBoxValues[idx].colour, 1, wx.wxSOLID) ! dc:SetPen(pen); pen:Delete() if hidden ~= true then dc:DrawRectangle(pos[n].x, pos[n].y, font_width, font_height) --- 3876,3880 ---- dc:DrawText(value, pos[n].x, pos[n].y) local pen = wx.wxPen(listBoxValues[idx].colour, 1, wx.wxSOLID) ! dc:SetPen(pen); pen:delete() if hidden ~= true then dc:DrawRectangle(pos[n].x, pos[n].y, font_width, font_height) *************** *** 3893,3897 **** -- draw invalid marker local pen = wx.wxPen(listBoxValues[sudokuGUI.INVALID_VALUE_COLOUR].colour, 1, wx.wxSOLID) ! dc:SetPen(pen); pen:Delete() dc:DrawLine(0, 0, width, height) --- 3893,3897 ---- -- draw invalid marker local pen = wx.wxPen(listBoxValues[sudokuGUI.INVALID_VALUE_COLOUR].colour, 1, wx.wxSOLID) ! dc:SetPen(pen); pen:delete() dc:DrawLine(0, 0, width, height) *************** *** 3911,3915 **** reset_fonts = false ! dc:Delete() end) --- 3911,3915 ---- reset_fonts = false ! dc:delete() end) *************** *** 3928,3936 **** f = wx.wxGetFontFromUser(panel, f) if f:Ok() then ! listBoxValues[sel].font:Delete() listBoxValues[sel].font = f reset_fonts = true else ! f:Delete() end sampleWin:Refresh(false) --- 3928,3936 ---- f = wx.wxGetFontFromUser(panel, f) if f:Ok() then ! listBoxValues[sel].font:delete() listBoxValues[sel].font = f reset_fonts = true else ! f:delete() end sampleWin:Refresh(false) *************** *** 3942,3950 **** c = wx.wxGetColourFromUser(panel, c) if c:Ok() then ! listBoxValues[sel].colour:Delete() listBoxValues[sel].colour = c colourButton:SetForegroundColour(c) else ! c:Delete() end sampleWin:Refresh(false) --- 3942,3950 ---- c = wx.wxGetColourFromUser(panel, c) if c:Ok() then ! listBoxValues[sel].colour:delete() listBoxValues[sel].colour = c colourButton:SetForegroundColour(c) else ! c:delete() end sampleWin:Refresh(false) *************** *** 3962,3982 **** if ret == wx.wxYES then for n = 1, sudokuGUI.COLOUR_MAX do ! listBoxValues[n].colour:Delete() listBoxValues[n].colour = wx.wxColour(sudokuGUI.Colours_[n]) end ! listBoxValues[sudokuGUI.VALUE_COLOUR].font:Delete() ! listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font:Delete() listBoxValues[sudokuGUI.VALUE_COLOUR].font = wx.wxFont(sudokuGUI.valueFont_wxfont_) listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font = wx.wxFont(sudokuGUI.possibleFont_wxfont_) elseif ret == wx.wxNO then ! listBoxValues[sel].colour:Delete() listBoxValues[sel].colour = wx.wxColour(sudokuGUI.Colours_[sel]) if (sel == sudokuGUI.VALUE_COLOUR) then ! listBoxValues[sel].font:Delete() listBoxValues[sel].font = wx.wxFont(sudokuGUI.valueFont_wxfont_) elseif (sel == sudokuGUI.POSS_VALUE_COLOUR) then ! listBoxValues[sel].font:Delete() listBoxValues[sel].font = wx.wxFont(sudokuGUI.possibleFont_wxfont_) end --- 3962,3982 ---- if ret == wx.wxYES then for n = 1, sudokuGUI.COLOUR_MAX do ! listBoxValues[n].colour:delete() listBoxValues[n].colour = wx.wxColour(sudokuGUI.Colours_[n]) end ! listBoxValues[sudokuGUI.VALUE_COLOUR].font:delete() ! listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font:delete() listBoxValues[sudokuGUI.VALUE_COLOUR].font = wx.wxFont(sudokuGUI.valueFont_wxfont_) listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font = wx.wxFont(sudokuGUI.possibleFont_wxfont_) elseif ret == wx.wxNO then ! listBoxValues[sel].colour:delete() listBoxValues[sel].colour = wx.wxColour(sudokuGUI.Colours_[sel]) if (sel == sudokuGUI.VALUE_COLOUR) then ! listBoxValues[sel].font:delete() listBoxValues[sel].font = wx.wxFont(sudokuGUI.valueFont_wxfont_) elseif (sel == sudokuGUI.POSS_VALUE_COLOUR) then ! listBoxValues[sel].font:delete() listBoxValues[sel].font = wx.wxFont(sudokuGUI.possibleFont_wxfont_) end *************** *** 3990,4001 **** function sudokuGUI.PreferencesDialogPageUI.Apply() for n = 1, sudokuGUI.COLOUR_MAX do ! sudokuGUI.Colours[n]:Delete() sudokuGUI.Colours[n] = wx.wxColour(listBoxValues[n].colour) end -- copy the fonts since when applied their size will change ! sudokuGUI.valueFont.wxfont:Delete() sudokuGUI.valueFont.wxfont = wx.wxFont(listBoxValues[sudokuGUI.VALUE_COLOUR].font) ! sudokuGUI.possibleFont.wxfont:Delete() sudokuGUI.possibleFont.wxfont = wx.wxFont(listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font) sudokuGUI.valueFont_cache = {} -- clear cache so GetCellBestSize recreates it --- 3990,4001 ---- function sudokuGUI.PreferencesDialogPageUI.Apply() for n = 1, sudokuGUI.COLOUR_MAX do ! sudokuGUI.Colours[n]:delete() sudokuGUI.Colours[n] = wx.wxColour(listBoxValues[n].colour) end -- copy the fonts since when applied their size will change ! sudokuGUI.valueFont.wxfont:delete() sudokuGUI.valueFont.wxfont = wx.wxFont(listBoxValues[sudokuGUI.VALUE_COLOUR].font) ! sudokuGUI.possibleFont.wxfont:delete() sudokuGUI.possibleFont.wxfont = wx.wxFont(listBoxValues[sudokuGUI.POSS_VALUE_COLOUR].font) sudokuGUI.valueFont_cache = {} -- clear cache so GetCellBestSize recreates it *************** *** 4017,4022 **** function sudokuGUI.PreferencesDialogPageUI.Destroy() for n = 1, sudokuGUI.COLOUR_MAX do ! listBoxValues[n].colour:Delete() ! if listBoxValues[n].font then listBoxValues[n].font:Delete() end end end --- 4017,4022 ---- function sudokuGUI.PreferencesDialogPageUI.Destroy() for n = 1, sudokuGUI.COLOUR_MAX do ! listBoxValues[n].colour:delete() ! if listBoxValues[n].font then listBoxValues[n].font:delete() end end end *************** *** 4828,4832 **** local m = wx.wxMenuItem(menu, id, text, help) m:SetBitmap(bmp) ! bmp:Delete() return m end --- 4828,4832 ---- local m = wx.wxMenuItem(menu, id, text, help) m:SetBitmap(bmp) ! bmp:delete() return m end Index: validator.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/validator.wx.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** validator.wx.lua 12 Jun 2007 00:08:42 -0000 1.2 --- validator.wx.lua 14 Jun 2007 01:23:20 -0000 1.3 *************** *** 48,58 **** text_alpha_val = "DeleteSpace OnlyAlphabetCharsAllowed" ! checkObj = wx.wxLuaObject(check_val) ! comboObj = wx.wxLuaObject(combo_val) ! textObj = wx.wxLuaObject(text_val) ! scrollObj = wx.wxLuaObject(scroll_val) ! checklObj = wx.wxLuaObject(checkl_val) ! checklObj = wx.wxLuaObject(checkl_val) ! textAlphaObj = wx.wxLuaObject(text_alpha_val) function CreateDialog() --- 48,58 ---- text_alpha_val = "DeleteSpace OnlyAlphabetCharsAllowed" ! checkObj = wxlua.wxLuaObject(check_val) ! comboObj = wxlua.wxLuaObject(combo_val) ! textObj = wxlua.wxLuaObject(text_val) ! scrollObj = wxlua.wxLuaObject(scroll_val) ! checklObj = wxlua.wxLuaObject(checkl_val) ! checklObj = wxlua.wxLuaObject(checkl_val) ! textAlphaObj = wxlua.wxLuaObject(text_alpha_val) function CreateDialog() Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** editor.wx.lua 6 Jun 2007 23:43:17 -0000 1.53 --- editor.wx.lua 14 Jun 2007 01:23:20 -0000 1.54 *************** *** 226,237 **** end) ! errorLog = wx.wxStyledTextCtrl(splitter, wx.wxID_ANY) errorLog:Show(false) errorLog:SetFont(font) ! errorLog:StyleSetFont(wx.wxSTC_STYLE_DEFAULT, font) errorLog:StyleClearAll() errorLog:SetMarginWidth(1, 16) -- marker margin ! errorLog:SetMarginType(1, wx.wxSTC_MARGIN_SYMBOL); ! errorLog:MarkerDefine(CURRENT_LINE_MARKER, wx.wxSTC_MARK_ARROWS, wx.wxBLACK, wx.wxWHITE) errorLog:SetReadOnly(true) --- 226,237 ---- end) ! errorLog = wxstc.wxStyledTextCtrl(splitter, wx.wxID_ANY) errorLog:Show(false) errorLog:SetFont(font) ! errorLog:StyleSetFont(wxstc.wxSTC_STYLE_DEFAULT, font) errorLog:StyleClearAll() errorLog:SetMarginWidth(1, 16) -- marker margin ! errorLog:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL); ! errorLog:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_ARROWS, wx.wxBLACK, wx.wxWHITE) errorLog:SetReadOnly(true) *************** *** 404,410 **** -- Create an editor and add it to the notebook function CreateEditor(name) ! local editor = wx.wxStyledTextCtrl(notebook, editorID, ! wx.wxDefaultPosition, wx.wxDefaultSize, ! wx.wxSUNKEN_BORDER) editorID = editorID + 1 -- increment so they're always unique --- 404,410 ---- -- Create an editor and add it to the notebook function CreateEditor(name) ! local editor = wxstc.wxStyledTextCtrl(notebook, editorID, ! wx.wxDefaultPosition, wx.wxDefaultSize, ! wx.wxSUNKEN_BORDER) editorID = editorID + 1 -- increment so they're always unique *************** *** 414,418 **** editor:SetFont(font) ! editor:StyleSetFont(wx.wxSTC_STYLE_DEFAULT, font) for i = 0, 32 do editor:StyleSetFont(i, font) --- 414,418 ---- editor:SetFont(font) ! editor:StyleSetFont(wxstc.wxSTC_STYLE_DEFAULT, font) for i = 0, 32 do editor:StyleSetFont(i, font) *************** *** 478,501 **** editor:SetIndentationGuides(true) ! editor:SetVisiblePolicy(wx.wxSTC_VISIBLE_SLOP, 3) ! --editor:SetXCaretPolicy(wx.wxSTC_CARET_SLOP, 10) ! --editor:SetYCaretPolicy(wx.wxSTC_CARET_SLOP, 3) editor:SetMarginWidth(0, editor:TextWidth(32, "99999_")) -- line # margin editor:SetMarginWidth(1, 16) -- marker margin ! editor:SetMarginType(1, wx.wxSTC_MARGIN_SYMBOL) editor:SetMarginSensitive(1, true) ! editor:MarkerDefine(BREAKPOINT_MARKER, wx.wxSTC_MARK_ROUNDRECT, wx.wxWHITE, wx.wxRED) ! editor:MarkerDefine(CURRENT_LINE_MARKER, wx.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxGREEN) editor:SetMarginWidth(2, 16) -- fold margin ! editor:SetMarginType(2, wx.wxSTC_MARGIN_SYMBOL) ! editor:SetMarginMask(2, wx.wxSTC_MASK_FOLDERS) editor:SetMarginSensitive(2, true) ! editor:SetFoldFlags(wx.wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED + ! wx.wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED) editor:SetProperty("fold", "1") --- 478,501 ---- editor:SetIndentationGuides(true) ! editor:SetVisiblePolicy(wxstc.wxSTC_VISIBLE_SLOP, 3) ! --editor:SetXCaretPolicy(wxstc.wxSTC_CARET_SLOP, 10) ! --editor:SetYCaretPolicy(wxstc.wxSTC_CARET_SLOP, 3) editor:SetMarginWidth(0, editor:TextWidth(32, "99999_")) -- line # margin editor:SetMarginWidth(1, 16) -- marker margin ! editor:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL) editor:SetMarginSensitive(1, true) ! editor:MarkerDefine(BREAKPOINT_MARKER, wxstc.wxSTC_MARK_ROUNDRECT, wx.wxWHITE, wx.wxRED) ! editor:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxGREEN) editor:SetMarginWidth(2, 16) -- fold margin ! editor:SetMarginType(2, wxstc.wxSTC_MARGIN_SYMBOL) ! editor:SetMarginMask(2, wxstc.wxSTC_MASK_FOLDERS) editor:SetMarginSensitive(2, true) ! editor:SetFoldFlags(wxstc.wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED + ! wxstc.wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED) editor:SetProperty("fold", "1") *************** *** 504,517 **** local grey = wx.wxColour(128, 128, 128) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDEROPEN, wx.wxSTC_MARK_BOXMINUS, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDER, wx.wxSTC_MARK_BOXPLUS, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDERSUB, wx.wxSTC_MARK_VLINE, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDERTAIL, wx.wxSTC_MARK_LCORNER, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDEREND, wx.wxSTC_MARK_BOXPLUSCONNECTED, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDEROPENMID, wx.wxSTC_MARK_BOXMINUSCONNECTED, wx.wxWHITE, grey) ! editor:MarkerDefine(wx.wxSTC_MARKNUM_FOLDERMIDTAIL, wx.wxSTC_MARK_TCORNER, wx.wxWHITE, grey) ! grey:Delete() ! editor:Connect(wx.wxEVT_STC_MARGINCLICK, function (event) local line = editor:LineFromPosition(event:GetPosition()) --- 504,517 ---- local grey = wx.wxColour(128, 128, 128) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, wx.wxWHITE, grey) ! editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, wx.wxWHITE, grey) ! grey:delete() ! editor:Connect(wxstc.wxEVT_STC_MARGINCLICK, function (event) local line = editor:LineFromPosition(event:GetPosition()) *************** *** 524,528 **** else local level = editor:GetFoldLevel(line) ! if HasBit(level, wx.wxSTC_FOLDLEVELHEADERFLAG) then editor:ToggleFold(line) end --- 524,528 ---- else local level = editor:GetFoldLevel(line) ! if HasBit(level, wxstc.wxSTC_FOLDLEVELHEADERFLAG) then editor:ToggleFold(line) end *************** *** 531,535 **** end) ! editor:Connect(wx.wxEVT_STC_CHARADDED, function (event) -- auto-indent --- 531,535 ---- end) ! editor:Connect(wxstc.wxEVT_STC_CHARADDED, function (event) -- auto-indent *************** *** 561,565 **** end) ! editor:Connect(wx.wxEVT_STC_USERLISTSELECTION, function (event) local pos = editor:GetCurrentPos() --- 561,565 ---- end) ! editor:Connect(wxstc.wxEVT_STC_USERLISTSELECTION, function (event) local pos = editor:GetCurrentPos() *************** *** 569,583 **** end) ! editor:Connect(wx.wxEVT_STC_SAVEPOINTREACHED, function (event) SetDocumentModified(editor:GetId(), false) end) ! editor:Connect(wx.wxEVT_STC_SAVEPOINTLEFT, function (event) SetDocumentModified(editor:GetId(), true) end) ! editor:Connect(wx.wxEVT_STC_UPDATEUI, function (event) UpdateStatusText(editor) --- 569,583 ---- end) ! editor:Connect(wxstc.wxEVT_STC_SAVEPOINTREACHED, function (event) SetDocumentModified(editor:GetId(), false) end) ! editor:Connect(wxstc.wxEVT_STC_SAVEPOINTLEFT, function (event) SetDocumentModified(editor:GetId(), true) end) ! editor:Connect(wxstc.wxEVT_STC_UPDATEUI, function (event) UpdateStatusText(editor) *************** *** 615,619 **** function SetupKeywords(editor, useLuaParser) if useLuaParser then ! editor:SetLexer(wx.wxSTC_LEX_LUA) -- Note: these keywords are shamelessly ripped from scite 1.68 --- 615,619 ---- function SetupKeywords(editor, useLuaParser) if useLuaParser then ! editor:SetLexer(wxstc.wxSTC_LEX_LUA) -- Note: these keywords are shamelessly ripped from scite 1.68 *************** *** 664,668 **** editor:SetKeyWords(5, wxkeywords) else ! editor:SetLexer(wx.wxSTC_LEX_NULL) editor:SetKeyWords(0, "") end --- 664,668 ---- editor:SetKeyWords(5, wxkeywords) else ! editor:SetLexer(wxstc.wxSTC_LEX_NULL) editor:SetKeyWords(0, "") end *************** *** 1238,1242 **** local foldLvl = math.mod(foldRaw, 4096) local foldHdr = math.mod(math.floor(foldRaw / 8192), 2) == 1 ! if not baseFound and (foldLvl == wx.wxSTC_FOLDLEVELBASE) then baseFound = true visible = editor:GetLineVisible(ln) --- 1238,1242 ---- local foldLvl = math.mod(foldRaw, 4096) local foldHdr = math.mod(math.floor(foldRaw / 8192), 2) == 1 ! if not baseFound and (foldLvl == wxstc.wxSTC_FOLDLEVELBASE) then baseFound = true visible = editor:GetLineVisible(ln) *************** *** 1266,1270 **** if not editor:GetFoldExpanded(ln) then editor:ToggleFold(ln) end end ! elseif hide and (foldLvl == wx.wxSTC_FOLDLEVELBASE) then if not foldHdr then editor:HideLines(ln, ln) --- 1266,127... [truncated message content] |
From: John L. <jr...@us...> - 2007-06-14 01:23:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxluasocket/src Modified Files: wxluasocket.cpp wxluasocket_bind.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxluasocket_bind.cpp 12 Jun 2007 05:03:17 -0000 1.20 --- wxluasocket_bind.cpp 14 Jun 2007 01:23:20 -0000 1.21 *************** *** 95,98 **** --- 95,112 ---- // --------------------------------------------------------------------------- + // %override wxLua_function_LuaStackDialog + // %function void LuaStackDialog() + static int LUACALL wxLua_function_LuaStackDialog(lua_State *L) + { + // call StackDialog + + wxLuaStackDialog stackDialog(wxLuaState(L), NULL); + stackDialog.ShowModal(); + + return 0; + } + + static wxLuaBindCFunc s_wxluafunc_wxLua_function_LuaStackDialog[1] = {{ wxLua_function_LuaStackDialog, WXLUAMETHOD_CFUNCTION, 0, 0, s_wxluaargArray_None }}; + // --------------------------------------------------------------------------- // wxLuaGetFunctionList_wxluasocket() is called to register global functions *************** *** 103,106 **** --- 117,121 ---- static wxLuaBindMethod functionList[] = { + { "LuaStackDialog", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_LuaStackDialog, 1, NULL }, { 0, 0, 0, 0 }, *************** *** 149,153 **** { m_bindingName = wxT("wxluasocket"); ! m_nameSpace = wxT("wx"); m_classArray = wxLuaGetClassList_wxluasocket(m_classCount); m_defineArray = wxLuaGetDefineList_wxluasocket(m_defineCount); --- 164,168 ---- { m_bindingName = wxT("wxluasocket"); ! m_nameSpace = wxT("wxlua"); m_classArray = wxLuaGetClassList_wxluasocket(m_classCount); m_defineArray = wxLuaGetDefineList_wxluasocket(m_defineCount); Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wxluasocket.cpp 13 Jun 2007 00:09:04 -0000 1.27 --- wxluasocket.cpp 14 Jun 2007 01:23:20 -0000 1.28 *************** *** 103,122 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaDebuggerServer_Delete[] = { &s_wxluatag_wxLuaDebuggerServer, NULL }; - static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaDebuggerServer_Delete[1] = {{ wxLua_wxLuaDebuggerServer_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerServer_Delete }}; - static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); - // 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_wxLuaDebuggerServer_DisplayStackDialog[] = { &s_wxluatag_wxLuaDebuggerServer, &s_wxluatag_wxWindow, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxLuaDebuggerServer_DisplayStackDialog(lua_State *L); --- 103,106 ---- *************** *** 398,401 **** --- 382,401 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaDebuggerServer_delete[] = { &s_wxluatag_wxLuaDebuggerServer, NULL }; + static int LUACALL wxLua_wxLuaDebuggerServer_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaDebuggerServer_delete[1] = {{ wxLua_wxLuaDebuggerServer_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerServer_delete }}; + static int LUACALL wxLua_wxLuaDebuggerServer_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); + // 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_wxLuaDebuggerServer_constructor[] = { &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxLuaDebuggerServer_constructor(lua_State *L); *************** *** 427,431 **** { "ClearAllBreakPoints", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_ClearAllBreakPoints, 1, NULL }, { "Continue", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_Continue, 1, NULL }, - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaDebuggerServer_Delete, 1, NULL }, { "DisplayStackDialog", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_DisplayStackDialog, 1, NULL }, { "EvaluateExpr", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_EvaluateExpr, 1, NULL }, --- 427,430 ---- *************** *** 443,446 **** --- 442,446 ---- { "StepOver", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_StepOver, 1, NULL }, { "StopServer", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerServer_StopServer, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaDebuggerServer_delete, 1, NULL }, { "wxLuaDebuggerServer", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaDebuggerServer_constructor, 1, NULL }, { 0, 0, 0, 0 }, *************** *** 457,476 **** int s_wxluatag_wxLuaDebuggerEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaDebuggerEvent_Delete[] = { &s_wxluatag_wxLuaDebuggerEvent, NULL }; - static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaDebuggerEvent_Delete[1] = {{ wxLua_wxLuaDebuggerEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerEvent_Delete }}; - static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); - // 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_wxLuaDebuggerEvent_GetFileName[] = { &s_wxluatag_wxLuaDebuggerEvent, NULL }; static int LUACALL wxLua_wxLuaDebuggerEvent_GetFileName(lua_State *L); --- 457,460 ---- *************** *** 545,557 **** } // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaDebuggerEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaDebuggerEvent_Delete, 1, NULL }, { "GetFileName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetFileName, 1, NULL }, { "GetLineNumber", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetLineNumber, 1, NULL }, { "GetMessage", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetMessage, 1, NULL }, { "GetReference", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetReference, 1, NULL }, { 0, 0, 0, 0 }, }; --- 529,557 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaDebuggerEvent_delete[] = { &s_wxluatag_wxLuaDebuggerEvent, NULL }; + static int LUACALL wxLua_wxLuaDebuggerEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaDebuggerEvent_delete[1] = {{ wxLua_wxLuaDebuggerEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerEvent_delete }}; + static int LUACALL wxLua_wxLuaDebuggerEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); + // 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; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaDebuggerEvent_methods[] = { { "GetFileName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetFileName, 1, NULL }, { "GetLineNumber", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetLineNumber, 1, NULL }, { "GetMessage", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetMessage, 1, NULL }, { "GetReference", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaDebuggerEvent_GetReference, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaDebuggerEvent_delete, 1, NULL }, { 0, 0, 0, 0 }, }; |
From: John L. <jr...@us...> - 2007-06-14 01:23:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Added Files: wxlua.cpp wxlua_bind.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. --- NEW FILE: wxlua.cpp --- // --------------------------------------------------------------------------- // This file was generated by genwxbind.lua // // Any changes made to this file may be lost when file is regenerated. // --------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlua_bind.h" #ifdef Above #undef Above #endif #ifdef Below #undef Below #endif // --------------------------------------------------------------------------- // Bind class wxLuaState // --------------------------------------------------------------------------- // Lua MetaTable Tag for Class 'wxLuaState' int s_wxluatag_wxLuaState = -1; static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaState_delete[] = { &s_wxluatag_wxLuaState, NULL }; static int LUACALL wxLua_wxLuaState_delete(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaState_delete[1] = {{ wxLua_wxLuaState_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaState_delete }}; static int LUACALL wxLua_wxLuaState_delete(lua_State *L) { wxLuaState wxlState(L); wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); // 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; } // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaState_methods[] = { { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaState_delete, 1, NULL }, { 0, 0, 0, 0 }, }; int wxLuaState_methodCount = sizeof(wxLuaState_methods)/sizeof(wxLuaBindMethod) - 1; // --------------------------------------------------------------------------- // Bind class wxLuaObject // --------------------------------------------------------------------------- // Lua MetaTable Tag for Class 'wxLuaObject' int s_wxluatag_wxLuaObject = -1; static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_GetAllocationFlags[] = { &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags[1] = {{ wxLua_wxLuaObject_GetAllocationFlags, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetAllocationFlags }}; // int GetAllocationFlags() const static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) { wxLuaState wxlState(L); int returns; // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call GetAllocationFlags returns = self->GetAllocationFlags(); // push the result number lua_pushnumber(L, returns); return 1; } static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_GetObject[] = { &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_GetObject[1] = {{ wxLua_wxLuaObject_GetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_GetObject }}; // %override wxLua_wxLuaObject_GetObject // void *GetObject() const static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) { wxLuaState wxlState(L); // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call GetObject that push the item onto the stack, or nil if (self->GetObject()) return 1; return 0; } static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag[1] = {{ wxLua_wxLuaObject_HasAllocationFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }}; // bool HasAllocationFlag(wxLuaObject_Type flag) static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L) { wxLuaState wxlState(L); bool returns; // wxLuaObject_Type flag wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getintegertype(L, 2); // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call HasAllocationFlag returns = self->HasAllocationFlag(flag); // push the result flag lua_pushboolean(L, returns); return 1; } static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_SetObject[1] = {{ wxLua_wxLuaObject_SetObject, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_SetObject }}; // %override wxLua_wxLuaObject_SetObject // void SetObject(void *object) static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) { wxLuaState wxlState(L); // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call SetObject self->SetObject(1); // return the number of parameters return 0; } static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_delete[] = { &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaObject_delete(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_delete[1] = {{ wxLua_wxLuaObject_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_delete }}; static int LUACALL wxLua_wxLuaObject_delete(lua_State *L) { wxLuaState wxlState(L); wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // 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_wxLuaObject_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_constructor[1] = {{ wxLua_wxLuaObject_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; // %override wxLua_wxLuaObject_constructor // wxLuaObject(void *object) static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxLuaObject *returns; // call constructor returns = new wxLuaObject(wxlState, 1); // add to tracked memory list wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); // return the number of parameters return 1; } // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaObject_methods[] = { { "GetAllocationFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetAllocationFlags, 1, NULL }, { "GetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetObject, 1, NULL }, { "HasAllocationFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag, 1, NULL }, { "SetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_SetObject, 1, NULL }, { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLuaObject_delete, 1, NULL }, { "wxLuaObject", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaObject_constructor, 1, NULL }, { 0, 0, 0, 0 }, }; int wxLuaObject_methodCount = sizeof(wxLuaObject_methods)/sizeof(wxLuaBindMethod) - 1; Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** wxlstate.cpp 13 Jun 2007 00:09:04 -0000 1.109 --- wxlstate.cpp 14 Jun 2007 01:23:19 -0000 1.110 *************** *** 2164,2177 **** if (ok < 0) { ! if (luatype == LUA_TTABLE) { lua_State* L = M_WXLSTATEDATA->m_lua_State; const wxLuaBindClass* wxlClass = wxlua_tgetclass(L, "wxArrayString"); ! if (wxlClass && IsDerivedClass(wxluaarg_tag, *wxlClass->class_tag)) return 1; wxlClass = wxlua_tgetclass(L, "wxArrayInt"); ! if (wxlClass && IsDerivedClass(wxluaarg_tag, *wxlClass->class_tag)) return 1; } --- 2164,2177 ---- if (ok < 0) { ! if (luatype == LUA_TTABLE) { lua_State* L = M_WXLSTATEDATA->m_lua_State; const wxLuaBindClass* wxlClass = wxlua_tgetclass(L, "wxArrayString"); ! if (wxlClass && (IsDerivedClass(wxluaarg_tag, *wxlClass->class_tag) >= 0)) return 1; wxlClass = wxlua_tgetclass(L, "wxArrayInt"); ! if (wxlClass && (IsDerivedClass(wxluaarg_tag, *wxlClass->class_tag) >= 0)) return 1; } *************** *** 3745,3750 **** //typedef intmax_t UInteger; ! typedef int Integer; // FIXME - is this good enough? probably for us ! typedef unsigned int UInteger; #define TDYADIC(name, op, type1, type2) \ --- 3745,3750 ---- //typedef intmax_t UInteger; ! typedef long Integer; // FIXME - is this good enough? probably for us ! typedef unsigned long UInteger; #define TDYADIC(name, op, type1, type2) \ *************** *** 3796,3797 **** --- 3796,3802 ---- return 1; } + + // FIXME - add this to the build files + + #include "wxlua.cpp" + #include "wxlua_bind.cpp" --- NEW FILE: wxlua_bind.cpp --- // --------------------------------------------------------------------------- // This file was generated by genwxbind.lua // // Any changes made to this file may be lost when file is regenerated. // --------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlua_bind.h" #ifdef Above #undef Above #endif #ifdef Below #undef Below #endif // --------------------------------------------------------------------------- // wxLuaGetEventList_wxlua() is called to register events // --------------------------------------------------------------------------- wxLuaBindEvent* wxLuaGetEventList_wxlua(size_t &count) { static wxLuaBindEvent eventList[] = { { 0, 0, 0 }, }; count = sizeof(eventList)/sizeof(wxLuaBindEvent) - 1; return eventList; } // --------------------------------------------------------------------------- // wxLuaGetDefineList_wxlua() is called to register %define and %enum // --------------------------------------------------------------------------- wxLuaBindDefine* wxLuaGetDefineList_wxlua(size_t &count) { static wxLuaBindDefine defineList[] = { { "LUA_TBOOLEAN", LUA_TBOOLEAN }, { "LUA_TFUNCTION", LUA_TFUNCTION }, { "LUA_TLIGHTUSERDATA", LUA_TLIGHTUSERDATA }, { "LUA_TNIL", LUA_TNIL }, { "LUA_TNONE", LUA_TNONE }, { "LUA_TNUMBER", LUA_TNUMBER }, { "LUA_TSTRING", LUA_TSTRING }, { "LUA_TTABLE", LUA_TTABLE }, { "LUA_TTHREAD", LUA_TTHREAD }, { "LUA_TUSERDATA", LUA_TUSERDATA }, { "WXLUAARG_Boolean", WXLUAARG_Boolean }, { "WXLUAARG_Integer", WXLUAARG_Integer }, { "WXLUAARG_LightUserData", WXLUAARG_LightUserData }, { "WXLUAARG_LuaFunction", WXLUAARG_LuaFunction }, { "WXLUAARG_LuaTable", WXLUAARG_LuaTable }, { "WXLUAARG_LuaThread", WXLUAARG_LuaThread }, { "WXLUAARG_Nil", WXLUAARG_Nil }, { "WXLUAARG_None", WXLUAARG_None }, { "WXLUAARG_Number", WXLUAARG_Number }, { "WXLUAARG_String", WXLUAARG_String }, { "WXLUAARG_UserData", WXLUAARG_UserData }, { "WXLUAMETHOD_CFUNCTION", WXLUAMETHOD_CFUNCTION }, { "WXLUAMETHOD_CONSTRUCTOR", WXLUAMETHOD_CONSTRUCTOR }, { "WXLUAMETHOD_DELETE", WXLUAMETHOD_DELETE }, { "WXLUAMETHOD_GETPROP", WXLUAMETHOD_GETPROP }, { "WXLUAMETHOD_METHOD", WXLUAMETHOD_METHOD }, { "WXLUAMETHOD_OVERLOAD", WXLUAMETHOD_OVERLOAD }, { "WXLUAMETHOD_OVERLOAD_BASE", WXLUAMETHOD_OVERLOAD_BASE }, { "WXLUAMETHOD_SETPROP", WXLUAMETHOD_SETPROP }, { "WXLUAMETHOD_STATIC", WXLUAMETHOD_STATIC }, { "wxLUAOBJECT_ARRAYINT", wxLUAOBJECT_ARRAYINT }, { "wxLUAOBJECT_BOOL", wxLUAOBJECT_BOOL }, { "wxLUAOBJECT_INT", wxLUAOBJECT_INT }, { "wxLUAOBJECT_NONE", wxLUAOBJECT_NONE }, { "wxLUAOBJECT_STRING", wxLUAOBJECT_STRING }, { 0, 0 }, }; count = sizeof(defineList)/sizeof(wxLuaBindDefine) - 1; return defineList; } // --------------------------------------------------------------------------- // wxLuaGetStringList_wxlua() is called to register %define %string // --------------------------------------------------------------------------- wxLuaBindString* wxLuaGetStringList_wxlua(size_t &count) { static wxLuaBindString stringList[] = { { 0, 0 }, }; count = sizeof(stringList)/sizeof(wxLuaBindString) - 1; return stringList; } // --------------------------------------------------------------------------- // wxLuaGetObjectList_wxlua() is called to register object and pointer bindings // --------------------------------------------------------------------------- wxLuaBindObject* wxLuaGetObjectList_wxlua(size_t &count) { static wxLuaBindObject objectList[] = { { 0, 0, 0, 0 }, }; count = sizeof(objectList)/sizeof(wxLuaBindObject) - 1; return objectList; } // --------------------------------------------------------------------------- // wxLuaGetFunctionList_wxlua() is called to register global functions // --------------------------------------------------------------------------- static wxLuaArgTag s_wxluatagArray_wxLua_function_CompileLuaScript[] = { &s_wxluaarg_String, &s_wxluaarg_String, NULL }; // %override wxLua_function_CompileLuaScript // %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) static int LUACALL wxLua_function_CompileLuaScript(lua_State *L) { wxLuaState wxlState(L); int returns; // const wxString fileName const wxString fileName = wxlState.GetwxStringType(2); // const wxString luaScript const wxString luaScript = wxlState.GetwxStringType(1); wxString errMsg; int line_num = -1; wxLuaState wxlState2(true); // create a brand new empty lua state to compile in returns = wxlState2.CompileString(luaScript, fileName, &errMsg, &line_num); // push the result number lua_pushnumber(L, returns); wxlState.lua_PushString(errMsg); lua_pushnumber(L, line_num); return 3; } static wxLuaBindCFunc s_wxluafunc_wxLua_function_CompileLuaScript[1] = {{ wxLua_function_CompileLuaScript, WXLUAMETHOD_CFUNCTION, 2, 2, s_wxluatagArray_wxLua_function_CompileLuaScript }}; static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_iswxluatype[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; // %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) static int LUACALL wxLua_function_wxlua_iswxluatype(lua_State *L) { int returns; // int wxluaarg_tag int wxluaarg_tag = (int)wxlua_getnumbertype(L, 2); // int luatype int luatype = (int)wxlua_getnumbertype(L, 1); // call wxlua_iswxluatype returns = wxlua_iswxluatype(luatype, wxluaarg_tag); // push the result number lua_pushnumber(L, returns); return 1; } static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_iswxluatype[1] = {{ wxLua_function_wxlua_iswxluatype, WXLUAMETHOD_CFUNCTION, 2, 2, s_wxluatagArray_wxLua_function_wxlua_iswxluatype }}; static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_type[] = { &s_wxluaarg_LightUserData, NULL }; // %override wxLua_function_wxlua_type // %function int wxlua_wxluatype(int wxluaarg_tag) static int LUACALL wxLua_function_wxlua_type(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag int wxluaarg_tag = wxlua_ttag(L, 1); if (wxluaarg_tag == TLUA_NOTAG) { int ltype = lua_type(L, 1); wxluaarg_tag = wxlua_getwxluatype(ltype); } // push the result number lua_pushnumber(L, wxluaarg_tag); return 1; } static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_type[1] = {{ wxLua_function_wxlua_type, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_wxlua_type }}; static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_typename[] = { &s_wxluaarg_Number, NULL }; // %override wxLua_function_wxlua_typename // %function wxString wxlua_getwxluatypename(int wxluaarg_tag) static int LUACALL wxLua_function_wxlua_typename(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); // call wxlua_getwxluatypename returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); // push the result string wxlState.lua_PushString(returns); return 1; } static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_typename[1] = {{ wxLua_function_wxlua_typename, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_wxlua_typename }}; // --------------------------------------------------------------------------- // wxLuaGetFunctionList_wxlua() is called to register global functions // --------------------------------------------------------------------------- wxLuaBindMethod* wxLuaGetFunctionList_wxlua(size_t &count) { static wxLuaBindMethod functionList[] = { { "CompileLuaScript", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_CompileLuaScript, 1, NULL }, { "wxlua_iswxluatype", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_iswxluatype, 1, NULL }, { "wxlua_type", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_type, 1, NULL }, { "wxlua_typename", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_typename, 1, NULL }, { 0, 0, 0, 0 }, }; count = sizeof(functionList)/sizeof(wxLuaBindMethod) - 1; return functionList; } // --------------------------------------------------------------------------- // wxLuaGetClassList_wxlua() is called to register classes // --------------------------------------------------------------------------- wxLuaBindClass* wxLuaGetClassList_wxlua(size_t &count) { static wxLuaBindClass classList[] = { { "wxLuaObject", wxLuaObject_methods, wxLuaObject_methodCount, CLASSINFO(wxLuaObject), &s_wxluatag_wxLuaObject, "wxObject", NULL ,s_wxluadefineArray_None, 0, }, { "wxLuaState", wxLuaState_methods, wxLuaState_methodCount, CLASSINFO(wxLuaState), &s_wxluatag_wxLuaState, "wxObject", NULL ,s_wxluadefineArray_None, 0, }, { 0, 0, 0, 0, 0, 0, 0 }, }; count = sizeof(classList)/sizeof(wxLuaBindClass) - 1; return classList; } // --------------------------------------------------------------------------- // wxLuaBinding_wxlua() - the binding class // --------------------------------------------------------------------------- // binding class extern wxLuaBindClass *wxLuaGetClassList_wxlua(size_t &count); extern wxLuaBindDefine *wxLuaGetDefineList_wxlua(size_t &count); extern wxLuaBindString *wxLuaGetStringList_wxlua(size_t &count); extern wxLuaBindEvent *wxLuaGetEventList_wxlua(size_t &count); extern wxLuaBindObject *wxLuaGetObjectList_wxlua(size_t &count); extern wxLuaBindMethod *wxLuaGetFunctionList_wxlua(size_t &count); IMPLEMENT_DYNAMIC_CLASS(wxLuaBinding_wxlua, wxLuaBinding) wxLuaBinding_wxlua::wxLuaBinding_wxlua() : wxLuaBinding() { m_bindingName = wxT("wxlua"); m_nameSpace = wxT("wxlua"); m_classArray = wxLuaGetClassList_wxlua(m_classCount); m_defineArray = wxLuaGetDefineList_wxlua(m_defineCount); m_stringArray = wxLuaGetStringList_wxlua(m_stringCount); m_eventArray = wxLuaGetEventList_wxlua(m_eventCount); m_objectArray = wxLuaGetObjectList_wxlua(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxlua(m_functionCount); InitBinding(); } void wxLuaBinding_wxlua::PreRegister(const wxLuaState& , bool , int ) { } void wxLuaBinding_wxlua::PostRegister(const wxLuaState& , bool , int ) { } // bind wxLuaBinding_wxlua to a single wxLuaState bool wxLuaBinding_wxlua_bind(const wxLuaState& wxlState_) { wxLuaState wxlState(wxlState_); wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); wxASSERT(!wxlState.GetLuaStateData()->m_bindings_registered); wxASSERT(!wxlState.GetLuaBinding(wxT("wxlua"))); // ignore binding request when we already have wxlua registered if (wxlState.GetLuaBinding(wxT("wxlua"))) return false; wxlState.GetLuaStateData()->m_bindingList.Append(new wxLuaBinding_wxlua()); return true; } // initialize wxLuaBinding_wxlua for all wxLuaStates bool wxLuaBinding_wxlua_init() { static wxLuaBinding_wxlua m_binding; wxLuaBindingList::compatibility_iterator node = wxLuaBinding::GetBindingList()->Find(&m_binding); if (node && (node->GetData() == &m_binding)) return false; wxLuaBinding::GetBindingList()->Append(&m_binding); return true; } |
From: John L. <jr...@us...> - 2007-06-14 01:23:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxluasocket_bind.h 13 Jun 2007 00:09:04 -0000 1.21 --- wxluasocket_bind.h 14 Jun 2007 01:23:20 -0000 1.22 *************** *** 27,33 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 12 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 12 // --------------------------------------------------------------------------- --- 27,33 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 13 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 13 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-14 01:23:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxbindstc/src Modified Files: stc.cpp wxstc_bind.cpp Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/wxstc_bind.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxstc_bind.cpp 12 Jun 2007 05:03:17 -0000 1.25 --- wxstc_bind.cpp 14 Jun 2007 01:23:19 -0000 1.26 *************** *** 1526,1530 **** { m_bindingName = wxT("wxstc"); ! m_nameSpace = wxT("wx"); m_classArray = wxLuaGetClassList_wxstc(m_classCount); m_defineArray = wxLuaGetDefineList_wxstc(m_defineCount); --- 1526,1530 ---- { m_bindingName = wxT("wxstc"); ! m_nameSpace = wxT("wxstc"); m_classArray = wxLuaGetClassList_wxstc(m_classCount); m_defineArray = wxLuaGetDefineList_wxstc(m_defineCount); Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** stc.cpp 13 Jun 2007 00:09:03 -0000 1.39 --- stc.cpp 14 Jun 2007 01:23:19 -0000 1.40 *************** *** 8559,8578 **** int s_wxluatag_wxStyledTextEvent = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxStyledTextEvent_Delete[] = { &s_wxluatag_wxStyledTextEvent, NULL }; - static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxStyledTextEvent_Delete[1] = {{ wxLua_wxStyledTextEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxStyledTextEvent_Delete }}; - static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); - // 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_wxStyledTextEvent_GetAlt[] = { &s_wxluatag_wxStyledTextEvent, NULL }; static int LUACALL wxLua_wxStyledTextEvent_GetAlt(lua_State *L); --- 8559,8562 ---- *************** *** 9337,9340 **** --- 9321,9340 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxStyledTextEvent_delete[] = { &s_wxluatag_wxStyledTextEvent, NULL }; + static int LUACALL wxLua_wxStyledTextEvent_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxStyledTextEvent_delete[1] = {{ wxLua_wxStyledTextEvent_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxStyledTextEvent_delete }}; + static int LUACALL wxLua_wxStyledTextEvent_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); + // 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_wxStyledTextEvent_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxStyledTextEvent_constructor(lua_State *L); *************** *** 9366,9370 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxStyledTextEvent_methods[] = { - { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxStyledTextEvent_Delete, 1, NULL }, { "GetAlt", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_GetAlt, 1, NULL }, { "GetControl", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_GetControl, 1, NULL }, --- 9366,9369 ---- *************** *** 9418,9421 **** --- 9417,9421 ---- { "SetX", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_SetX, 1, NULL }, { "SetY", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStyledTextEvent_SetY, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxStyledTextEvent_delete, 1, NULL }, { "wxStyledTextEvent", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxStyledTextEvent_constructor, 1, NULL }, { 0, 0, 0, 0 }, |
From: John L. <jr...@us...> - 2007-06-14 01:23:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/modules/wxlua/include Modified Files: wxldefs.h Added Files: wxlua_bind.h Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxldefs.h 13 Jun 2007 00:09:04 -0000 1.24 --- wxldefs.h 14 Jun 2007 01:23:19 -0000 1.25 *************** *** 67,71 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 12 // ---------------------------------------------------------------------------- --- 67,71 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 13 // ---------------------------------------------------------------------------- --- NEW FILE: wxlua_bind.h --- // --------------------------------------------------------------------------- // wxlua.h - headers and tags for wxLua binding // // This file was generated by genwxbind.lua // Any changes made to this file may be lost when file is regenerated // --------------------------------------------------------------------------- #ifndef __HOOK_WXLUA_wxlua_H__ #define __HOOK_WXLUA_wxlua_H__ #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlbind.h" // --------------------------------------------------------------------------- // Check if the version of binding generator used to create this is older than // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' #if WXLUA_BINDING_VERSION > 13 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." #endif //WXLUA_BINDING_VERSION > 13 // --------------------------------------------------------------------------- // binding class class wxLuaBinding_wxlua : public wxLuaBinding { public: wxLuaBinding_wxlua(); virtual wxLuaBinding* Clone() const { return new wxLuaBinding_wxlua; } protected: virtual void PreRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable); virtual void PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable); DECLARE_DYNAMIC_CLASS(wxLuaBinding_wxlua) }; // bind wxLuaBinding_wxlua to a single wxLuaState extern WXDLLIMPEXP_WXLUA bool wxLuaBinding_wxlua_bind(const wxLuaState& wxlState); // initialize wxLuaBinding_wxlua for all wxLuaStates extern WXDLLIMPEXP_WXLUA bool wxLuaBinding_wxlua_init(); // --------------------------------------------------------------------------- // Includes // --------------------------------------------------------------------------- #include "wxlua/include/wxlstate.h" // --------------------------------------------------------------------------- // Lua Tag Method Values and Tables for each Class // --------------------------------------------------------------------------- extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluatag_wxLuaObject; extern WXDLLIMPEXP_WXLUA wxLuaBindMethod wxLuaObject_methods[]; extern WXDLLIMPEXP_DATA_WXLUA(int) wxLuaObject_methodCount; extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluatag_wxLuaState; extern WXDLLIMPEXP_WXLUA wxLuaBindMethod wxLuaState_methods[]; extern WXDLLIMPEXP_DATA_WXLUA(int) wxLuaState_methodCount; // --------------------------------------------------------------------------- // Encapsulation Declarations - need to be public for other bindings. // --------------------------------------------------------------------------- #endif // __HOOK_WXLUA_wxlua_H__ |
From: John L. <jr...@us...> - 2007-06-14 01:23:12
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings/wxlua Added Files: Makefile override.hpp wxlua.i wxlua_rules.lua Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. --- NEW FILE: Makefile --- # # File: makefile.unx # Author: John Labenski, J Winwood # Created: 2002 # Updated: # Copyright: (c) 2002. J Winwood # # # Makefile for generating the bindings WXLUA_DIR = ../.. all: genwxbind genwxbind: @(cd $(WXLUA_DIR)/bindings && ../bin/lua -e"rulesFilename=\"wxlua/wxlua_rules.lua\"" genwxbind.lua > wxlua/error.txt) # do nothing to clean clean: --- NEW FILE: override.hpp --- // ---------------------------------------------------------------------------- // Overridden functions for the wxLua binding for wxLua // // Please keep these functions in the same order as the .i file and in the // same order as the listing of the functions in that file. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Overrides for wxlua.i // ---------------------------------------------------------------------------- %override wxLua_function_CompileLuaScript // %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) static int LUACALL wxLua_function_CompileLuaScript(lua_State *L) { wxLuaState wxlState(L); int returns; // const wxString fileName const wxString fileName = wxlState.GetwxStringType(2); // const wxString luaScript const wxString luaScript = wxlState.GetwxStringType(1); wxString errMsg; int line_num = -1; wxLuaState wxlState2(true); // create a brand new empty lua state to compile in returns = wxlState2.CompileString(luaScript, fileName, &errMsg, &line_num); // push the result number lua_pushnumber(L, returns); wxlState.lua_PushString(errMsg); lua_pushnumber(L, line_num); return 3; } %end %override wxLua_function_wxlua_typename // %function wxString wxlua_getwxluatypename(int wxluaarg_tag) static int LUACALL wxLua_function_wxlua_typename(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); // call wxlua_getwxluatypename returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); // push the result string wxlState.lua_PushString(returns); return 1; } %end %override wxLua_function_wxlua_type // %function int wxlua_wxluatype(int wxluaarg_tag) static int LUACALL wxLua_function_wxlua_type(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag int wxluaarg_tag = wxlua_ttag(L, 1); if (wxluaarg_tag == TLUA_NOTAG) { int ltype = lua_type(L, 1); wxluaarg_tag = wxlua_getwxluatype(ltype); } // push the result number lua_pushnumber(L, wxluaarg_tag); return 1; } %end %override wxLua_wxLuaObject_constructor // wxLuaObject(void *object) static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxLuaObject *returns; // call constructor returns = new wxLuaObject(wxlState, 1); // add to tracked memory list wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); // return the number of parameters return 1; } %end %override wxLua_wxLuaObject_SetObject // void SetObject(void *object) static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) { wxLuaState wxlState(L); // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call SetObject self->SetObject(1); // return the number of parameters return 0; } %end %override wxLua_wxLuaObject_GetObject // void *GetObject() const static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) { wxLuaState wxlState(L); // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); // call GetObject that push the item onto the stack, or nil if (self->GetObject()) return 1; return 0; } %end --- NEW FILE: wxlua.i --- // ============================================================================ // Purpose: wxLua specific wrappers // Author: J Winwood, John Labenski // Created: 14/11/2001 // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence // wxWidgets: Updated to 2.6.3 // ============================================================================ // Compile the luaScript of the given name and return the lua error code, a message // and the line number (or -1) of the error. // %override [int return, lua_string err_msg, int line_number] CompileLuaScript(const wxString& luaScript, const wxString& fileName) %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) //----------------------------------------------------------------------------- // Type information about the bindings or current userdata %enum wxLuaMethod_Type // The type of a Lua method WXLUAMETHOD_CONSTRUCTOR // constructor WXLUAMETHOD_METHOD // class member function WXLUAMETHOD_CFUNCTION // global C function (not part of a class) WXLUAMETHOD_GETPROP // Get %property funcName, read WXLUAMETHOD_SETPROP // Set %property funcName, write WXLUAMETHOD_STATIC // Class member function is static WXLUAMETHOD_OVERLOAD // This is an overload function that will call others // and the min/maxargs for it are not valid, // but are the min and max of all functions WXLUAMETHOD_DELETE // This is the delete function that wxLua has generated // to delete this class and is not part of the // original class. WXLUAMETHOD_OVERLOAD_BASE // Class method has been checked to see if it is // overloaded from the base class. // Check WXLUAMETHOD::basemethod and if !NULL // this method is an overload from the base class %endenum %define WXLUAARG_None %define WXLUAARG_Nil %define WXLUAARG_Boolean %define WXLUAARG_LightUserData %define WXLUAARG_Number %define WXLUAARG_String %define WXLUAARG_LuaTable %define WXLUAARG_LuaFunction %define WXLUAARG_UserData %define WXLUAARG_LuaThread %define WXLUAARG_Integer %define LUA_TNONE // (-1) %define LUA_TNIL // 0 %define LUA_TBOOLEAN // 1 %define LUA_TLIGHTUSERDATA // 2 %define LUA_TNUMBER // 3 %define LUA_TSTRING // 4 %define LUA_TTABLE // 5 %define LUA_TFUNCTION // 6 %define LUA_TUSERDATA // 7 %define LUA_TTHREAD // 8 // Is this lua_type() (or in lua type()) considered %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) // %override wxString wxlua_typename(int wxluaarg_tag) // C++ Func: wxString wxlua_getwxluatypename(int wxluaarg_tag) // Returns the tag name for both the predefined (negative) as well as the // binding class tags. (C function only does predefined tags) %function wxString wxlua_typename(int wxluaarg_tag) // %override int wxlua_type(void* object) // Get the wxlua type (tag) of the object, this is the arg tags number %function int wxlua_type(void* object) //----------------------------------------------------------------------------- // wxLuaBinding - This is NOT wrapped, but implemented in wxlbind.cpp // These items follow the structure below and ALL items are called as if they // were table members. // Example : wxLuaBinding_wx.GetClassCount // Example : print(wxLuaBinding_wx.GetClassArray[1].methods[1].name) // Note: Use only '.' and NO () to make it a function call, also check to see // if the item exists first (unlike the example above)! /* %class wxLuaBinding_XXX - where XXX is the name of the binding // No constructor as this is read only wxString GetBindingName wxString GetLuaNamespace int GetClassCount int GetDefineCount int GetStringCount int GetEventCount int GetObjectCount int GetFunctionCount {wxLuaBindClass*} GetClassArray {wxLuaBindMethod*} GetFunctionArray {name, value} GetDefineArray {name, value} GetStringArray {name, eventType, class_tag} GetEventArray {name, object, class_tag} GetObjectArray %endclass %class wxLuaBindClass // No constructor as this is read only wxString name {wxLuaBindMethod*} methods int methods_n wxClassInfo* classInfo int class_tag wxString baseclassName wxLuaBindClass* baseclass {name, value} enums int enums_n %endclass %class wxLuaBindMethod // No constructor as this is read only wxString name int type {wxLuaBindCFunc*} funcs int funcs_n wxLuaBindMethod* basemethod wxLuaBindClass* class // class this is part of (not in struct) wxString class_name // class name this is part of (not in struct) %endclass %class wxLuaBindCFunc // No constructor as this is read only cfunction func int type int minargs int maxargs {int} argtags wxString class_name // added, not in struct %endclass */ //----------------------------------------------------------------------------- // wxLuaState %include "wxlua/include/wxlstate.h" %class %delete wxLuaState, wxObject /* wxLuaState(bool create = false) wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) bool Ok() const void Destroy() bool CloseLuaState(bool force) bool IsClosing() const wxEventType GetInEventType() const void SetEventHandler(wxEvtHandler *evtHandler) wxEvtHandler *GetEventHandler() const void SetId(wxWindowID id) wxWindowID GetId() const void SendEvent( wxLuaEvent &event ) const int RunFile(const wxString &fileName) int RunString(const wxString &script, const wxString& name = "") bool IsRunning() const wxString GetLuaTagName(int tag) const */ %endclass //----------------------------------------------------------------------------- // wxLuaObject - Allows Lua data items to be used for client data. %enum wxLuaObject_Type wxLUAOBJECT_NONE wxLUAOBJECT_BOOL wxLUAOBJECT_INT wxLUAOBJECT_STRING wxLUAOBJECT_ARRAYINT %endenum %class %delete wxLuaObject, wxObject // %override wxLuaObject(any value type) // C++ Func: wxLuaObject(const wxLuaState& wxlState, int stack_idx = 1) // Wrap the single value passed in with a wxLuaObject wxLuaObject() // %override void wxLuaObject::SetObject(any value type) // C++ Func: void SetObject(int stack_idx = 1) // Discard the old reference and create a new one for the item passed in void SetObject() // %override [any value type] wxLuaObject::GetObject() // C++ Func: bool GetObject() // get the object, note C++ returns bool, in lua it "returns" the referenced object void GetObject() const // These are not useful in lua //bool *GetBoolPtr(); //int *GetIntPtr(); //wxString *GetStringPtr(); //wxArrayInt *GetArrayPtr(); int GetAllocationFlags() const bool HasAllocationFlag(wxLuaObject_Type flag) //int SetAllocationFlag(wxLuaObject_Type flag, bool set) // NOT for use in lua %endclass --- NEW FILE: wxlua_rules.lua --- ------------------------------------------------------------------------------- -- Rules to build the wxLua binding for wxLua -- load using : $lua -e"rulesFilename=\"rules.lua\"" genwxbind.lua ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Set the root directory of the wxLua distribution, used only in this file wxlua_dir = "../" --============================================================================= -- Set the lua namespace (lua table) that the bindings will be placed into. -- eg. wx.wxWindow(...) hook_lua_namespace = "wxlua" -- Set the C++ "namespace" that the bindings will be placed. -- eg. cpp function names contain this to prevent duplicate function names hook_cpp_namespace = "wxlua" --============================================================================= -- Set the directory to output the bindings to, both C++ header and source files output_cpp_header_filepath = wxlua_dir.."modules/wxlua/include" output_cpp_filepath = wxlua_dir.."modules/wxlua/src" --============================================================================= -- Set the DLLIMPEXP macros for compiling these bindings into a DLL -- Use "WXLUA_NO_DLLIMPEXP" and "WXLUA_NO_DLLIMPEXP_DATA" for no IMPEXP macros output_cpp_impexpsymbol = "WXDLLIMPEXP_WXLUA" output_cpp_impexpdatasymbol = "WXDLLIMPEXP_DATA_WXLUA" ------------------------------------------------------------------------------- -- Set the name of the header file that will have the #includes from the -- bindings in it. This will be used as #include "hook_cpp_header_filename" in -- the C++ wrapper files, so it must include the proper #include path. hook_cpp_header_filename = "wxlua/include/wxlua_bind.h" ------------------------------------------------------------------------------- -- Set the name of the main binding file that will have the glue code for the -- bindings in it. This file along with the output from the *.i files will be -- placed in the "output_cpp_filepath". hook_cpp_binding_filename = hook_cpp_namespace.."_bind.cpp" ------------------------------------------------------------------------------- -- Set the name of the subclassed wxLuaBinding class hook_cpp_binding_classname = "wxLuaBinding_"..hook_cpp_namespace ------------------------------------------------------------------------------- -- Set the function names that wrap the output structs of defined values, -- objects, events, functions, and classes. hook_cpp_define_funcname = "wxLuaGetDefineList_"..hook_cpp_namespace hook_cpp_string_funcname = "wxLuaGetStringList_"..hook_cpp_namespace hook_cpp_object_funcname = "wxLuaGetObjectList_"..hook_cpp_namespace hook_cpp_event_funcname = "wxLuaGetEventList_"..hook_cpp_namespace hook_cpp_function_funcname = "wxLuaGetFunctionList_"..hook_cpp_namespace hook_cpp_class_funcname = "wxLuaGetClassList_"..hook_cpp_namespace ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim at the top of -- every generated cpp file or "" for none hook_cpp_binding_includes = "" ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim below the -- #includes of every generated cpp file or "" for none -- X.h defines Above and Below as numbers, undef them for wx/layout.h hook_cpp_binding_post_includes = "#ifdef Above\n #undef Above\n#endif\n".. "#ifdef Below\n #undef Below\n#endif\n" ------------------------------------------------------------------------------- -- Add additional include information or C++ code for the binding header file, -- hook_cpp_header_filename. -- This code will be place directly after any #includes at the top of the file --hook_cpp_binding_header_includes = ------------------------------------------------------------------------------- -- Set any #includes or other C++ code to be placed verbatim at the top of -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = nil --============================================================================= -- Set the bindings directory that contains the *.i interface files interface_filepath = wxlua_dir.."bindings/wxlua" ------------------------------------------------------------------------------- -- A list of interface files to use to make the bindings. These files will be -- converted into *.cpp and placed in the output_cpp_filepath directory. -- The files are loaded from the interface_filepath. interface_fileTable = { "wxlua.i", } ------------------------------------------------------------------------------- -- A list of files that contain bindings that need to be overridden or empty -- table {} for none. -- The files are loaded from the interface_filepath. override_fileTable = { "override.hpp" } --============================================================================= -- A table containing filenames of XXX_datatype.lua from other wrappers to -- to define classes and data types used in this wrapper -- NOTE: for the base wxWidgets wrappers we don't load the cache since they -- don't depend on other wrappers and can cause problems when interface -- files are updated. Make sure you delete or have updated any cache file -- that changes any data types used by this binding. datatype_cache_input_fileTable = { wxlua_dir.."bindings/wxwidgets/wx_datatypes.lua" } ------------------------------------------------------------------------------- -- The file to output the data type cache for later use with a binding that -- makes use of data types (classes, enums, etc) that are declared in this -- binding. The file will be generated in the interface_filepath. datatypes_cache_output_filename = hook_cpp_namespace.."_datatypes.lua" --============================================================================= -- virtual void wxLuaBinding::PreRegister function body for the -- hook_cpp_binding_classname. You can initialize data here. -- Typically this is not necessary and you can rem this out. --wxLuaBinding_PreRegister = --============================================================================= -- virtual void wxLuaBinding::PostRegister function body for the -- hook_cpp_binding_classname. You can load any other custom bindings here. -- Typically this is not necessary and you can rem this out. --wxLuaBinding_PostRegister = --============================================================================= -- Add additional conditions here -- example: conditions["DOXYGEN_INCLUDE"] = "defined(DOXYGEN_INCLUDE)" ------------------------------------------------------------------------------- -- Add additional data types here -- example: AllocDataType("wxArrayInt", "class",false) --============================================================================= -- Generate comments into binding C++ code comment_cpp_binding_code = true |
From: John L. <jr...@us...> - 2007-06-14 00:33:16
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28123/wxlua Log Message: Directory /cvsroot/wxlua/wxLua/bindings/wxlua added to the repository |
From: John L. <jr...@us...> - 2007-06-13 04:15:59
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/docs Modified Files: wxluaref.html Log Message: Remove class member functions that are duplicates of their baseclass functions Fix wxClassInfo is NOT a wxObject Add more capability to bindings.wx.lua Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxluaref.html 11 Jun 2007 03:57:59 -0000 1.21 --- wxluaref.html 13 Jun 2007 04:15:22 -0000 1.22 *************** *** 952,956 **** <a href="#wxFrame">wxFrame</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const <a href="#wxString">wxString</a>& name = "wxFrame")<br> <br> ! void Centre(int direction = wxBOTH)<br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const <a href="#wxString">wxString</a>& name = "wxFrame")<br> virtual <a href="#wxStatusBar">wxStatusBar</a>* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const <a href="#wxString">wxString</a>& name = "wxStatusBar")<br> --- 952,956 ---- <a href="#wxFrame">wxFrame</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const <a href="#wxString">wxString</a>& name = "wxFrame")<br> <br> ! // void Centre(int direction = wxBOTH) - see <a href="#wxWindow">wxWindow</a><br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const <a href="#wxString">wxString</a>& name = "wxFrame")<br> virtual <a href="#wxStatusBar">wxStatusBar</a>* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const <a href="#wxString">wxString</a>& name = "wxStatusBar")<br> *************** *** 2246,2250 **** //void RefreshItems(long itemFrom, long itemTo)<br> bool ScrollList(int dx, int dy)<br> ! void SetBackgroundColour(const <a href="#wxColour">wxColour</a>& col)<br> bool SetColumn(int col, <a href="#wxListItem">wxListItem</a>& item)<br> bool SetColumnWidth(int col, int width)<br> --- 2246,2250 ---- //void RefreshItems(long itemFrom, long itemTo)<br> bool ScrollList(int dx, int dy)<br> ! //void SetBackgroundColour(const <a href="#wxColour">wxColour</a>& col) - see <a href="#wxWindow">wxWindow</a><br> bool SetColumn(int col, <a href="#wxListItem">wxListItem</a>& item)<br> bool SetColumnWidth(int col, int width)<br> *************** *** 2263,2267 **** void SetSingleStyle(long style, const bool add = true)<br> void SetTextColour(const <a href="#wxColour">wxColour</a>& col)<br> ! void SetWindowStyleFlag(long style)<br> <br> <br> --- 2263,2267 ---- void SetSingleStyle(long style, const bool add = true)<br> void SetTextColour(const <a href="#wxColour">wxColour</a>& col)<br> ! //void SetWindowStyleFlag(long style) - see <a href="#wxWindow">wxWindow</a><br> <br> <br> *************** *** 2422,2430 **** <a href="#wxRadioBox">wxRadioBox</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& point = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, const <a href="#wxArrayString">wxArrayString</a>& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxRadioBox")<br> <br> ! // these are marked deprecated in 2.6, use wxControl::Get/SetLabel/String<br> ! //<a href="#wxString">wxString</a> GetLabel() const<br> ! //void SetLabel(const <a href="#wxString">wxString</a>& label)<br> ! //<a href="#wxString">wxString</a> GetLabel(int n) const<br> ! //void SetLabel(int n, const <a href="#wxString">wxString</a>& label)<br> <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& point = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, const <a href="#wxArrayString">wxArrayString</a>& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxRadioBox")<br> --- 2422,2430 ---- <a href="#wxRadioBox">wxRadioBox</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& point = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, const <a href="#wxArrayString">wxArrayString</a>& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxRadioBox")<br> <br> ! // these are marked deprecated in 2.6, use wxWindow::Get/SetLabel and Get/SetString below<br> ! // <a href="#wxString">wxString</a> GetLabel() const - see <a href="#wxWindow">wxWindow</a><br> ! // void SetLabel(const <a href="#wxString">wxString</a>& label) - see <a href="#wxWindow">wxWindow</a><br> ! // <a href="#wxString">wxString</a> GetLabel(int n) const<br> ! // void SetLabel(int n, const <a href="#wxString">wxString</a>& label)<br> <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& point = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, const <a href="#wxArrayString">wxArrayString</a>& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxRadioBox")<br> *************** *** 2912,2916 **** void SetItemTextColour(const <a href="#wxTreeItemId">wxTreeItemId</a>& item, const <a href="#wxColour">wxColour</a>& col)<br> void SetStateImageList(<a href="#wxImageList">wxImageList</a>* imageList)<br> ! void SetWindowStyle(long styles)<br> void SortChildren(const <a href="#wxTreeItemId">wxTreeItemId</a>& item)<br> void Toggle(const <a href="#wxTreeItemId">wxTreeItemId</a>& item)<br> --- 2912,2916 ---- void SetItemTextColour(const <a href="#wxTreeItemId">wxTreeItemId</a>& item, const <a href="#wxColour">wxColour</a>& col)<br> void SetStateImageList(<a href="#wxImageList">wxImageList</a>* imageList)<br> ! // void SetWindowStyle(long styles) - see <a href="#wxWindow">wxWindow</a><br> void SortChildren(const <a href="#wxTreeItemId">wxTreeItemId</a>& item)<br> void Toggle(const <a href="#wxTreeItemId">wxTreeItemId</a>& item)<br> *************** *** 3149,3152 **** --- 3149,3153 ---- <a href="#wxObjectRefData">wxObjectRefData</a>* GetRefData() const<br> bool IsKindOf(<a href="#wxClassInfo">wxClassInfo</a> *info)<br> + bool IsSameAs(const <a href="#wxObject">wxObject</a>& o) const<br> void Ref(const <a href="#wxObject">wxObject</a>& clone)<br> void SetRefData(<a href="#wxObjectRefData">wxObjectRefData</a>* data)<br> *************** *** 3167,3171 **** <i>%include</i> "wx/object.h"<br> <br> ! <font color=#AA0000><font size=+1><i>%class</i> <i>%noclassinfo</i> <b><a name="wxClassInfo">wxClassInfo</a></b>, <a href="#wxObject">wxObject</a></font></font><blockquote> <font color=#CC3300> // <i>%override</i> <a href="#wxClassInfo">wxClassInfo</a>() constructor creates an instance using wxClassInfo::FindClass</font><br> <a href="#wxClassInfo">wxClassInfo</a>(const <a href="#wxString">wxString</a> &name)<br> --- 3168,3172 ---- <i>%include</i> "wx/object.h"<br> <br> ! <font color=#AA0000><font size=+1><i>%class</i> <i>%noclassinfo</i> <b><a name="wxClassInfo">wxClassInfo</a></b></font></font><blockquote> <font color=#CC3300> // <i>%override</i> <a href="#wxClassInfo">wxClassInfo</a>() constructor creates an instance using wxClassInfo::FindClass</font><br> <a href="#wxClassInfo">wxClassInfo</a>(const <a href="#wxString">wxString</a> &name)<br> *************** *** 3175,3181 **** --- 3176,3189 ---- <a href="#wxString">wxString</a> GetBaseClassName1() const<br> <a href="#wxString">wxString</a> GetBaseClassName2() const<br> + const <a href="#wxClassInfo">wxClassInfo</a> *GetBaseClass1() const<br> + const <a href="#wxClassInfo">wxClassInfo</a> *GetBaseClass2() const<br> <a href="#wxString">wxString</a> GetClassName() const<br> int GetSize() const<br> + bool IsDynamic()<br> bool IsKindOf(<a href="#wxClassInfo">wxClassInfo</a>* info)<br> + <br> + static const <a href="#wxClassInfo">wxClassInfo</a> *GetFirst()<br> + const <a href="#wxClassInfo">wxClassInfo</a> *GetNext() const<br> + <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 3324,3327 **** --- 3332,3352 ---- void SetData(<a href="#wxObject">wxObject</a> *data)<br> //int IndexOf() - unfortunately a protected member of wxNodeBase<br> + <br> + // To convert <a href="#wxObject">wxObject</a>* GetData() to another type use wxObject::DynamicCast<br> + // See <a href="#wxPenList">wxPenList</a>, <a href="#wxBrushList">wxBrushList</a>, <a href="#wxMenuItemList">wxMenuItemList</a>, <a href="#wxWindowList">wxWindowList</a><br> + <br> + // Example: How to use a <a href="#wxWindowList">wxWindowList</a><br> + // frame = wx.<a href="#wxFrame">wxFrame</a>(wx.NULL, wx.wxID_ANY, "Test");<br> + // win = wx.<a href="#wxWindow">wxWindow</a>(frame, wx.wxID_ANY)<br> + // frame:Show(true)<br> + // wlist = frame:GetChildren()<br> + // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED)<br> + <br> + // Example: How to use a <a href="#wxMenuItemList">wxMenuItemList</a><br> + // local fileMenu = wx.<a href="#wxMenu">wxMenu</a>()<br> + // fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program")<br> + // mList = fileMenu:GetMenuItems()<br> + // print(mList:GetCount(), mList:GetFirst():GetData():DynamicCast("wxMenuItem"):GetLabel())<br> + <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 3412,3415 **** --- 3437,3441 ---- <font color=#AA0000><font size=+1><i>%class</i> <i>%delete</i> <i>%noclassinfo</i> <i>%encapsulate</i> <b><a name="wxSortedArrayString">wxSortedArrayString</a></b>, <a href="#wxArrayString">wxArrayString</a></font></font><blockquote> <a href="#wxSortedArrayString">wxSortedArrayString</a>()<br> + <a href="#wxSortedArrayString">wxSortedArrayString</a>(const <a href="#wxArrayString">wxArrayString</a>& src) // have to have this constructor since they're not derived<br> <a href="#wxSortedArrayString">wxSortedArrayString</a>(const <a href="#wxSortedArrayString">wxSortedArrayString</a>& src)<br> <br> *************** *** 5170,5174 **** <a href="#wxDialog">wxDialog</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const <a href="#wxString">wxString</a>& name = "wxDialog")<br> <br> ! void Centre(int direction = wxBOTH)<br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const <a href="#wxString">wxString</a>& name = "wxDialog")<br> wxUSE_BUTTON <a href="#wxSizer">wxSizer</a>* CreateButtonSizer(long flags)<br> --- 5196,5200 ---- <a href="#wxDialog">wxDialog</a>(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const <a href="#wxString">wxString</a>& name = "wxDialog")<br> <br> ! //void Centre(int direction = wxBOTH) - see <a href="#wxWindow">wxWindow</a><br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& title, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const <a href="#wxString">wxString</a>& name = "wxDialog")<br> wxUSE_BUTTON <a href="#wxSizer">wxSizer</a>* CreateButtonSizer(long flags)<br> *************** *** 5180,5184 **** // int GetAffirmativeId() const - pocketpc only<br> int GetReturnCode()<br> ! <a href="#wxString">wxString</a> GetTitle() const<br> //void Iconize(bool iconize) - in wxToplevelWindow<br> //bool IsIconized() const - in wxToplevelWindow<br> --- 5206,5210 ---- // int GetAffirmativeId() const - pocketpc only<br> int GetReturnCode()<br> ! // <a href="#wxString">wxString</a> GetTitle() const - see wxToplevelWindow<br> //void Iconize(bool iconize) - in wxToplevelWindow<br> //bool IsIconized() const - in wxToplevelWindow<br> *************** *** 5189,5193 **** void SetReturnCode(int retCode)<br> // void SetTitle(const <a href="#wxString">wxString</a>& title) - in wxToplevelWindow<br> ! bool Show(const bool show)<br> int ShowModal()<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> --- 5215,5219 ---- void SetReturnCode(int retCode)<br> // void SetTitle(const <a href="#wxString">wxString</a>& title) - in wxToplevelWindow<br> ! // bool Show(const bool show) - see <a href="#wxWindow">wxWindow</a><br> int ShowModal()<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> *************** *** 7921,7924 **** --- 7947,7953 ---- //void RemovePen(<a href="#wxPen">wxPen</a> *pen)<br> <a href="#wxPen">wxPen</a>* FindOrCreatePen(const <a href="#wxColour">wxColour</a>& colour, int width, int style)<br> + <br> + // Use the <a href="#wxList">wxList</a> methods, see also <a href="#wxNode">wxNode</a><br> + <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 7972,7975 **** --- 8001,8007 ---- //void RemoveBrush(<a href="#wxBrush">wxBrush</a> *brush)<br> <a href="#wxBrush">wxBrush</a>* FindOrCreateBrush(const <a href="#wxColour">wxColour</a>& colour, int style)<br> + <br> + // Use the <a href="#wxList">wxList</a> methods, see also <a href="#wxNode">wxNode</a><br> + <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 8258,8262 **** <a href="#wxCursor">wxCursor</a>(const <a href="#wxImage">wxImage</a>& image)<br> <br> ! bool Ok()<br> //<i>%win</i> WXHANDLE GetHandle()<br> //<i>%win</i> void SetHandle(WXHANDLE handle)<br> --- 8290,8294 ---- <a href="#wxCursor">wxCursor</a>(const <a href="#wxImage">wxImage</a>& image)<br> <br> ! //bool Ok() - see <a href="#wxBitmap">wxBitmap</a><br> //<i>%win</i> WXHANDLE GetHandle()<br> //<i>%win</i> void SetHandle(WXHANDLE handle)<br> *************** *** 10102,10106 **** void Display(const <a href="#wxString">wxString</a>& x)<br> void Display(const int id)<br> ! void DisplayContents()<br> void DisplayIndex()<br> bool KeywordSearch(const <a href="#wxString">wxString</a>& keyword, <a href="#wxHelpSearchMode">wxHelpSearchMode</a> mode = wxHELP_SEARCH_ALL)<br> --- 10134,10138 ---- void Display(const <a href="#wxString">wxString</a>& x)<br> void Display(const int id)<br> ! //void DisplayContents() - see <a href="#wxHelpController">wxHelpController</a><br> void DisplayIndex()<br> bool KeywordSearch(const <a href="#wxString">wxString</a>& keyword, <a href="#wxHelpSearchMode">wxHelpSearchMode</a> mode = wxHELP_SEARCH_ALL)<br> *************** *** 10265,10270 **** void SetWidthFloat(const <a href="#wxHtmlTag">wxHtmlTag</a>& tag, double pixel_scale = 1.0)<br> <br> ! <i>%wxchkver_2_5</i> <a href="#wxHtmlCell">wxHtmlCell</a>* GetFirstChild()<br> ! !<i>%wxchkver_2_5</i> <a href="#wxHtmlCell">wxHtmlCell</a>* GetFirstCell()<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 10297,10302 ---- void SetWidthFloat(const <a href="#wxHtmlTag">wxHtmlTag</a>& tag, double pixel_scale = 1.0)<br> <br> ! // <i>%wxchkver_2_5</i> <a href="#wxHtmlCell">wxHtmlCell</a>* GetFirstChild() see <a href="#wxHtmlCell">wxHtmlCell</a><br> ! // !<i>%wxchkver_2_5</i> <a href="#wxHtmlCell">wxHtmlCell</a>* GetFirstCell() - nobody probably uses this<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 11072,11078 **** <a href="#wxMDIChildFrame">wxMDIChildFrame</a>* GetActiveChild() const<br> <a href="#wxMDIClientWindow">wxMDIClientWindow</a>* GetClientWindow() const<br> ! virtual <a href="#wxWindow">wxWindow</a>* GetToolBar() const<br> <i>%win</i> <a href="#wxMenu">wxMenu</a>* GetWindowMenu() const<br> ! virtual void SetToolBar(<a href="#wxToolBar">wxToolBar</a>* toolbar)<br> <i>%win</i> void SetWindowMenu(<a href="#wxMenu">wxMenu</a>* menu)<br> void Tile(<a href="#wxOrientation">wxOrientation</a> orient = wxHORIZONTAL)<br> --- 11104,11110 ---- <a href="#wxMDIChildFrame">wxMDIChildFrame</a>* GetActiveChild() const<br> <a href="#wxMDIClientWindow">wxMDIClientWindow</a>* GetClientWindow() const<br> ! // virtual <a href="#wxToolBar">wxToolBar</a>* GetToolBar() const - see <a href="#wxFrame">wxFrame</a><br> <i>%win</i> <a href="#wxMenu">wxMenu</a>* GetWindowMenu() const<br> ! // virtual void SetToolBar(<a href="#wxToolBar">wxToolBar</a>* toolbar) - see <a href="#wxFrame">wxFrame</a><br> <i>%win</i> void SetWindowMenu(<a href="#wxMenu">wxMenu</a>* menu)<br> void Tile(<a href="#wxOrientation">wxOrientation</a> orient = wxHORIZONTAL)<br> *************** *** 11540,11547 **** <br> <font color=#AA0000><font size=+1><i>%class</i> <i>%noclassinfo</i> <b><a name="wxMenuItemList">wxMenuItemList</a></b>, <a href="#wxList">wxList</a></font></font><blockquote> ! void Clear()<br> ! void DeleteContents(bool destroy)<br> ! bool DeleteObject(<a href="#wxMenuItem">wxMenuItem</a> *pMenuItem)<br> ! int GetCount() const<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 11572,11579 ---- <br> <font color=#AA0000><font size=+1><i>%class</i> <i>%noclassinfo</i> <b><a name="wxMenuItemList">wxMenuItemList</a></b>, <a href="#wxList">wxList</a></font></font><blockquote> ! // no constructor, you only get this back from wxMenu::GetMenuItems<br> ! <br> ! // Use the <a href="#wxList">wxList</a> methods, see also <a href="#wxNode">wxNode</a><br> ! <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 12936,12940 **** <br> int GetResponse() const<br> ! //<a href="#wxInputStream">wxInputStream</a> *GetInputStream(const <a href="#wxString">wxString</a>& path)<br> void SetHeader(const <a href="#wxString">wxString</a>& header, const <a href="#wxString">wxString</a>& h_data)<br> <a href="#wxString">wxString</a> GetHeader(const <a href="#wxString">wxString</a>& header)<br> --- 12968,12972 ---- <br> int GetResponse() const<br> ! // <a href="#wxInputStream">wxInputStream</a> *GetInputStream(const <a href="#wxString">wxString</a>& path) - see <a href="#wxProtocol">wxProtocol</a><br> void SetHeader(const <a href="#wxString">wxString</a>& header, const <a href="#wxString">wxString</a>& h_data)<br> <a href="#wxString">wxString</a> GetHeader(const <a href="#wxString">wxString</a>& header)<br> *************** *** 12973,12978 **** void SetPassive(bool pasv)<br> bool SetTransferMode(wxFTP::TransferMode mode)<br> ! void SetUser(const <a href="#wxString">wxString</a>& user)<br> ! void SetPassword(const <a href="#wxString">wxString</a>& passwd)<br> bool FileExists(const <a href="#wxString">wxString</a>& filename)<br> int GetFileSize(const <a href="#wxString">wxString</a>& filename)<br> --- 13005,13010 ---- void SetPassive(bool pasv)<br> bool SetTransferMode(wxFTP::TransferMode mode)<br> ! // void SetUser(const <a href="#wxString">wxString</a>& user) - see <a href="#wxProtocol">wxProtocol</a><br> ! // void SetPassword(const <a href="#wxString">wxString</a>& passwd) - see <a href="#wxProtocol">wxProtocol</a><br> bool FileExists(const <a href="#wxString">wxString</a>& filename)<br> int GetFileSize(const <a href="#wxString">wxString</a>& filename)<br> *************** *** 12980,12984 **** bool GetFilesList(<a href="#wxArrayString">wxArrayString</a>& files, const <a href="#wxString">wxString</a>& wildcard = "")<br> <a href="#wxOutputStream">wxOutputStream</a> * GetOutputStream(const <a href="#wxString">wxString</a>& file)<br> ! <a href="#wxInputStream">wxInputStream</a> * GetInputStream(const <a href="#wxString">wxString</a>& path)<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 13012,13016 ---- bool GetFilesList(<a href="#wxArrayString">wxArrayString</a>& files, const <a href="#wxString">wxString</a>& wildcard = "")<br> <a href="#wxOutputStream">wxOutputStream</a> * GetOutputStream(const <a href="#wxString">wxString</a>& file)<br> ! // <a href="#wxInputStream">wxInputStream</a> * GetInputStream(const <a href="#wxString">wxString</a>& path) - see <a href="#wxProtocol">wxProtocol</a><br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 13726,13734 **** // wxNode::GetData():DynamicCast("wxWindow") to retrieve the <a href="#wxWindow">wxWindow</a><br> <br> ! // frame = wx.<a href="#wxFrame">wxFrame</a>(wx.NULL, wx.wxID_ANY, "Test");<br> ! // win = wx.<a href="#wxWindow">wxWindow</a>(frame, wx.wxID_ANY)<br> ! // frame:Show(true)<br> ! // wlist = frame:GetChildren()<br> ! // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED)<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 13758,13763 ---- // wxNode::GetData():DynamicCast("wxWindow") to retrieve the <a href="#wxWindow">wxWindow</a><br> <br> ! // Use the <a href="#wxList">wxList</a> methods, see also <a href="#wxNode">wxNode</a><br> ! <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 13744,13748 **** bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const <a href="#wxString">wxString</a>& name = "wxPanel")<br> //!<i>%wxchkver_2_7</i> <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const - see <a href="#wxWindow">wxWindow</a><br> ! void InitDialog()<br> //!<i>%wxchkver_2_7</i> <a href="#wxWindow">wxWindow</a>* SetDefaultItem(<a href="#wxWindow">wxWindow</a> *win) - see <a href="#wxWindow">wxWindow</a><br> //virtual void SetFocus() - see <a href="#wxWindow">wxWindow</a><br> --- 13773,13777 ---- bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const <a href="#wxString">wxString</a>& name = "wxPanel")<br> //!<i>%wxchkver_2_7</i> <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const - see <a href="#wxWindow">wxWindow</a><br> ! // void InitDialog() see <a href="#wxWindow">wxWindow</a><br> //!<i>%wxchkver_2_7</i> <a href="#wxWindow">wxWindow</a>* SetDefaultItem(<a href="#wxWindow">wxWindow</a> *win) - see <a href="#wxWindow">wxWindow</a><br> //virtual void SetFocus() - see <a href="#wxWindow">wxWindow</a><br> *************** *** 13761,13766 **** bool Create(<a href="#wxWindow">wxWindow</a> *parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = 0, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxControl")<br> void Command(<a href="#wxCommandEvent">wxCommandEvent</a>& event)<br> ! !<i>%wxchkver_2_6</i> <a href="#wxString">wxString</a> GetLabel() // see <a href="#wxWindow">wxWindow</a><br> ! !<i>%wxchkver_2_6</i> void SetLabel(const <a href="#wxString">wxString</a>& label) // see <a href="#wxWindow">wxWindow</a><br> <br> //static <a href="#wxString">wxString</a> GetLabelText(const <a href="#wxString">wxString</a>& label) translates arbitrary string, removes mnemonic characters ('&')<br> --- 13790,13795 ---- bool Create(<a href="#wxWindow">wxWindow</a> *parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = 0, const <a href="#wxValidator">wxValidator</a>& validator = wxDefaultValidator, const <a href="#wxString">wxString</a>& name = "wxControl")<br> void Command(<a href="#wxCommandEvent">wxCommandEvent</a>& event)<br> ! // <a href="#wxString">wxString</a> GetLabel() // see <a href="#wxWindow">wxWindow</a><br> ! // void SetLabel(const <a href="#wxString">wxString</a>& label) // see <a href="#wxWindow">wxWindow</a><br> <br> //static <a href="#wxString">wxString</a> GetLabelText(const <a href="#wxString">wxString</a>& label) translates arbitrary string, removes mnemonic characters ('&')<br> *************** *** 14243,14251 **** void GetViewStart() const<br> <br> ! <font color=#CC3300> // <i>%override</i> [int x, int y] GetVirtualSize() const</font><br> ! // C++ Func: void GetVirtualSize(int* x, int* y) const<br> ! void GetVirtualSize() const<br> <br> ! bool IsRetained() const<br> void PrepareDC(<a href="#wxDC">wxDC</a>& dc)<br> void Scroll(int x, int y)<br> --- 14272,14280 ---- void GetViewStart() const<br> <br> ! <font color=#CC3300> //// <i>%override</i> [int x, int y] GetVirtualSize() const</font><br> ! //// C++ Func: void GetVirtualSize(int* x, int* y) const<br> ! //void GetVirtualSize() const // see wxWindow::GetVirtualSize<br> <br> ! //bool IsRetained() const // see wxWindow::IsRetained<br> void PrepareDC(<a href="#wxDC">wxDC</a>& dc)<br> void Scroll(int x, int y)<br> *************** *** 14374,14379 **** <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = 0, const <a href="#wxString">wxString</a>& name = "wxStaticText")<br> ! <a href="#wxString">wxString</a> GetLabel() const<br> ! virtual void SetLabel(const <a href="#wxString">wxString</a>& label)<br> void Wrap(int width)<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> --- 14403,14408 ---- <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxString">wxString</a>& label, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = 0, const <a href="#wxString">wxString</a>& name = "wxStaticText")<br> ! // <a href="#wxString">wxString</a> GetLabel() const - see <a href="#wxWindow">wxWindow</a><br> ! // void SetLabel(const <a href="#wxString">wxString</a>& label) - see <a href="#wxWindow">wxWindow</a><br> void Wrap(int width)<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> *************** *** 14418,14432 **** <br> <br> ! <font color=#007700><font size=+1><i>%enum</i> <a href="#wxLuaMethod_Type">wxLuaMethod_Type</a> // The type of a Lua <b><a name="method">method</a></b></font><blockquote> ! WXLUAMETHOD_CONSTRUCTOR // constructor<br> ! WXLUAMETHOD_METHOD // class member function<br> ! WXLUAMETHOD_CFUNCTION // global C function (not part of a class)<br> ! WXLUAMETHOD_GETPROP // Get <i>%property</i> funcName, read<br> ! WXLUAMETHOD_SETPROP // Set <i>%property</i> funcName, write<br> <br> ! WXLUAMETHOD_STATIC // Class member function is static<br> ! WXLUAMETHOD_OVERLOAD // This is an overload function that will call others<br> ! // and the min/maxargs for it are not valid,<br> ! // but are the min and max of all functions<br> <br> WXLUAMETHOD_OVERLOAD_BASE // Class method has been checked to see if it is<br> --- 14447,14465 ---- <br> <br> ! <font color=#007700><font size=+1><i>%enum</i> <a href="#wxLuaMethod_Type">wxLuaMethod_Type</a> // The type of a Lua <b><a name="method">method</a></b></font><blockquote> ! WXLUAMETHOD_CONSTRUCTOR // constructor<br> ! WXLUAMETHOD_METHOD // class member function<br> ! WXLUAMETHOD_CFUNCTION // global C function (not part of a class)<br> ! WXLUAMETHOD_GETPROP // Get <i>%property</i> funcName, read<br> ! WXLUAMETHOD_SETPROP // Set <i>%property</i> funcName, write<br> <br> ! WXLUAMETHOD_STATIC // Class member function is static<br> ! WXLUAMETHOD_OVERLOAD // This is an overload function that will call others<br> ! // and the min/maxargs for it are not valid,<br> ! // but are the min and max of all functions<br> ! <br> ! WXLUAMETHOD_DELETE // This is the delete function that wxLua has generated<br> ! // to delete this class and is not part of the<br> ! // original class.<br> <br> WXLUAMETHOD_OVERLOAD_BASE // Class method has been checked to see if it is<br> *************** *** 14446,14450 **** <font color=#007755><i>%define</i> WXLUAARG_UserData</font><br> <font color=#007755><i>%define</i> WXLUAARG_LuaThread</font><br> ! <font color=#007755><i>%define</i> WXLUAARG_Enum</font><br> <br> // Is this lua_type() (or in lua type()) considered<br> --- 14479,14483 ---- <font color=#007755><i>%define</i> WXLUAARG_UserData</font><br> <font color=#007755><i>%define</i> WXLUAARG_LuaThread</font><br> ! <font color=#007755><i>%define</i> WXLUAARG_Integer</font><br> <br> // Is this lua_type() (or in lua type()) considered<br> *************** *** 14470,14474 **** // Example : print(wxLuaBinding_wx.GetClassArray[1].methods[1].name)<br> // Note: Use only '.' and NO () to make it a function call, also check to see<br> ! // if the item exists first!<br> <br> /*<br> --- 14503,14507 ---- // Example : print(wxLuaBinding_wx.GetClassArray[1].methods[1].name)<br> // Note: Use only '.' and NO () to make it a function call, also check to see<br> ! // if the item exists first (unlike the example above)!<br> <br> /*<br> *************** *** 14520,14524 **** wxLuaBindMethod* basemethod<br> <br> ! <a href="#wxString">wxString</a> class_name // added, not in struct<br> <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> --- 14553,14558 ---- wxLuaBindMethod* basemethod<br> <br> ! wxLuaBindClass* class // class this is part of (not in struct)<br> ! <a href="#wxString">wxString</a> class_name // class name this is part of (not in struct)<br> <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> *************** *** 14593,14600 **** <font color=#CC3300> // <i>%override</i> [any value type] wxLuaObject::GetObject()</font><br> // C++ Func: bool GetObject()<br> ! // get the object, note C++ returns bool, this "returns" the referenced object<br> void GetObject() const<br> <br> ! // these are used to verify that things are working<br> //bool *GetBoolPtr();<br> //int *GetIntPtr();<br> --- 14627,14634 ---- <font color=#CC3300> // <i>%override</i> [any value type] wxLuaObject::GetObject()</font><br> // C++ Func: bool GetObject()<br> ! // get the object, note C++ returns bool, in lua it "returns" the referenced object<br> void GetObject() const<br> <br> ! // These are not useful in lua<br> //bool *GetBoolPtr();<br> //int *GetIntPtr();<br> *************** *** 14604,14608 **** int GetAllocationFlags() const<br> bool HasAllocationFlag(<a href="#wxLuaObject_Type">wxLuaObject_Type</a> flag)<br> ! int SetAllocationFlag(<a href="#wxLuaObject_Type">wxLuaObject_Type</a> flag, bool set)<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 14638,14642 ---- int GetAllocationFlags() const<br> bool HasAllocationFlag(<a href="#wxLuaObject_Type">wxLuaObject_Type</a> flag)<br> ! //int SetAllocationFlag(<a href="#wxLuaObject_Type">wxLuaObject_Type</a> flag, bool set) // NOT for use in lua<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 14633,14636 **** --- 14667,14674 ---- //bool OnPrintPage(int pageNum)<br> <br> + // Dummy test function to directly verify that the binding virtual functions really work.<br> + // This base class function appends "-Base" to the val string and returns it.<br> + virtual <a href="#wxString">wxString</a> TestVirtualFunctionBinding(const <a href="#wxString">wxString</a>& val) // { return val + wxT("-Base"); }<br> + <br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> |
From: John L. <jr...@us...> - 2007-06-13 04:15:58
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/bindings/wxwidgets Modified Files: appframe.i controls.i data.i dialogs.i gdi.i help.i html.i mdi.i menutool.i socket.i windows.i wx_datatypes.lua Log Message: Remove class member functions that are duplicates of their baseclass functions Fix wxClassInfo is NOT a wxObject Add more capability to bindings.wx.lua Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** wx_datatypes.lua 12 Jun 2007 00:08:36 -0000 1.65 --- wx_datatypes.lua 13 Jun 2007 04:15:22 -0000 1.66 *************** *** 521,525 **** }, wxClassInfo = { - BaseClass = "wxObject", Condition = "wxLUA_USE_wxClassInfo", DefType = "class", --- 521,524 ---- Index: mdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/mdi.i,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mdi.i 1 Jun 2007 18:19:46 -0000 1.14 --- mdi.i 13 Jun 2007 04:15:22 -0000 1.15 *************** *** 32,38 **** wxMDIChildFrame* GetActiveChild() const wxMDIClientWindow* GetClientWindow() const ! virtual wxWindow* GetToolBar() const %win wxMenu* GetWindowMenu() const ! virtual void SetToolBar(wxToolBar* toolbar) %win void SetWindowMenu(wxMenu* menu) void Tile(wxOrientation orient = wxHORIZONTAL) --- 32,38 ---- wxMDIChildFrame* GetActiveChild() const wxMDIClientWindow* GetClientWindow() const ! // virtual wxToolBar* GetToolBar() const - see wxFrame %win wxMenu* GetWindowMenu() const ! // virtual void SetToolBar(wxToolBar* toolbar) - see wxFrame %win void SetWindowMenu(wxMenu* menu) void Tile(wxOrientation orient = wxHORIZONTAL) Index: help.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/help.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** help.i 1 Jun 2007 18:19:46 -0000 1.15 --- help.i 13 Jun 2007 04:15:22 -0000 1.16 *************** *** 247,251 **** void Display(const wxString& x) void Display(const int id) ! void DisplayContents() void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) --- 247,251 ---- void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpController void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** windows.i 11 Jun 2007 03:57:59 -0000 1.38 --- windows.i 13 Jun 2007 04:15:22 -0000 1.39 *************** *** 314,322 **** // wxNode::GetData():DynamicCast("wxWindow") to retrieve the wxWindow ! // frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Test"); ! // win = wx.wxWindow(frame, wx.wxID_ANY) ! // frame:Show(true) ! // wlist = frame:GetChildren() ! // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED) %endclass --- 314,319 ---- // wxNode::GetData():DynamicCast("wxWindow") to retrieve the wxWindow ! // Use the wxList methods, see also wxNode ! %endclass *************** *** 332,336 **** bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel") //!%wxchkver_2_7 wxWindow* GetDefaultItem() const - see wxWindow ! void InitDialog() //!%wxchkver_2_7 wxWindow* SetDefaultItem(wxWindow *win) - see wxWindow //virtual void SetFocus() - see wxWindow --- 329,333 ---- bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = "wxPanel") //!%wxchkver_2_7 wxWindow* GetDefaultItem() const - see wxWindow ! // void InitDialog() see wxWindow //!%wxchkver_2_7 wxWindow* SetDefaultItem(wxWindow *win) - see wxWindow //virtual void SetFocus() - see wxWindow *************** *** 349,354 **** bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxControl") void Command(wxCommandEvent& event) ! !%wxchkver_2_6 wxString GetLabel() // see wxWindow ! !%wxchkver_2_6 void SetLabel(const wxString& label) // see wxWindow //static wxString GetLabelText(const wxString& label) translates arbitrary string, removes mnemonic characters ('&') --- 346,351 ---- bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxControl") void Command(wxCommandEvent& event) ! // wxString GetLabel() // see wxWindow ! // void SetLabel(const wxString& label) // see wxWindow //static wxString GetLabelText(const wxString& label) translates arbitrary string, removes mnemonic characters ('&') *************** *** 831,839 **** void GetViewStart() const ! // %override [int x, int y] GetVirtualSize() const ! // C++ Func: void GetVirtualSize(int* x, int* y) const ! void GetVirtualSize() const ! bool IsRetained() const void PrepareDC(wxDC& dc) void Scroll(int x, int y) --- 828,836 ---- void GetViewStart() const ! //// %override [int x, int y] GetVirtualSize() const ! //// C++ Func: void GetVirtualSize(int* x, int* y) const ! //void GetVirtualSize() const // see wxWindow::GetVirtualSize ! //bool IsRetained() const // see wxWindow::IsRetained void PrepareDC(wxDC& dc) void Scroll(int x, int y) *************** *** 962,967 **** bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText") ! wxString GetLabel() const ! virtual void SetLabel(const wxString& label) void Wrap(int width) %endclass --- 959,964 ---- bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxStaticText") ! // wxString GetLabel() const - see wxWindow ! // void SetLabel(const wxString& label) - see wxWindow void Wrap(int width) %endclass Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** gdi.i 11 Jun 2007 03:57:59 -0000 1.50 --- gdi.i 13 Jun 2007 04:15:22 -0000 1.51 *************** *** 713,716 **** --- 713,719 ---- //void RemovePen(wxPen *pen) wxPen* FindOrCreatePen(const wxColour& colour, int width, int style) + + // Use the wxList methods, see also wxNode + %endclass *************** *** 764,767 **** --- 767,773 ---- //void RemoveBrush(wxBrush *brush) wxBrush* FindOrCreateBrush(const wxColour& colour, int style) + + // Use the wxList methods, see also wxNode + %endclass *************** *** 1050,1054 **** wxCursor(const wxImage& image) ! bool Ok() //%win WXHANDLE GetHandle() //%win void SetHandle(WXHANDLE handle) --- 1056,1060 ---- wxCursor(const wxImage& image) ! //bool Ok() - see wxBitmap //%win WXHANDLE GetHandle() //%win void SetHandle(WXHANDLE handle) Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** html.i 11 Jun 2007 03:57:59 -0000 1.20 --- html.i 13 Jun 2007 04:15:22 -0000 1.21 *************** *** 148,153 **** void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) ! %wxchkver_2_5 wxHtmlCell* GetFirstChild() ! !%wxchkver_2_5 wxHtmlCell* GetFirstCell() %endclass --- 148,153 ---- void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) ! // %wxchkver_2_5 wxHtmlCell* GetFirstChild() see wxHtmlCell ! // !%wxchkver_2_5 wxHtmlCell* GetFirstCell() - nobody probably uses this %endclass Index: socket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/socket.i,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** socket.i 11 Jun 2007 03:57:59 -0000 1.14 --- socket.i 13 Jun 2007 04:15:22 -0000 1.15 *************** *** 241,245 **** int GetResponse() const ! //wxInputStream *GetInputStream(const wxString& path) void SetHeader(const wxString& header, const wxString& h_data) wxString GetHeader(const wxString& header) --- 241,245 ---- int GetResponse() const ! // wxInputStream *GetInputStream(const wxString& path) - see wxProtocol void SetHeader(const wxString& header, const wxString& h_data) wxString GetHeader(const wxString& header) *************** *** 278,283 **** void SetPassive(bool pasv) bool SetTransferMode(wxFTP::TransferMode mode) ! void SetUser(const wxString& user) ! void SetPassword(const wxString& passwd) bool FileExists(const wxString& filename) int GetFileSize(const wxString& filename) --- 278,283 ---- void SetPassive(bool pasv) bool SetTransferMode(wxFTP::TransferMode mode) ! // void SetUser(const wxString& user) - see wxProtocol ! // void SetPassword(const wxString& passwd) - see wxProtocol bool FileExists(const wxString& filename) int GetFileSize(const wxString& filename) *************** *** 285,289 **** bool GetFilesList(wxArrayString& files, const wxString& wildcard = "") wxOutputStream * GetOutputStream(const wxString& file) ! wxInputStream * GetInputStream(const wxString& path) %endclass --- 285,289 ---- bool GetFilesList(wxArrayString& files, const wxString& wildcard = "") wxOutputStream * GetOutputStream(const wxString& file) ! // wxInputStream * GetInputStream(const wxString& path) - see wxProtocol %endclass Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** menutool.i 11 Jun 2007 03:57:59 -0000 1.18 --- menutool.i 13 Jun 2007 04:15:22 -0000 1.19 *************** *** 156,163 **** %class %noclassinfo wxMenuItemList, wxList ! void Clear() ! void DeleteContents(bool destroy) ! bool DeleteObject(wxMenuItem *pMenuItem) ! int GetCount() const %endclass --- 156,163 ---- %class %noclassinfo wxMenuItemList, wxList ! // no constructor, you only get this back from wxMenu::GetMenuItems ! ! // Use the wxList methods, see also wxNode ! %endclass Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** controls.i 11 Jun 2007 03:57:58 -0000 1.37 --- controls.i 13 Jun 2007 04:15:22 -0000 1.38 *************** *** 430,434 **** //void RefreshItems(long itemFrom, long itemTo) bool ScrollList(int dx, int dy) ! void SetBackgroundColour(const wxColour& col) bool SetColumn(int col, wxListItem& item) bool SetColumnWidth(int col, int width) --- 430,434 ---- //void RefreshItems(long itemFrom, long itemTo) bool ScrollList(int dx, int dy) ! //void SetBackgroundColour(const wxColour& col) - see wxWindow bool SetColumn(int col, wxListItem& item) bool SetColumnWidth(int col, int width) *************** *** 447,451 **** void SetSingleStyle(long style, const bool add = true) void SetTextColour(const wxColour& col) ! void SetWindowStyleFlag(long style) --- 447,451 ---- void SetSingleStyle(long style, const bool add = true) void SetTextColour(const wxColour& col) ! //void SetWindowStyleFlag(long style) - see wxWindow *************** *** 606,614 **** wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") ! // these are marked deprecated in 2.6, use wxControl::Get/SetLabel/String ! //wxString GetLabel() const ! //void SetLabel(const wxString& label) ! //wxString GetLabel(int n) const ! //void SetLabel(int n, const wxString& label) bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") --- 606,614 ---- wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") ! // these are marked deprecated in 2.6, use wxWindow::Get/SetLabel and Get/SetString below ! // wxString GetLabel() const - see wxWindow ! // void SetLabel(const wxString& label) - see wxWindow ! // wxString GetLabel(int n) const ! // void SetLabel(int n, const wxString& label) bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxRadioBox") *************** *** 1096,1100 **** void SetItemTextColour(const wxTreeItemId& item, const wxColour& col) void SetStateImageList(wxImageList* imageList) ! void SetWindowStyle(long styles) void SortChildren(const wxTreeItemId& item) void Toggle(const wxTreeItemId& item) --- 1096,1100 ---- void SetItemTextColour(const wxTreeItemId& item, const wxColour& col) void SetStateImageList(wxImageList* imageList) ! // void SetWindowStyle(long styles) - see wxWindow void SortChildren(const wxTreeItemId& item) void Toggle(const wxTreeItemId& item) Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** appframe.i 11 Jun 2007 03:57:58 -0000 1.36 --- appframe.i 13 Jun 2007 04:15:22 -0000 1.37 *************** *** 270,274 **** wxFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") ! void Centre(int direction = wxBOTH) bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const wxString& name = "wxStatusBar") --- 270,274 ---- wxFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "wxFrame") ! // 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_FRAME_STYLE, const wxString& name = "wxFrame") virtual wxStatusBar* CreateStatusBar(int number = 1, long style = 0, wxWindowID id = wxID_ANY, const wxString& name = "wxStatusBar") Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** data.i 12 Jun 2007 00:08:36 -0000 1.30 --- data.i 13 Jun 2007 04:15:22 -0000 1.31 *************** *** 63,66 **** --- 63,67 ---- wxObjectRefData* GetRefData() const bool IsKindOf(wxClassInfo *info) + bool IsSameAs(const wxObject& o) const void Ref(const wxObject& clone) void SetRefData(wxObjectRefData* data) *************** *** 81,85 **** %include "wx/object.h" ! %class %noclassinfo wxClassInfo, wxObject // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) --- 82,86 ---- %include "wx/object.h" ! %class %noclassinfo wxClassInfo // %override wxClassInfo() constructor creates an instance using wxClassInfo::FindClass wxClassInfo(const wxString &name) *************** *** 89,95 **** --- 90,103 ---- wxString GetBaseClassName1() const wxString GetBaseClassName2() const + const wxClassInfo *GetBaseClass1() const + const wxClassInfo *GetBaseClass2() const wxString GetClassName() const int GetSize() const + bool IsDynamic() bool IsKindOf(wxClassInfo* info) + + static const wxClassInfo *GetFirst() + const wxClassInfo *GetNext() const + %endclass *************** *** 238,241 **** --- 246,266 ---- void SetData(wxObject *data) //int IndexOf() - unfortunately a protected member of wxNodeBase + + // To convert wxObject* GetData() to another type use wxObject::DynamicCast + // See wxPenList, wxBrushList, wxMenuItemList, wxWindowList + + // Example: How to use a wxWindowList + // frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "Test"); + // win = wx.wxWindow(frame, wx.wxID_ANY) + // frame:Show(true) + // wlist = frame:GetChildren() + // wlist:Item(0):GetData():DynamicCast("wxWindow"):SetBackgroundColour(wx.wxRED) + + // Example: How to use a wxMenuItemList + // local fileMenu = wx.wxMenu() + // fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") + // mList = fileMenu:GetMenuItems() + // print(mList:GetCount(), mList:GetFirst():GetData():DynamicCast("wxMenuItem"):GetLabel()) + %endclass Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** dialogs.i 11 Jun 2007 03:57:58 -0000 1.31 --- dialogs.i 13 Jun 2007 04:15:22 -0000 1.32 *************** *** 95,99 **** 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) 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) --- 95,99 ---- 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) *************** *** 105,109 **** // int GetAffirmativeId() const - pocketpc only int GetReturnCode() ! wxString GetTitle() const //void Iconize(bool iconize) - in wxToplevelWindow //bool IsIconized() const - in wxToplevelWindow --- 105,109 ---- // int GetAffirmativeId() const - pocketpc only int GetReturnCode() ! // wxString GetTitle() const - see wxToplevelWindow //void Iconize(bool iconize) - in wxToplevelWindow //bool IsIconized() const - in wxToplevelWindow *************** *** 114,118 **** void SetReturnCode(int retCode) // void SetTitle(const wxString& title) - in wxToplevelWindow ! bool Show(const bool show) int ShowModal() %endclass --- 114,118 ---- void SetReturnCode(int retCode) // void SetTitle(const wxString& title) - in wxToplevelWindow ! // bool Show(const bool show) - see wxWindow int ShowModal() %endclass |