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-13 04:15:57
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/bindings Modified Files: genwxbind.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: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** genwxbind.lua 13 Jun 2007 00:08:57 -0000 1.120 --- genwxbind.lua 13 Jun 2007 04:15:21 -0000 1.121 *************** *** 3813,3816 **** --- 3813,3817 ---- for i = 1, #sortedBindings[n] do local condition = sortedBindings[n][i].Condition + --[[ -- FIXME implement duplicate entries check |
From: John L. <jr...@us...> - 2007-06-13 04:15:57
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/bindings/wxstc Modified Files: wxstc_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: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** wxstc_datatypes.lua 12 Jun 2007 00:08:36 -0000 1.55 --- wxstc_datatypes.lua 13 Jun 2007 04:15:21 -0000 1.56 *************** *** 521,525 **** }, wxClassInfo = { - BaseClass = "wxObject", Condition = "wxLUA_USE_wxClassInfo", DefType = "class", --- 521,524 ---- |
From: John L. <jr...@us...> - 2007-06-13 04:15:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/modules/wxbind/src Modified Files: appframe.cpp controls.cpp data.cpp dialogs.cpp gdi.cpp help.cpp html.cpp mdi.cpp menutool.cpp socket.cpp windows.cpp wx_bind.cpp 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: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** controls.cpp 13 Jun 2007 00:08:58 -0000 1.62 --- controls.cpp 13 Jun 2007 04:15:23 -0000 1.63 *************** *** 4061,4085 **** } - - #if (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SetBackgroundColour[] = { &s_wxluatag_wxListCtrl, &s_wxluatag_wxColour, NULL }; - static int LUACALL wxLua_wxListCtrl_SetBackgroundColour(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxListCtrl_SetBackgroundColour[1] = {{ wxLua_wxListCtrl_SetBackgroundColour, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxListCtrl_SetBackgroundColour }}; - // void SetBackgroundColour(const wxColour& col) - static int LUACALL wxLua_wxListCtrl_SetBackgroundColour(lua_State *L) - { - wxLuaState wxlState(L); - // const wxColour col - const wxColour * col = (const wxColour *)wxlState.GetUserDataType(2, s_wxluatag_wxColour); - // get this - wxListCtrl * self = (wxListCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxListCtrl); - // call SetBackgroundColour - self->SetBackgroundColour(*col); - - return 0; - } - - #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SetColumn[] = { &s_wxluatag_wxListCtrl, &s_wxluaarg_Number, &s_wxluatag_wxListItem, NULL }; static int LUACALL wxLua_wxListCtrl_SetColumn(lua_State *L); --- 4061,4064 ---- *************** *** 4422,4442 **** #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SetWindowStyleFlag[] = { &s_wxluatag_wxListCtrl, &s_wxluaarg_Number, NULL }; - static int LUACALL wxLua_wxListCtrl_SetWindowStyleFlag(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxListCtrl_SetWindowStyleFlag[1] = {{ wxLua_wxListCtrl_SetWindowStyleFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxListCtrl_SetWindowStyleFlag }}; - // void SetWindowStyleFlag(long style) - static int LUACALL wxLua_wxListCtrl_SetWindowStyleFlag(lua_State *L) - { - wxLuaState wxlState(L); - // long style - long style = (long)wxlua_getnumbertype(L, 2); - // get this - wxListCtrl * self = (wxListCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxListCtrl); - // call SetWindowStyleFlag - self->SetWindowStyleFlag(style); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SortItems[] = { &s_wxluatag_wxListCtrl, &s_wxluaarg_LuaFunction, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxListCtrl_SortItems(lua_State *L); --- 4401,4404 ---- *************** *** 4771,4779 **** { "ScrollList", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_ScrollList, 1, NULL }, - - #if (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - { "SetBackgroundColour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_SetBackgroundColour, 1, NULL }, - #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - { "SetColumn", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_SetColumn, 1, NULL }, { "SetColumnWidth", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_SetColumnWidth, 1, NULL }, --- 4733,4736 ---- *************** *** 4812,4816 **** #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) - { "SetWindowStyleFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_SetWindowStyleFlag, 1, NULL }, { "SortItems", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListCtrl_SortItems, 1, NULL }, --- 4769,4772 ---- *************** *** 11643,11663 **** #endif // (wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL) && (wxLUA_USE_wxImageList) - static wxLuaArgTag s_wxluatagArray_wxLua_wxTreeCtrl_SetWindowStyle[] = { &s_wxluatag_wxTreeCtrl, &s_wxluaarg_Number, NULL }; - static int LUACALL wxLua_wxTreeCtrl_SetWindowStyle(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxTreeCtrl_SetWindowStyle[1] = {{ wxLua_wxTreeCtrl_SetWindowStyle, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxTreeCtrl_SetWindowStyle }}; - // void SetWindowStyle(long styles) - static int LUACALL wxLua_wxTreeCtrl_SetWindowStyle(lua_State *L) - { - wxLuaState wxlState(L); - // long styles - long styles = (long)wxlua_getnumbertype(L, 2); - // get this - wxTreeCtrl * self = (wxTreeCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxTreeCtrl); - // call SetWindowStyle - self->SetWindowStyle(styles); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxTreeCtrl_SortChildren[] = { &s_wxluatag_wxTreeCtrl, &s_wxluatag_wxTreeItemId, NULL }; static int LUACALL wxLua_wxTreeCtrl_SortChildren(lua_State *L); --- 11599,11602 ---- *************** *** 11988,11992 **** #endif // (wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL) && (wxLUA_USE_wxImageList) - { "SetWindowStyle", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTreeCtrl_SetWindowStyle, 1, NULL }, { "SortChildren", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTreeCtrl_SortChildren, 1, NULL }, { "Toggle", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTreeCtrl_Toggle, 1, NULL }, --- 11927,11930 ---- Index: data.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/data.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** data.cpp 13 Jun 2007 00:08:58 -0000 1.49 --- data.cpp 13 Jun 2007 04:15:24 -0000 1.50 *************** *** 314,317 **** --- 314,337 ---- #endif // (wxLUA_USE_wxObject) && (wxLUA_USE_wxClassInfo) + static wxLuaArgTag s_wxluatagArray_wxLua_wxObject_IsSameAs[] = { &s_wxluatag_wxObject, &s_wxluatag_wxObject, NULL }; + static int LUACALL wxLua_wxObject_IsSameAs(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxObject_IsSameAs[1] = {{ wxLua_wxObject_IsSameAs, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxObject_IsSameAs }}; + // bool IsSameAs(const wxObject& o) const + static int LUACALL wxLua_wxObject_IsSameAs(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxObject o + const wxObject * o = (const wxObject *)wxlState.GetUserDataType(2, s_wxluatag_wxObject); + // get this + wxObject * self = (wxObject *)wxlState.GetUserDataType(1, s_wxluatag_wxObject); + // call IsSameAs + returns = self->IsSameAs(*o); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxObject_Ref[] = { &s_wxluatag_wxObject, &s_wxluatag_wxObject, NULL }; static int LUACALL wxLua_wxObject_Ref(lua_State *L); *************** *** 399,402 **** --- 419,423 ---- #endif // (wxLUA_USE_wxObject) && (wxLUA_USE_wxClassInfo) + { "IsSameAs", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_IsSameAs, 1, NULL }, { "Ref", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_Ref, 1, NULL }, { "SetRefData", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_SetRefData, 1, NULL }, *************** *** 500,503 **** --- 521,560 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_GetBaseClass1[] = { &s_wxluatag_wxClassInfo, NULL }; + static int LUACALL wxLua_wxClassInfo_GetBaseClass1(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxClassInfo_GetBaseClass1[1] = {{ wxLua_wxClassInfo_GetBaseClass1, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxClassInfo_GetBaseClass1 }}; + // const wxClassInfo *GetBaseClass1() const + static int LUACALL wxLua_wxClassInfo_GetBaseClass1(lua_State *L) + { + wxLuaState wxlState(L); + const wxClassInfo *returns; + // get this + wxClassInfo * self = (wxClassInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxClassInfo); + // call GetBaseClass1 + returns = (const wxClassInfo *)self->GetBaseClass1(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxClassInfo, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_GetBaseClass2[] = { &s_wxluatag_wxClassInfo, NULL }; + static int LUACALL wxLua_wxClassInfo_GetBaseClass2(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxClassInfo_GetBaseClass2[1] = {{ wxLua_wxClassInfo_GetBaseClass2, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxClassInfo_GetBaseClass2 }}; + // const wxClassInfo *GetBaseClass2() const + static int LUACALL wxLua_wxClassInfo_GetBaseClass2(lua_State *L) + { + wxLuaState wxlState(L); + const wxClassInfo *returns; + // get this + wxClassInfo * self = (wxClassInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxClassInfo); + // call GetBaseClass2 + returns = (const wxClassInfo *)self->GetBaseClass2(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxClassInfo, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_GetBaseClassName1[] = { &s_wxluatag_wxClassInfo, NULL }; static int LUACALL wxLua_wxClassInfo_GetBaseClassName1(lua_State *L); *************** *** 554,557 **** --- 611,647 ---- } + static int LUACALL wxLua_wxClassInfo_GetFirst(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxClassInfo_GetFirst[1] = {{ wxLua_wxClassInfo_GetFirst, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, s_wxluaargArray_None }}; + // static const wxClassInfo *GetFirst() + static int LUACALL wxLua_wxClassInfo_GetFirst(lua_State *L) + { + wxLuaState wxlState(L); + const wxClassInfo *returns; + // call GetFirst + returns = (const wxClassInfo *)wxClassInfo::GetFirst(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxClassInfo, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_GetNext[] = { &s_wxluatag_wxClassInfo, NULL }; + static int LUACALL wxLua_wxClassInfo_GetNext(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxClassInfo_GetNext[1] = {{ wxLua_wxClassInfo_GetNext, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxClassInfo_GetNext }}; + // const wxClassInfo *GetNext() const + static int LUACALL wxLua_wxClassInfo_GetNext(lua_State *L) + { + wxLuaState wxlState(L); + const wxClassInfo *returns; + // get this + wxClassInfo * self = (wxClassInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxClassInfo); + // call GetNext + returns = (const wxClassInfo *)self->GetNext(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxClassInfo, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_GetSize[] = { &s_wxluatag_wxClassInfo, NULL }; static int LUACALL wxLua_wxClassInfo_GetSize(lua_State *L); *************** *** 572,575 **** --- 662,683 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_IsDynamic[] = { &s_wxluatag_wxClassInfo, NULL }; + static int LUACALL wxLua_wxClassInfo_IsDynamic(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxClassInfo_IsDynamic[1] = {{ wxLua_wxClassInfo_IsDynamic, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxClassInfo_IsDynamic }}; + // bool IsDynamic() + static int LUACALL wxLua_wxClassInfo_IsDynamic(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxClassInfo * self = (wxClassInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxClassInfo); + // call IsDynamic + returns = self->IsDynamic(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxClassInfo_IsKindOf[] = { &s_wxluatag_wxClassInfo, &s_wxluatag_wxClassInfo, NULL }; static int LUACALL wxLua_wxClassInfo_IsKindOf(lua_State *L); *************** *** 623,630 **** --- 731,743 ---- { "FindClass", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxClassInfo_FindClass, 1, NULL }, + { "GetBaseClass1", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetBaseClass1, 1, NULL }, + { "GetBaseClass2", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetBaseClass2, 1, NULL }, { "GetBaseClassName1", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetBaseClassName1, 1, NULL }, { "GetBaseClassName2", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetBaseClassName2, 1, NULL }, { "GetClassName", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetClassName, 1, NULL }, + { "GetFirst", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxClassInfo_GetFirst, 1, NULL }, + { "GetNext", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetNext, 1, NULL }, { "GetSize", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_GetSize, 1, NULL }, + { "IsDynamic", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_IsDynamic, 1, NULL }, { "IsKindOf", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxClassInfo_IsKindOf, 1, NULL }, { "wxClassInfo", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxClassInfo_constructor, 1, NULL }, Index: help.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/help.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** help.cpp 13 Jun 2007 00:09:01 -0000 1.38 --- help.cpp 13 Jun 2007 04:15:26 -0000 1.39 *************** *** 1278,1296 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlHelpController_DisplayContents[] = { &s_wxluatag_wxHtmlHelpController, NULL }; - static int LUACALL wxLua_wxHtmlHelpController_DisplayContents(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlHelpController_DisplayContents[1] = {{ wxLua_wxHtmlHelpController_DisplayContents, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxHtmlHelpController_DisplayContents }}; - // void DisplayContents() - static int LUACALL wxLua_wxHtmlHelpController_DisplayContents(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxHtmlHelpController * self = (wxHtmlHelpController *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlHelpController); - // call DisplayContents - self->DisplayContents(); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlHelpController_DisplayIndex[] = { &s_wxluatag_wxHtmlHelpController, NULL }; static int LUACALL wxLua_wxHtmlHelpController_DisplayIndex(lua_State *L); --- 1278,1281 ---- *************** *** 1521,1525 **** #endif // ((wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)) - { "DisplayContents", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlHelpController_DisplayContents, 1, NULL }, { "DisplayIndex", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlHelpController_DisplayIndex, 1, NULL }, --- 1506,1509 ---- Index: socket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/socket.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** socket.cpp 13 Jun 2007 00:09:02 -0000 1.41 --- socket.cpp 13 Jun 2007 04:15:27 -0000 1.42 *************** *** 1941,1967 **** #endif // (wxLUA_USE_wxArrayString) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - #if (wxUSE_STREAMS) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxFTP_GetInputStream[] = { &s_wxluatag_wxFTP, &s_wxluaarg_String, NULL }; - static int LUACALL wxLua_wxFTP_GetInputStream(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxFTP_GetInputStream[1] = {{ wxLua_wxFTP_GetInputStream, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxFTP_GetInputStream }}; - // wxInputStream * GetInputStream(const wxString& path) - static int LUACALL wxLua_wxFTP_GetInputStream(lua_State *L) - { - wxLuaState wxlState(L); - wxInputStream *returns; - // const wxString path - const wxString path = wxlState.GetwxStringType(2); - // get this - wxFTP * self = (wxFTP *)wxlState.GetUserDataType(1, s_wxluatag_wxFTP); - // call GetInputStream - returns = (wxInputStream *)self->GetInputStream(path); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxInputStream, returns); - - return 1; - } - - #endif // (wxUSE_STREAMS) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxFTP_GetLastResult[] = { &s_wxluatag_wxFTP, NULL }; static int LUACALL wxLua_wxFTP_GetLastResult(lua_State *L); --- 1941,1944 ---- *************** *** 2179,2199 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxFTP_SetPassword[] = { &s_wxluatag_wxFTP, &s_wxluaarg_String, NULL }; - static int LUACALL wxLua_wxFTP_SetPassword(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxFTP_SetPassword[1] = {{ wxLua_wxFTP_SetPassword, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxFTP_SetPassword }}; - // void SetPassword(const wxString& passwd) - static int LUACALL wxLua_wxFTP_SetPassword(lua_State *L) - { - wxLuaState wxlState(L); - // const wxString passwd - const wxString passwd = wxlState.GetwxStringType(2); - // get this - wxFTP * self = (wxFTP *)wxlState.GetUserDataType(1, s_wxluatag_wxFTP); - // call SetPassword - self->SetPassword(passwd); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxFTP_SetTransferMode[] = { &s_wxluatag_wxFTP, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFTP_SetTransferMode(lua_State *L); --- 2156,2159 ---- *************** *** 2216,2236 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxFTP_SetUser[] = { &s_wxluatag_wxFTP, &s_wxluaarg_String, NULL }; - static int LUACALL wxLua_wxFTP_SetUser(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxFTP_SetUser[1] = {{ wxLua_wxFTP_SetUser, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxFTP_SetUser }}; - // void SetUser(const wxString& user) - static int LUACALL wxLua_wxFTP_SetUser(lua_State *L) - { - wxLuaState wxlState(L); - // const wxString user - const wxString user = wxlState.GetwxStringType(2); - // get this - wxFTP * self = (wxFTP *)wxlState.GetUserDataType(1, s_wxluatag_wxFTP); - // call SetUser - self->SetUser(user); - - return 0; - } - static int LUACALL wxLua_wxFTP_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFTP_constructor[1] = {{ wxLua_wxFTP_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; --- 2176,2179 ---- *************** *** 2271,2278 **** #endif // (wxLUA_USE_wxArrayString) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - #if (wxUSE_STREAMS) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - { "GetInputStream", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_GetInputStream, 1, NULL }, - #endif // (wxUSE_STREAMS) && ((wxUSE_PROTOCOL_FTP) && (wxLUA_USE_wxSocket && wxUSE_SOCKETS)) - { "GetLastResult", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_GetLastResult, 1, NULL }, --- 2214,2217 ---- *************** *** 2290,2296 **** { "SetBinary", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_SetBinary, 1, NULL }, { "SetPassive", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_SetPassive, 1, NULL }, - { "SetPassword", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_SetPassword, 1, NULL }, { "SetTransferMode", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_SetTransferMode, 1, NULL }, - { "SetUser", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFTP_SetUser, 1, NULL }, { "wxFTP", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxFTP_constructor, 1, NULL }, --- 2229,2233 ---- Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** dialogs.cpp 13 Jun 2007 00:08:59 -0000 1.44 --- dialogs.cpp 13 Jun 2007 04:15:24 -0000 1.45 *************** *** 35,58 **** int s_wxluatag_wxDialog = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_Centre[] = { &s_wxluatag_wxDialog, &s_wxluaarg_Number, NULL }; - static int LUACALL wxLua_wxDialog_Centre(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_Centre[1] = {{ wxLua_wxDialog_Centre, WXLUAMETHOD_METHOD, 1, 2, s_wxluatagArray_wxLua_wxDialog_Centre }}; - // void Centre(int direction = wxBOTH) - static int LUACALL wxLua_wxDialog_Centre(lua_State *L) - { - wxLuaState wxlState(L); - // get number of arguments - int argCount = lua_gettop(L); - // int direction = wxBOTH - int direction = (argCount >= 2 ? (int)wxlua_getnumbertype(L, 2) : wxBOTH); - // get this - wxDialog * self = (wxDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDialog); - // call Centre - self->Centre(direction); - - return 0; - } - - #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDialog) static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_Create[] = { &s_wxluatag_wxDialog, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, NULL }; --- 35,38 ---- *************** *** 219,240 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_GetTitle[] = { &s_wxluatag_wxDialog, NULL }; - static int LUACALL wxLua_wxDialog_GetTitle(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_GetTitle[1] = {{ wxLua_wxDialog_GetTitle, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxDialog_GetTitle }}; - // wxString GetTitle() const - static int LUACALL wxLua_wxDialog_GetTitle(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // get this - wxDialog * self = (wxDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDialog); - // call GetTitle - returns = self->GetTitle(); - // push the result string - wxlState.lua_PushString(returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_IsModal[] = { &s_wxluatag_wxDialog, NULL }; static int LUACALL wxLua_wxDialog_IsModal(lua_State *L); --- 199,202 ---- *************** *** 272,295 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_Show[] = { &s_wxluatag_wxDialog, &s_wxluaarg_Boolean, NULL }; - static int LUACALL wxLua_wxDialog_Show(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_Show[1] = {{ wxLua_wxDialog_Show, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxDialog_Show }}; - // bool Show(const bool show) - static int LUACALL wxLua_wxDialog_Show(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // const bool show - const bool show = wxlua_getbooleantype(L, 2); - // get this - wxDialog * self = (wxDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDialog); - // call Show - returns = self->Show(show); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxDialog_ShowModal[] = { &s_wxluatag_wxDialog, NULL }; static int LUACALL wxLua_wxDialog_ShowModal(lua_State *L); --- 234,237 ---- *************** *** 395,400 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDialog_methods[] = { - { "Centre", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_Centre, 1, NULL }, - #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDialog) { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_Create, 1, NULL }, --- 337,340 ---- *************** *** 419,426 **** { "EndModal", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_EndModal, 1, NULL }, { "GetReturnCode", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_GetReturnCode, 1, NULL }, - { "GetTitle", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_GetTitle, 1, NULL }, { "IsModal", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_IsModal, 1, NULL }, { "SetReturnCode", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_SetReturnCode, 1, NULL }, - { "Show", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_Show, 1, NULL }, { "ShowModal", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDialog_ShowModal, 1, NULL }, --- 359,364 ---- Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** appframe.cpp 13 Jun 2007 00:08:58 -0000 1.50 --- appframe.cpp 13 Jun 2007 04:15:23 -0000 1.51 *************** *** 1608,1631 **** int s_wxluatag_wxFrame = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxFrame_Centre[] = { &s_wxluatag_wxFrame, &s_wxluaarg_Number, NULL }; - static int LUACALL wxLua_wxFrame_Centre(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxFrame_Centre[1] = {{ wxLua_wxFrame_Centre, WXLUAMETHOD_METHOD, 1, 2, s_wxluatagArray_wxLua_wxFrame_Centre }}; - // void Centre(int direction = wxBOTH) - static int LUACALL wxLua_wxFrame_Centre(lua_State *L) - { - wxLuaState wxlState(L); - // get number of arguments - int argCount = lua_gettop(L); - // int direction = wxBOTH - int direction = (argCount >= 2 ? (int)wxlua_getnumbertype(L, 2) : wxBOTH); - // get this - wxFrame * self = (wxFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxFrame); - // call Centre - self->Centre(direction); - - return 0; - } - - #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxPointSizeRect) static wxLuaArgTag s_wxluatagArray_wxLua_wxFrame_Create[] = { &s_wxluatag_wxFrame, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, NULL }; --- 1608,1611 ---- *************** *** 2067,2072 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxFrame_methods[] = { - { "Centre", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFrame_Centre, 1, NULL }, - #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxPointSizeRect) { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFrame_Create, 1, NULL }, --- 2047,2050 ---- Index: windows.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/windows.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** windows.cpp 13 Jun 2007 00:09:02 -0000 1.57 --- windows.cpp 13 Jun 2007 04:15:27 -0000 1.58 *************** *** 4734,4752 **** #endif // wxLUA_USE_wxPointSizeRect - static wxLuaArgTag s_wxluatagArray_wxLua_wxPanel_InitDialog[] = { &s_wxluatag_wxPanel, NULL }; - static int LUACALL wxLua_wxPanel_InitDialog(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxPanel_InitDialog[1] = {{ wxLua_wxPanel_InitDialog, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxPanel_InitDialog }}; - // void InitDialog() - static int LUACALL wxLua_wxPanel_InitDialog(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxPanel * self = (wxPanel *)wxlState.GetUserDataType(1, s_wxluatag_wxPanel); - // call InitDialog - self->InitDialog(); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxPanel_SetFocusIgnoringChildren[] = { &s_wxluatag_wxPanel, NULL }; static int LUACALL wxLua_wxPanel_SetFocusIgnoringChildren(lua_State *L); --- 4734,4737 ---- *************** *** 4850,4854 **** #endif // wxLUA_USE_wxPointSizeRect - { "InitDialog", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPanel_InitDialog, 1, NULL }, { "SetFocusIgnoringChildren", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPanel_SetFocusIgnoringChildren, 1, NULL }, --- 4835,4838 ---- *************** *** 4925,4949 **** #endif // (wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && (wxLUA_USE_wxPointSizeRect) - #if !wxCHECK_VERSION(2,6,0) - static wxLuaArgTag s_wxluatagArray_wxLua_wxControl_GetLabel[] = { &s_wxluatag_wxControl, NULL }; - static int LUACALL wxLua_wxControl_GetLabel(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxControl_GetLabel[1] = {{ wxLua_wxControl_GetLabel, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxControl_GetLabel }}; - // !%wxchkver_2_6 wxString GetLabel() // see wxWindow - static int LUACALL wxLua_wxControl_GetLabel(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // get this - wxControl * self = (wxControl *)wxlState.GetUserDataType(1, s_wxluatag_wxControl); - // call GetLabel - returns = self->GetLabel(); - // push the result string - wxlState.lua_PushString(returns); - - return 1; - } - - #endif // !wxCHECK_VERSION(2,6,0) - #if wxCHECK_VERSION(2,8,0) static wxLuaArgTag s_wxluatagArray_wxLua_wxControl_GetLabelText[] = { &s_wxluatag_wxControl, NULL }; --- 4909,4912 ---- *************** *** 4967,4990 **** #endif // wxCHECK_VERSION(2,8,0) - #if !wxCHECK_VERSION(2,6,0) - static wxLuaArgTag s_wxluatagArray_wxLua_wxControl_SetLabel[] = { &s_wxluatag_wxControl, &s_wxluaarg_String, NULL }; - static int LUACALL wxLua_wxControl_SetLabel(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxControl_SetLabel[1] = {{ wxLua_wxControl_SetLabel, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxControl_SetLabel }}; - // !%wxchkver_2_6 void SetLabel(const wxString& label) // see wxWindow - static int LUACALL wxLua_wxControl_SetLabel(lua_State *L) - { - wxLuaState wxlState(L); - // const wxString label - const wxString label = wxlState.GetwxStringType(2); - // get this - wxControl * self = (wxControl *)wxlState.GetUserDataType(1, s_wxluatag_wxControl); - // call SetLabel - self->SetLabel(label); - - return 0; - } - - #endif // !wxCHECK_VERSION(2,6,0) - #if (wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && (wxLUA_USE_wxPointSizeRect) static wxLuaArgTag s_wxluatagArray_wxLua_wxControl_constructor1[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; --- 4930,4933 ---- *************** *** 5076,5091 **** #endif // (wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && (wxLUA_USE_wxPointSizeRect) - #if !wxCHECK_VERSION(2,6,0) - { "GetLabel", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxControl_GetLabel, 1, NULL }, - #endif // !wxCHECK_VERSION(2,6,0) - #if wxCHECK_VERSION(2,8,0) { "GetLabelText", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxControl_GetLabelText, 1, NULL }, #endif // wxCHECK_VERSION(2,8,0) - #if !wxCHECK_VERSION(2,6,0) - { "SetLabel", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxControl_SetLabel, 1, NULL }, - #endif // !wxCHECK_VERSION(2,6,0) - #if ((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && (wxLUA_USE_wxPointSizeRect)) { "wxControl", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxControl_constructor_overload, s_wxluafunc_wxLua_wxControl_constructor_overload_count, 0 }, --- 5019,5026 ---- *************** *** 8861,8903 **** - static wxLuaArgTag s_wxluatagArray_wxLua_wxScrolledWindow_GetVirtualSize[] = { &s_wxluatag_wxScrolledWindow, NULL }; - static int LUACALL wxLua_wxScrolledWindow_GetVirtualSize(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxScrolledWindow_GetVirtualSize[1] = {{ wxLua_wxScrolledWindow_GetVirtualSize, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxScrolledWindow_GetVirtualSize }}; - // %override wxLua_wxScrolledWindow_GetVirtualSize - // void GetVirtualSize(int* x, int* y) const - static int LUACALL wxLua_wxScrolledWindow_GetVirtualSize(lua_State *L) - { - wxLuaState wxlState(L); - int y; - int x; - // get this - wxScrolledWindow *self = (wxScrolledWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxScrolledWindow); - // call GetVirtualSize - self->GetVirtualSize(&x, &y); - lua_pushnumber(L, x); - lua_pushnumber(L, y); - // return the number of parameters - return 2; - } - - - static wxLuaArgTag s_wxluatagArray_wxLua_wxScrolledWindow_IsRetained[] = { &s_wxluatag_wxScrolledWindow, NULL }; - static int LUACALL wxLua_wxScrolledWindow_IsRetained(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxScrolledWindow_IsRetained[1] = {{ wxLua_wxScrolledWindow_IsRetained, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxScrolledWindow_IsRetained }}; - // bool IsRetained() const - static int LUACALL wxLua_wxScrolledWindow_IsRetained(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // get this - wxScrolledWindow * self = (wxScrolledWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxScrolledWindow); - // call IsRetained - returns = self->IsRetained(); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - #if (wxLUA_USE_wxScrolledWindow) && (wxLUA_USE_wxDC) --- 8796,8799 ---- *************** *** 9100,9105 **** { "GetScrollPixelsPerUnit", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxScrolledWindow_GetScrollPixelsPerUnit, 1, NULL }, { "GetViewStart", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxScrolledWindow_GetViewStart, 1, NULL }, - { "GetVirtualSize", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxScrolledWindow_GetVirtualSize, 1, NULL }, - { "IsRetained", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxScrolledWindow_IsRetained, 1, NULL }, #if (wxLUA_USE_wxScrolledWindow) && (wxLUA_USE_wxDC) --- 8996,8999 ---- *************** *** 10165,10203 **** #endif // (wxLUA_USE_wxStaticText && wxUSE_STATTEXT) && (wxLUA_USE_wxPointSizeRect) - static wxLuaArgTag s_wxluatagArray_wxLua_wxStaticText_GetLabel[] = { &s_wxluatag_wxStaticText, NULL }; - static int LUACALL wxLua_wxStaticText_GetLabel(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxStaticText_GetLabel[1] = {{ wxLua_wxStaticText_GetLabel, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxStaticText_GetLabel }}; - // wxString GetLabel() const - static int LUACALL wxLua_wxStaticText_GetLabel(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // get this - wxStaticText * self = (wxStaticText *)wxlState.GetUserDataType(1, s_wxluatag_wxStaticText); - // call GetLabel - returns = self->GetLabel(); - // push the result string - wxlState.lua_PushString(returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxStaticText_SetLabel[] = { &s_wxluatag_wxStaticText, &s_wxluaarg_String, NULL }; - static int LUACALL wxLua_wxStaticText_SetLabel(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxStaticText_SetLabel[1] = {{ wxLua_wxStaticText_SetLabel, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxStaticText_SetLabel }}; - // virtual void SetLabel(const wxString& label) - static int LUACALL wxLua_wxStaticText_SetLabel(lua_State *L) - { - wxLuaState wxlState(L); - // const wxString label - const wxString label = wxlState.GetwxStringType(2); - // get this - wxStaticText * self = (wxStaticText *)wxlState.GetUserDataType(1, s_wxluatag_wxStaticText); - // call SetLabel - self->SetLabel(label); - - return 0; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxStaticText_Wrap[] = { &s_wxluatag_wxStaticText, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxStaticText_Wrap(lua_State *L); --- 10059,10062 ---- *************** *** 10306,10311 **** #endif // (wxLUA_USE_wxStaticText && wxUSE_STATTEXT) && (wxLUA_USE_wxPointSizeRect) - { "GetLabel", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStaticText_GetLabel, 1, NULL }, - { "SetLabel", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStaticText_SetLabel, 1, NULL }, { "Wrap", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxStaticText_Wrap, 1, NULL }, --- 10165,10168 ---- Index: menutool.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/menutool.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** menutool.cpp 13 Jun 2007 00:09:01 -0000 1.41 --- menutool.cpp 13 Jun 2007 04:15:26 -0000 1.42 *************** *** 2172,2255 **** int s_wxluatag_wxMenuItemList = -1; - static wxLuaArgTag s_wxluatagArray_wxLua_wxMenuItemList_Clear[] = { &s_wxluatag_wxMenuItemList, NULL }; - static int LUACALL wxLua_wxMenuItemList_Clear(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenuItemList_Clear[1] = {{ wxLua_wxMenuItemList_Clear, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxMenuItemList_Clear }}; - // void Clear() - static int LUACALL wxLua_wxMenuItemList_Clear(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxMenuItemList * self = (wxMenuItemList *)wxlState.GetUserDataType(1, s_wxluatag_wxMenuItemList); - // call Clear - self->Clear(); - - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxMenuItemList_DeleteContents[] = { &s_wxluatag_wxMenuItemList, &s_wxluaarg_Boolean, NULL }; - static int LUACALL wxLua_wxMenuItemList_DeleteContents(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenuItemList_DeleteContents[1] = {{ wxLua_wxMenuItemList_DeleteContents, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMenuItemList_DeleteContents }}; - // void DeleteContents(bool destroy) - static int LUACALL wxLua_wxMenuItemList_DeleteContents(lua_State *L) - { - wxLuaState wxlState(L); - // bool destroy - bool destroy = wxlua_getbooleantype(L, 2); - // get this - wxMenuItemList * self = (wxMenuItemList *)wxlState.GetUserDataType(1, s_wxluatag_wxMenuItemList); - // call DeleteContents - self->DeleteContents(destroy); - - return 0; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxMenuItemList_DeleteObject[] = { &s_wxluatag_wxMenuItemList, &s_wxluatag_wxMenuItem, NULL }; - static int LUACALL wxLua_wxMenuItemList_DeleteObject(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenuItemList_DeleteObject[1] = {{ wxLua_wxMenuItemList_DeleteObject, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMenuItemList_DeleteObject }}; - // bool DeleteObject(wxMenuItem *pMenuItem) - static int LUACALL wxLua_wxMenuItemList_DeleteObject(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // wxMenuItem pMenuItem - wxMenuItem * pMenuItem = (wxMenuItem *)wxlState.GetUserDataType(2, s_wxluatag_wxMenuItem); - // get this - wxMenuItemList * self = (wxMenuItemList *)wxlState.GetUserDataType(1, s_wxluatag_wxMenuItemList); - // call DeleteObject - returns = self->DeleteObject(pMenuItem); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxMenuItemList_GetCount[] = { &s_wxluatag_wxMenuItemList, NULL }; - static int LUACALL wxLua_wxMenuItemList_GetCount(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenuItemList_GetCount[1] = {{ wxLua_wxMenuItemList_GetCount, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxMenuItemList_GetCount }}; - // int GetCount() const - static int LUACALL wxLua_wxMenuItemList_GetCount(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxMenuItemList * self = (wxMenuItemList *)wxlState.GetUserDataType(1, s_wxluatag_wxMenuItemList); - // call GetCount - returns = self->GetCount(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - - // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxMenuItemList_methods[] = { - { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMenuItemList_Clear, 1, NULL }, - { "DeleteContents", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMenuItemList_DeleteContents, 1, NULL }, - { "DeleteObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMenuItemList_DeleteObject, 1, NULL }, - { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMenuItemList_GetCount, 1, NULL }, - { 0, 0, 0, 0 }, }; --- 2172,2179 ---- Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** mdi.cpp 12 Jun 2007 00:08:39 -0000 1.38 --- mdi.cpp 13 Jun 2007 04:15:26 -0000 1.39 *************** *** 189,210 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxMDIParentFrame_GetToolBar[] = { &s_wxluatag_wxMDIParentFrame, NULL }; - static int LUACALL wxLua_wxMDIParentFrame_GetToolBar(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_GetToolBar[1] = {{ wxLua_wxMDIParentFrame_GetToolBar, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxMDIParentFrame_GetToolBar }}; - // virtual wxWindow* GetToolBar() const - static int LUACALL wxLua_wxMDIParentFrame_GetToolBar(lua_State *L) - { - wxLuaState wxlState(L); - wxWindow *returns; - // get this - wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); - // call GetToolBar - returns = (wxWindow *)self->GetToolBar(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxWindow, returns); - - return 1; - } - #if ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) --- 189,192 ---- *************** *** 227,253 **** } - #endif // ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) - - #if (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxToolbar) - static wxLuaArgTag s_wxluatagArray_wxLua_wxMDIParentFrame_SetToolBar[] = { &s_wxluatag_wxMDIParentFrame, &s_wxluatag_wxToolBar, NULL }; - static int LUACALL wxLua_wxMDIParentFrame_SetToolBar(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_SetToolBar[1] = {{ wxLua_wxMDIParentFrame_SetToolBar, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_SetToolBar }}; - // virtual void SetToolBar(wxToolBar* toolbar) - static int LUACALL wxLua_wxMDIParentFrame_SetToolBar(lua_State *L) - { - wxLuaState wxlState(L); - // wxToolBar toolbar - wxToolBar * toolbar = (wxToolBar *)wxlState.GetUserDataType(2, s_wxluatag_wxToolBar); - // get this - wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); - // call SetToolBar - self->SetToolBar(toolbar); - - return 0; - } - - #endif // (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxToolbar) - - #if ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) static wxLuaArgTag s_wxluatagArray_wxLua_wxMDIParentFrame_SetWindowMenu[] = { &s_wxluatag_wxMDIParentFrame, &s_wxluatag_wxMenu, NULL }; static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L); --- 209,212 ---- *************** *** 384,398 **** { "GetActiveChild", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_GetActiveChild, 1, NULL }, { "GetClientWindow", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_GetClientWindow, 1, NULL }, - { "GetToolBar", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_GetToolBar, 1, NULL }, #if ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) { "GetWindowMenu", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_GetWindowMenu, 1, NULL }, - #endif // ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) - - #if (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxToolbar) - { "SetToolBar", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_SetToolBar, 1, NULL }, - #endif // (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxToolbar) - - #if ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) { "SetWindowMenu", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMDIParentFrame_SetWindowMenu, 1, NULL }, #endif // ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) --- 343,349 ---- Index: html.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/html.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** html.cpp 13 Jun 2007 00:09:01 -0000 1.44 --- html.cpp 13 Jun 2007 04:15:26 -0000 1.45 *************** *** 1001,1046 **** #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML && wxUSE_HTML) - #if ((!wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlContainerCell_GetFirstCell[] = { &s_wxluatag_wxHtmlContainerCell, NULL }; - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlContainerCell_GetFirstCell[1] = {{ wxLua_wxHtmlContainerCell_GetFirstCell, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxHtmlContainerCell_GetFirstCell }}; - // !%wxchkver_2_5 wxHtmlCell* GetFirstCell() - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L) - { - wxLuaState wxlState(L); - wxHtmlCell *returns; - // get this - wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); - // call GetFirstCell - returns = (wxHtmlCell *)self->GetFirstCell(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); - - return 1; - } - - #endif // ((!wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - - #if ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlContainerCell_GetFirstChild[] = { &s_wxluatag_wxHtmlContainerCell, NULL }; - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstChild(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlContainerCell_GetFirstChild[1] = {{ wxLua_wxHtmlContainerCell_GetFirstChild, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxHtmlContainerCell_GetFirstChild }}; - // %wxchkver_2_5 wxHtmlCell* GetFirstChild() - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstChild(lua_State *L) - { - wxLuaState wxlState(L); - wxHtmlCell *returns; - // get this - wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); - // call GetFirstChild - returns = (wxHtmlCell *)self->GetFirstChild(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); - - return 1; - } - - #endif // ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlContainerCell_GetIndent[] = { &s_wxluatag_wxHtmlContainerCell, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxHtmlContainerCell_GetIndent(lua_State *L); --- 1001,1004 ---- *************** *** 1326,1337 **** #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML && wxUSE_HTML) - #if ((!wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - { "GetFirstCell", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlContainerCell_GetFirstCell, 1, NULL }, - #endif // ((!wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - - #if ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - { "GetFirstChild", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlContainerCell_GetFirstChild, 1, NULL }, - #endif // ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)) && (wxLUA_USE_wxHTML && wxUSE_HTML) - { "GetIndent", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlContainerCell_GetIndent, 1, NULL }, { "GetIndentUnits", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxHtmlContainerCell_GetIndentUnits, 1, NULL }, --- 1284,1287 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** wx_bind.cpp 13 Jun 2007 00:09:02 -0000 1.103 --- wx_bind.cpp 13 Jun 2007 04:15:28 -0000 1.104 *************** *** 6724,6728 **** #if wxLUA_USE_wxClassInfo ! { "wxClassInfo", wxClassInfo_methods, wxClassInfo_methodCount, NULL, &s_wxluatag_wxClassInfo, "wxObject", NULL ,s_wxluadefineArray_None, 0, }, #endif // wxLUA_USE_wxClassInfo --- 6724,6728 ---- #if wxLUA_USE_wxClassInfo ! { "wxClassInfo", wxClassInfo_methods, wxClassInfo_methodCount, NULL, &s_wxluatag_wxClassInfo, NULL, NULL ,s_wxluadefineArray_None, 0, }, #endif // wxLUA_USE_wxClassInfo Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** gdi.cpp 13 Jun 2007 00:08:59 -0000 1.67 --- gdi.cpp 13 Jun 2007 04:15:25 -0000 1.68 *************** *** 8552,8577 **** } - #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxCursor) - - static wxLuaArgTag s_wxluatagArray_wxLua_wxCursor_Ok[] = { &s_wxluatag_wxCursor, NULL }; - static int LUACALL wxLua_wxCursor_Ok(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxCursor_Ok[1] = {{ wxLua_wxCursor_Ok, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxCursor_Ok }}; - // bool Ok() - static int LUACALL wxLua_wxCursor_Ok(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // get this - wxCursor * self = (wxCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxCursor); - // call Ok - returns = self->Ok(); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - - #if (defined(__WXMSW__)) && (wxLUA_USE_wxCursor) static wxLuaArgTag s_wxluatagArray_wxLua_wxCursor_SetDepth[] = { &s_wxluatag_wxCursor, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxCursor_SetDepth(lua_State *L); --- 8552,8555 ---- *************** *** 8785,8793 **** { "GetHeight", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxCursor_GetHeight, 1, NULL }, { "GetWidth", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxCursor_GetWidth, 1, NULL }, - #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxCursor) - - { "Ok", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxCursor_Ok, 1, NULL }, - - #if (defined(__WXMSW__)) && (wxLUA_USE_wxCursor) { "SetDepth", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxCursor_SetDepth, 1, NULL }, { "SetHeight", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxCursor_SetHeight, 1, NULL }, --- 8763,8766 ---- |
From: John L. <jr...@us...> - 2007-06-13 04:15:32
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/samples Modified Files: bindings.wx.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: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** bindings.wx.lua 13 Jun 2007 00:09:04 -0000 1.5 --- bindings.wx.lua 13 Jun 2007 04:15:29 -0000 1.6 *************** *** 117,120 **** --- 117,121 ---- 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 *************** *** 359,363 **** return t end ! function CreatewxLuaBindMethod(tbl) local keys = { "name", "type", "funcs", "funcs_n", "basemethod" } local t = CreatewxLuaBindTable(tbl, keys, "wxLuaBindMethod") --- 360,364 ---- return t end ! function CreatewxLuaBindMethod(tbl, classname) local keys = { "name", "type", "funcs", "funcs_n", "basemethod" } local t = CreatewxLuaBindTable(tbl, keys, "wxLuaBindMethod") *************** *** 371,374 **** --- 372,379 ---- i = i + 1 + if classname then + t[i][1] = classname.."::"..t[i][1] + end + t[i][2] = CreatewxLuaMethod_TypeString(t[i][2]) *************** *** 461,476 **** end ! function CreatewxLuaBindTable(tbl, keys, object_type) local t = { {"..", ["icon"] = img_folder}, ! ["col_labels"] = keys, ["object_type"] = object_type } for i = 1, #tbl do local item = {} ! for k = 1, #keys do -- we need to force there to be something in each col, use "" ! local val = tbl[i][keys[k]] if val ~= nil then table.insert(item, val) --- 466,483 ---- end ! function CreatewxLuaBindTable(tbl, cols, object_type) local t = { {"..", ["icon"] = img_folder}, ! ["col_labels"] = cols, ["object_type"] = object_type } + local keys = {} + for i = 1, #tbl do local item = {} ! for c = 1, #cols do -- we need to force there to be something in each col, use "" ! local val = tbl[i][cols[c]] if val ~= nil then table.insert(item, val) *************** *** 479,482 **** --- 486,493 ---- end end + + --if keys[tbl[i]] then item.color = wx.wxRED end -- check dup keys + --keys[tbl[i]] = true + table.insert(t, item) end *************** *** 659,667 **** listData[list_level] = t GotoBindingLevel(listCtrl, list_level) ! elseif itemText == "Base Classes" then local t = { {"..", ["icon"] = img_folder}, ! ["col_labels"] = {"Class Name - wxClassInfo Name (wxClassInfo Base Name)"}, ! ["object_type"] = "Base Classes" } --- 670,678 ---- 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" } *************** *** 694,704 **** for i = 1, #t1 do local c = t1[i] ! local c_table = {c.name..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 --- 705,717 ---- 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 *************** *** 706,709 **** --- 719,747 ---- 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 *************** *** 793,799 **** else local binding = _G ! for i = 1, #listData[1][data_index] do ! binding = binding[listData[1][data_index][i]] ! end listData[2] = { --- 831,836 ---- else local binding = _G ! binding = binding[listData[1][data_index][2]] ! binding = binding[listData[1][data_index][1]] listData[2] = { *************** *** 845,849 **** if ((col == 0) or (col == 1)) and (type(listData[list_level][data_index][2]) == "table") then ! t = CreatewxLuaBindMethod(listData[list_level][data_index][2]) elseif (col == 6) and (type(listData[list_level][data_index][col+1]) == "userdata") then t = CreatewxLuaBindClass({listData[list_level][data_index][col+1]}) --- 882,901 ---- if ((col == 0) or (col == 1)) and (type(listData[list_level][data_index][2]) == "table") then ! t = CreatewxLuaBindMethod(listData[list_level][data_index][2], listData[list_level][data_index][1]) ! ! if frame:GetMenuBar():IsChecked(ID_VIEW_BASECLASS_FUNCTIONS) then ! local c = listData[list_level][data_index][7] ! while type(c) == "userdata" do ! local tt = CreatewxLuaBindMethod(c.methods, c.name) ! for i = 2, #tt do -- skip ".." ! if not (string.find(tt[i][2], "Constructor", 1, 1) or ! string.find(t[i][1], "Delete", 1, 1) or ! string.find(t[i][1], "::"..c.name, 1, 1)) then ! table.insert(t, tt[i]) ! end ! end ! c = c.baseclass ! end ! end elseif (col == 6) and (type(listData[list_level][data_index][col+1]) == "userdata") then t = CreatewxLuaBindClass({listData[list_level][data_index][col+1]}) *************** *** 893,896 **** --- 945,951 ---- fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") + local viewMenu = wx.wxMenu() + viewMenu:AppendCheckItem(ID_VIEW_BASECLASS_FUNCTIONS, "View baseclass functions", "View all baseclass functions for class methods") + local helpMenu = wx.wxMenu() helpMenu:Append(wx.wxID_ABOUT, "&About", "About the wxLua Binding Application") *************** *** 899,902 **** --- 954,958 ---- local menuBar = wx.wxMenuBar() menuBar:Append(fileMenu, "&File") + menuBar:Append(viewMenu, "&View") menuBar:Append(helpMenu, "&Help") frame:SetMenuBar(menuBar) *************** *** 954,968 **** listData[1] = { {"wxLua Types", "Compare Lua's type to wxLua's type", ["icon"] = img_folder }, ! {"Base Classes", "See base classes for all binding classes", ["icon"] = img_folder }, {"Overloaded Baseclass Functions", "See all functions that also have a baseclass function", ["icon"] = img_folder }, ! ["col_labels"] = { "Lua Namespace", "Binding userdata" }, ["object_type"] = " " } ! -- Add the binding that are installed {"wx", "wxLuaBinding_wx", ["icon"] = img_folder }, for i = 1, #bindingList do ! table.insert(listData[1], {bindingList[i][1], bindingList[i][2], ["icon"] = img_folder }) end --- 1010,1024 ---- 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 }, ! ["col_labels"] = { "Item to View", "Information"}, ["object_type"] = " " } ! -- Add the binding that are installed {"wxLuaBinding_wx", "wx", ["icon"] = img_folder }, for i = 1, #bindingList do ! table.insert(listData[1], {bindingList[i][2], bindingList[i][1], ["icon"] = img_folder }) end |
From: John L. <jr...@us...> - 2007-06-13 04:15:32
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9645/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp 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: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** wxlbind.cpp 13 Jun 2007 00:09:04 -0000 1.73 --- wxlbind.cpp 13 Jun 2007 04:15:29 -0000 1.74 *************** *** 529,533 **** { qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); ! wxLuaBindClass* wxlClass = m_classArray; for (size_t i = 0; i < m_classCount; ++i, ++wxlClass) --- 529,533 ---- { qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); ! wxLuaBindClass* wxlClass = m_classArray; for (size_t i = 0; i < m_classCount; ++i, ++wxlClass) *************** *** 1058,1066 **** if (baseMethod) { ! parentMethod->basemethod = baseMethod; ! parentMethod = baseMethod; // we have already checked the base classes below this ! if (WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_OVERLOAD_BASE|WXLUAMETHOD_DELETE)) break; } --- 1058,1069 ---- if (baseMethod) { ! if (!WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_DELETE)) ! { ! parentMethod->basemethod = baseMethod; ! parentMethod = baseMethod; ! } // we have already checked the base classes below this ! if (WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_OVERLOAD_BASE)) break; } |
From: John L. <jr...@us...> - 2007-06-13 00:09:31
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/bindings/wxwidgets Modified Files: wxlua.i Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxlua.i,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxlua.i 12 Jun 2007 00:08:36 -0000 1.24 --- wxlua.i 13 Jun 2007 00:08:57 -0000 1.25 *************** *** 14,28 **** ! %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_OVERLOAD_BASE // Class method has been checked to see if it is --- 14,32 ---- ! %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 *************** *** 66,70 **** // 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! /* --- 70,74 ---- // 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)! /* *************** *** 116,120 **** wxLuaBindMethod* basemethod ! wxString class_name // added, not in struct %endclass --- 120,125 ---- 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 |
From: John L. <jr...@us...> - 2007-06-13 00:09:31
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/bindings Modified Files: genwxbind.lua Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** genwxbind.lua 12 Jun 2007 05:03:16 -0000 1.119 --- genwxbind.lua 13 Jun 2007 00:08:57 -0000 1.120 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 11 -- 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 = 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. *************** *** 3742,3746 **** Method = codeList, FuncType = "WXLUAMETHOD_METHOD", ! FuncMap = "{ "..funcName..", WXLUAMETHOD_METHOD, 1, 1, "..overload_argListName.." }", FuncMapName = funcMapName, ArgArray = overload_argList, --- 3742,3746 ---- Method = codeList, FuncType = "WXLUAMETHOD_METHOD", ! FuncMap = "{ "..funcName..", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, "..overload_argListName.." }", FuncMapName = funcMapName, ArgArray = overload_argList, *************** *** 3748,3752 **** ParamCount = 1, RequiredParamCount = 1, ! Map = " { \"Delete\", WXLUAMETHOD_METHOD, "..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-13 00:09:31
|
Update of /cvsroot/wxlua/wxLua/apps/wxluafreeze/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/apps/wxluafreeze/src Modified Files: readme.txt Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: readme.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluafreeze/src/readme.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** readme.txt 13 Apr 2006 04:18:49 -0000 1.2 --- readme.txt 13 Jun 2007 00:08:57 -0000 1.3 *************** *** 14,20 **** For example in MSW in the wxLua\bin dir: ! wxlua-lua.exe ..\apps\wxluafreeze\apps\wxluafreeze.lua wxluafreeze.exe myprogram.wx.lua myprogram.exe ! 3) Optionally use the program "upx" to compress it down. Using the MSVC6 ! compiler in release mode generates a 4.5 Mb wxluaedit.exe file, after ! compression using the upx defaults it's size is 1.5 Mbytes, about 1/3 the size! --- 14,20 ---- For example in MSW in the wxLua\bin dir: ! lua.exe ..\apps\wxluafreeze\apps\wxluafreeze.lua wxluafreeze.exe myprogram.wx.lua myprogram.exe ! 3) Optionally use the program "upx" to compress the executable. The wxLuaFreeze ! program is ~4.5 Mb in release mode using the MSVC6, but after compression ! it's size is ~1.5 Mbytes, about 1/3 the size! |
From: John L. <jr...@us...> - 2007-06-13 00:09:31
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wxbind.h 12 Jun 2007 05:03:16 -0000 1.70 --- wxbind.h 13 Jun 2007 00:08:57 -0000 1.71 *************** *** 43,49 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 11 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 11 // --------------------------------------------------------------------------- --- 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 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-13 00:09:30
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/apps/wxluacan/src Modified Files: wxluacan.h Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxluacan.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** wxluacan.h 12 Jun 2007 05:03:16 -0000 1.28 --- wxluacan.h 13 Jun 2007 00:08:57 -0000 1.29 *************** *** 18,24 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 11 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 11 // --------------------------------------------------------------------------- --- 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 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-13 00:09:10
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** wxlstate.cpp 12 Jun 2007 13:19:37 -0000 1.108 --- wxlstate.cpp 13 Jun 2007 00:09:04 -0000 1.109 *************** *** 1,5 **** ///////////////////////////////////////////////////////////////////////////// // Purpose: wxWidgets interface to lua ! // Author: Ray Gilbert, John Labenski, J Winwood // Created: 14/11/2001 // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. --- 1,5 ---- ///////////////////////////////////////////////////////////////////////////// // Purpose: wxWidgets interface to lua ! // Author: Ray Gilbert, John Labenski, J Winwood (Reuben Thomas for bitlib at bottom) // Created: 14/11/2001 // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. *************** *** 42,45 **** --- 42,47 ---- wxLuaState wxNullLuaState(false); + LUALIB_API int luaopen_bit (lua_State *L); + // ---------------------------------------------------------------------------- // C functions for lua used in wxLuaState *************** *** 1184,1187 **** --- 1186,1190 ---- // load some useful libraries, loads all of them luaL_openlibs(L); + luaopen_bit(L); // track this newly created lua_State in our hashtable to help us *************** *** 2616,2620 **** wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); - wxLuaObject* wxlObj = NULL; lua_State* L = M_WXLSTATEDATA->m_lua_State; bool found = false; --- 2619,2622 ---- *************** *** 2625,2628 **** --- 2627,2632 ---- if (lua_istable(L, -1)) // else not installed or already removed? Not good in any case. { + wxLuaObject* wxlObj = NULL; + lua_pushlightuserdata(L, (void *)pObject); lua_rawget(L, -2); // pop key, push table or nil *************** *** 2640,2643 **** --- 2644,2655 ---- lua_pop(L, 2); // pop registry table and object table or nil + + if (wxlObj != NULL) + { + if (push_method && wxlObj->GetObject()) + found = true; + else if (!push_method) + found = true; + } } else *************** *** 2648,2659 **** } - if (wxlObj) - { - if (push_method && wxlObj->GetObject()) - found = true; - else if (!push_method) - found = true; - } - return found; } --- 2660,2663 ---- *************** *** 3719,3720 **** --- 3723,3797 ---- { } + + //----------------------------------------------------------------------------- + // bitlib release 21 - Bitwise operations library + // by Reuben Thomas <rr...@sc...> + // http://luaforge.net/projects/bitlib + // copyright Reuben Thomas 2000-2006, and is released under the MIT license + //----------------------------------------------------------------------------- + + // This is the code copied directly from lbitlib.c and ever so slightly modified + // to allow it to work here. + + /* Bitwise operations library */ + /* Reuben Thomas nov00-08dec06 */ + + //#include "lauxlib.h" + //#include "lua.h" + + //#include <inttypes.h> + + //typedef uintmax_t Integer; + //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) \ + static int bit_ ## name(lua_State* L) { \ + lua_pushnumber(L, \ + (type1)luaL_checknumber(L, 1) op (type2)luaL_checknumber(L, 2)); \ + return 1; \ + } + + #define MONADIC(name, op, type) \ + static int bit_ ## name(lua_State* L) { \ + lua_pushnumber(L, op (type)luaL_checknumber(L, 1)); \ + return 1; \ + } + + #define VARIADIC(name, op, type) \ + static int bit_ ## name(lua_State *L) { \ + int n = lua_gettop(L), i; \ + Integer w = (type)luaL_checknumber(L, 1); \ + for (i = 2; i <= n; i++) \ + w op (type)luaL_checknumber(L, i); \ + lua_pushnumber(L, w); \ + return 1; \ + } + + MONADIC(bnot, ~, Integer) + VARIADIC(band, &=, Integer) + VARIADIC(bor, |=, Integer) + VARIADIC(bxor, ^=, Integer) + TDYADIC(lshift, <<, Integer, UInteger) + TDYADIC(rshift, >>, UInteger, UInteger) + TDYADIC(arshift, >>, Integer, UInteger) + TDYADIC(mod, %, Integer, Integer) + + static const struct luaL_reg bitlib[] = { + {"bnot", bit_bnot}, + {"band", bit_band}, + {"bor", bit_bor}, + {"bxor", bit_bxor}, + {"lshift", bit_lshift}, + {"rshift", bit_rshift}, + {"arshift", bit_arshift}, + {"mod", bit_mod}, + {NULL, NULL} + }; + + LUALIB_API int luaopen_bit (lua_State *L) { + luaL_openlib(L, "bit", bitlib, 0); + return 1; + } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** wxlbind.cpp 12 Jun 2007 13:19:37 -0000 1.72 --- wxlbind.cpp 13 Jun 2007 00:09:04 -0000 1.73 *************** *** 348,351 **** --- 348,354 ---- found = true; lua_remove(L, 2); // remove the name of the function + if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_STATIC)) + lua_remove(L, 1); // remove the userdata + result = (*wxlMethod->funcs[0].func)(L); } *************** *** 476,482 **** int t1 = 0xFF & ((const wxLuaBindMethod*)p1)->type; int t2 = 0xFF & ((const wxLuaBindMethod*)p2)->type; ! int t12 = (t1 & t2); if ((t12 == WXLUAMETHOD_METHOD) || (t12 == WXLUAMETHOD_GETPROP) || ! (t12 == WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP)) return 0; --- 479,485 ---- int t1 = 0xFF & ((const wxLuaBindMethod*)p1)->type; int t2 = 0xFF & ((const wxLuaBindMethod*)p2)->type; ! int t12 = int(t1) & int(t2); if ((t12 == WXLUAMETHOD_METHOD) || (t12 == WXLUAMETHOD_GETPROP) || ! (t12 == (int(WXLUAMETHOD_METHOD)|int(WXLUAMETHOD_GETPROP)))) return 0; *************** *** 522,533 **** { // Sort all the bindings by something useful if (m_classArray && (m_classCount > 0)) { qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); ! wxLuaBindClass* wxlClass = m_classArray; for (size_t i = 0; i < m_classCount; ++i, ++wxlClass) { qsort(wxlClass->methods, wxlClass->methods_n, sizeof(wxLuaBindMethod), wxLuaBindMethodArrayCompareFnInit); } } --- 525,541 ---- { // Sort all the bindings by something useful + if (m_classArray && (m_classCount > 0)) { qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); ! wxLuaBindClass* wxlClass = m_classArray; for (size_t i = 0; i < m_classCount; ++i, ++wxlClass) { + // Also sort the member functions for each class qsort(wxlClass->methods, wxlClass->methods_n, sizeof(wxLuaBindMethod), wxLuaBindMethodArrayCompareFnInit); + // And their enums + if (wxlClass->enums && (wxlClass->enums_n > 0)) + qsort(wxlClass->enums, wxlClass->enums_n, sizeof(wxLuaBindDefine), wxLuaBindDefineArrayCompareFn); } } *************** *** 1038,1042 **** // iterate through the base classes to find if this function is // an overload, but only if we haven't checked already. ! if (!WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_OVERLOAD_BASE)) { wxLuaBindClass *baseClass = wxlClass->baseclass; --- 1046,1050 ---- // iterate through the base classes to find if this function is // an overload, but only if we haven't checked already. ! if (!WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_OVERLOAD_BASE|WXLUAMETHOD_DELETE)) { wxLuaBindClass *baseClass = wxlClass->baseclass; *************** *** 1054,1058 **** // we have already checked the base classes below this ! if (WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_OVERLOAD_BASE)) break; } --- 1062,1066 ---- // we have already checked the base classes below this ! if (WXLUA_HASBIT(baseMethod->type, WXLUAMETHOD_OVERLOAD_BASE|WXLUAMETHOD_DELETE)) break; } *************** *** 1061,1064 **** --- 1069,1073 ---- } } + return wxlMethod; } *************** *** 1101,1104 **** --- 1110,1114 ---- // wxluabind_wxLuaBindCFunc_index //----------------------------------------------------------------------------- + int LUACALL wxluabind_wxLuaBindClass_index(lua_State* L); int LUACALL wxluabind_wxLuaBindCFunc_index(lua_State* L) *************** *** 1151,1158 **** return 1; } else if (strcmp(idx_str, "class_name") == 0) { ! lua_pushstring(L, wxlBinding->GetLuaClass(wxlCFunc)->name); ! return 1; } } --- 1161,1189 ---- return 1; } + else if (strcmp(idx_str, "class") == 0) + { + const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlCFunc); + if (c != NULL) + { + const void **ptr = (const void **)lua_newuserdata(L, sizeof(void *)); + *ptr = c; + lua_newtable(L); + lua_pushstring(L, "__index"); + lua_pushlightuserdata(L, wxlBinding); + lua_pushcclosure(L, wxluabind_wxLuaBindClass_index, 1); // push func with tag as upvalue + lua_rawset(L, -3); + lua_setmetatable(L, -2); + + return 1; + } + } else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlCFunc); ! if (c != NULL) ! { ! lua_pushstring(L, c->name); ! return 1; ! } } } *************** *** 1235,1242 **** return 0; } else if (strcmp(idx_str, "class_name") == 0) { ! lua_pushstring(L, wxlBinding->GetLuaClass(wxlMethod)->name); ! return 1; } } --- 1266,1294 ---- return 0; } + else if (strcmp(idx_str, "class") == 0) + { + const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlMethod); + if (c != NULL) + { + const void **ptr = (const void **)lua_newuserdata(L, sizeof(void *)); + *ptr = c; + lua_newtable(L); + lua_pushstring(L, "__index"); + lua_pushlightuserdata(L, wxlBinding); + lua_pushcclosure(L, wxluabind_wxLuaBindClass_index, 1); // push func with tag as upvalue + lua_rawset(L, -3); + lua_setmetatable(L, -2); + + return 1; + } + } else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlMethod); ! if (c != NULL) ! { ! lua_pushstring(L, c->name); ! return 1; ! } } } |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/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: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** xml.cpp 12 Jun 2007 00:08:41 -0000 1.36 --- xml.cpp 13 Jun 2007 00:09:03 -0000 1.37 *************** *** 90,94 **** 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, 1, 1, s_wxluatagArray_wxLua_wxXmlNode_Delete }}; static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L) { --- 90,94 ---- 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) { *************** *** 619,623 **** #endif // (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, *************** *** 666,670 **** 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, 1, 1, s_wxluatagArray_wxLua_wxXmlProperty_Delete }}; static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L) { --- 666,670 ---- 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) { *************** *** 853,857 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlProperty_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, *************** *** 883,887 **** 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, 1, 1, s_wxluatagArray_wxLua_wxXmlDocument_Delete }}; static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L) { --- 883,887 ---- 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) { *************** *** 1132,1136 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXmlDocument_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, *************** *** 1297,1301 **** 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, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Delete }}; static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L) { --- 1297,1301 ---- 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) { *************** *** 1897,1901 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** defsutil.cpp 12 Jun 2007 00:08:38 -0000 1.38 --- defsutil.cpp 13 Jun 2007 00:08:58 -0000 1.39 *************** *** 55,59 **** 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, 1, 1, s_wxluatagArray_wxLua_wxProcess_Delete }}; static int LUACALL wxLua_wxProcess_Delete(lua_State *L) { --- 55,59 ---- 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) { *************** *** 353,357 **** #endif // (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, *************** *** 452,456 **** 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, 1, 1, s_wxluatagArray_wxLua_wxMouseState_Delete }}; static int LUACALL wxLua_wxMouseState_Delete(lua_State *L) { --- 452,456 ---- 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) { *************** *** 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, 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,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 }, *************** *** 808,812 **** 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, 1, 1, s_wxluatagArray_wxLua_wxBusyCursor_Delete }}; static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L) { --- 808,812 ---- 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) { *************** *** 857,861 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyCursor_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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) *************** *** 881,885 **** 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, 1, 1, s_wxluatagArray_wxLua_wxBusyInfo_Delete }}; static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L) { --- 881,885 ---- 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) { *************** *** 925,929 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBusyInfo_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxlua.cpp 12 Jun 2007 00:08:41 -0000 1.41 --- wxlua.cpp 13 Jun 2007 00:09:03 -0000 1.42 *************** *** 35,39 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaState_Delete }}; static int LUACALL wxLua_wxLuaState_Delete(lua_State *L) { --- 35,39 ---- 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) { *************** *** 53,57 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaState_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaState_Delete, 1, NULL }, { 0, 0, 0, 0 }, }; --- 53,57 ---- // 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 }, }; *************** *** 69,73 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_Delete }}; static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) { --- 69,73 ---- 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) { *************** *** 180,184 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaObject_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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 }, --- 180,184 ---- // 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 }, *************** *** 203,207 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaPrintout_Delete }}; static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) { --- 203,207 ---- 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) { *************** *** 312,316 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaPrintout_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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 }, --- 312,316 ---- // 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 }, *************** *** 399,403 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_Delete }}; static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) { --- 399,403 ---- 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) { *************** *** 495,499 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaHtmlWinTagEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaHtmlWinTagEvent_Delete, 1, NULL }, #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) --- 495,499 ---- // 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) Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** image.cpp 12 Jun 2007 00:08:39 -0000 1.42 --- image.cpp 13 Jun 2007 00:09:01 -0000 1.43 *************** *** 260,264 **** 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, 1, 1, s_wxluatagArray_wxLua_wxImage_Delete }}; static int LUACALL wxLua_wxImage_Delete(lua_State *L) { --- 260,264 ---- 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) { *************** *** 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, 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,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 }, *************** *** 2766,2770 **** 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, 1, 1, s_wxluatagArray_wxLua_wxImageHandler_Delete }}; static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L) { --- 2766,2770 ---- 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) { *************** *** 3003,3007 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxImageHandler_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_Delete, 1, NULL }, { "GetExtension", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHandler_GetExtension, 1, NULL }, --- 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 }, Index: config.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/config.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** config.cpp 8 Jun 2007 01:36:23 -0000 1.39 --- config.cpp 13 Jun 2007 00:08:58 -0000 1.40 *************** *** 1004,1008 **** 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, 1, 1, s_wxluatagArray_wxLua_wxConfigPathChanger_Delete }}; static int LUACALL wxLua_wxConfigPathChanger_Delete(lua_State *L) { --- 1004,1008 ---- 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) { *************** *** 1083,1087 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxConfigPathChanger_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigPathChanger_Delete, 1, NULL }, { "Name", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxConfigPathChanger_Name, 1, NULL }, --- 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 }, Index: grid.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/grid.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** grid.cpp 12 Jun 2007 00:08:39 -0000 1.40 --- grid.cpp 13 Jun 2007 00:09:00 -0000 1.41 *************** *** 7473,7477 **** 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, 1, 1, s_wxluatagArray_wxLua_wxGridEvent_Delete }}; static int LUACALL wxLua_wxGridEvent_Delete(lua_State *L) { --- 7473,7477 ---- 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) { *************** *** 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, s_wxluafunc_wxLua_wxGridEvent_Delete, 1, NULL }, { "GetCol", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGridEvent_GetCol, 1, NULL }, --- 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 }, *************** *** 7922,7926 **** 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, 1, 1, s_wxluatagArray_wxLua_wxGridRangeSelectEvent_Delete }}; static int LUACALL wxLua_wxGridRangeSelectEvent_Delete(lua_State *L) { --- 7922,7926 ---- 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) { *************** *** 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, 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,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 }, *************** *** 8188,8192 **** 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, 1, 1, s_wxluatagArray_wxLua_wxGridEditorCreatedEvent_Delete }}; static int LUACALL wxLua_wxGridEditorCreatedEvent_Delete(lua_State *L) { --- 8188,8192 ---- 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) { *************** *** 8346,8350 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGridEditorCreatedEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** file.cpp 12 Jun 2007 00:08:38 -0000 1.49 --- file.cpp 13 Jun 2007 00:08:59 -0000 1.50 *************** *** 115,119 **** 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, 1, 1, s_wxluatagArray_wxLua_wxPathList_Delete }}; static int LUACALL wxLua_wxPathList_Delete(lua_State *L) { --- 115,119 ---- 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) { *************** *** 270,274 **** { "AddEnvList", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPathList_AddEnvList, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPathList_Delete, 1, NULL }, #if wxCHECK_VERSION(2,8,0) --- 270,274 ---- { "AddEnvList", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxPathList_AddEnvList, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPathList_Delete, 1, NULL }, #if wxCHECK_VERSION(2,8,0) *************** *** 579,583 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Delete[] = { &s_wxluatag_wxFileName, NULL }; static int LUACALL wxLua_wxFileName_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Delete[1] = {{ wxLua_wxFileName_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxFileName_Delete }}; static int LUACALL wxLua_wxFileName_Delete(lua_State *L) { --- 579,583 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Delete[] = { &s_wxluatag_wxFileName, NULL }; static int LUACALL wxLua_wxFileName_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Delete[1] = {{ wxLua_wxFileName_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxFileName_Delete }}; static int LUACALL wxLua_wxFileName_Delete(lua_State *L) { *************** *** 2261,2265 **** { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFileName_Clear, 1, NULL }, { "ClearExt", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFileName_ClearExt, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFileName_Delete, 1, NULL }, #if (wxLUA_USE_wxFileName) --- 2261,2265 ---- { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFileName_Clear, 1, NULL }, { "ClearExt", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFileName_ClearExt, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxFileName_Delete, 1, NULL }, #if (wxLUA_USE_wxFileName) *************** *** 2469,2473 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxFile_Delete[] = { &s_wxluatag_wxFile, NULL }; static int LUACALL wxLua_wxFile_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxFile_Delete[1] = {{ wxLua_wxFile_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxFile_Delete }}; static int LUACALL wxLua_wxFile_Delete(lua_State *L) { --- 2469,2473 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxFile_Delete[] = { &s_wxluatag_wxFile, NULL }; static int LUACALL wxLua_wxFile_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxFile_Delete[1] = {{ wxLua_wxFile_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxFile_Delete }}; static int LUACALL wxLua_wxFile_Delete(lua_State *L) { *************** *** 2877,2881 **** { "Close", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Close, 1, NULL }, { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Create, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Delete, 1, NULL }, { "Detach", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Detach, 1, NULL }, { "Eof", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Eof, 1, NULL }, --- 2877,2881 ---- { "Close", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Close, 1, NULL }, { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Create, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxFile_Delete, 1, NULL }, { "Detach", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Detach, 1, NULL }, { "Eof", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxFile_Eof, 1, NULL }, *************** *** 2953,2957 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxTempFile_Delete[] = { &s_wxluatag_wxTempFile, NULL }; static int LUACALL wxLua_wxTempFile_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxTempFile_Delete[1] = {{ wxLua_wxTempFile_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxTempFile_Delete }}; static int LUACALL wxLua_wxTempFile_Delete(lua_State *L) { --- 2953,2957 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxTempFile_Delete[] = { &s_wxluatag_wxTempFile, NULL }; static int LUACALL wxLua_wxTempFile_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxTempFile_Delete[1] = {{ wxLua_wxTempFile_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTempFile_Delete }}; static int LUACALL wxLua_wxTempFile_Delete(lua_State *L) { *************** *** 3165,3169 **** wxLuaBindMethod wxTempFile_methods[] = { { "Commit", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_Commit, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_Delete, 1, NULL }, { "Discard", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_Discard, 1, NULL }, { "IsOpened", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_IsOpened, 1, NULL }, --- 3165,3169 ---- wxLuaBindMethod wxTempFile_methods[] = { { "Commit", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_Commit, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTempFile_Delete, 1, NULL }, { "Discard", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_Discard, 1, NULL }, { "IsOpened", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTempFile_IsOpened, 1, NULL }, *************** *** 3196,3200 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_Delete[] = { &s_wxluatag_wxDir, NULL }; static int LUACALL wxLua_wxDir_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxDir_Delete[1] = {{ wxLua_wxDir_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxDir_Delete }}; static int LUACALL wxLua_wxDir_Delete(lua_State *L) { --- 3196,3200 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_Delete[] = { &s_wxluatag_wxDir, NULL }; static int LUACALL wxLua_wxDir_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxDir_Delete[1] = {{ wxLua_wxDir_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxDir_Delete }}; static int LUACALL wxLua_wxDir_Delete(lua_State *L) { *************** *** 3526,3530 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDir_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDir_Delete, 1, NULL }, { "Exists", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDir_Exists, 1, NULL }, --- 3526,3530 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDir_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxDir_Delete, 1, NULL }, { "Exists", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDir_Exists, 1, NULL }, Index: data.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/data.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** data.cpp 12 Jun 2007 00:08:37 -0000 1.48 --- data.cpp 13 Jun 2007 00:08:58 -0000 1.49 *************** *** 192,196 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxObject_Delete[] = { &s_wxluatag_wxObject, NULL }; static int LUACALL wxLua_wxObject_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxObject_Delete[1] = {{ wxLua_wxObject_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxObject_Delete }}; static int LUACALL wxLua_wxObject_Delete(lua_State *L) { --- 192,196 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxObject_Delete[] = { &s_wxluatag_wxObject, NULL }; static int LUACALL wxLua_wxObject_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxObject_Delete[1] = {{ wxLua_wxObject_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxObject_Delete }}; static int LUACALL wxLua_wxObject_Delete(lua_State *L) { *************** *** 386,390 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxObject_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_Delete, 1, NULL }, { "DynamicCast", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_DynamicCast, 1, NULL }, --- 386,390 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxObject_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxObject_Delete, 1, NULL }, { "DynamicCast", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxObject_DynamicCast, 1, NULL }, *************** *** 798,802 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxTextValidator_Delete[] = { &s_wxluatag_wxTextValidator, NULL }; static int LUACALL wxLua_wxTextValidator_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextValidator_Delete[1] = {{ wxLua_wxTextValidator_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxTextValidator_Delete }}; static int LUACALL wxLua_wxTextValidator_Delete(lua_State *L) { --- 798,802 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxTextValidator_Delete[] = { &s_wxluatag_wxTextValidator, NULL }; static int LUACALL wxLua_wxTextValidator_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxTextValidator_Delete[1] = {{ wxLua_wxTextValidator_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTextValidator_Delete }}; static int LUACALL wxLua_wxTextValidator_Delete(lua_State *L) { *************** *** 961,965 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTextValidator_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxTextValidator_Delete, 1, NULL }, #if (wxLUA_USE_wxArrayString) && ((wxCHECK_VERSION(2,5,0)) && ((wxLUA_USE_wxTextValidator) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS))) --- 961,965 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTextValidator_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTextValidator_Delete, 1, NULL }, #if (wxLUA_USE_wxArrayString) && ((wxCHECK_VERSION(2,5,0)) && ((wxLUA_USE_wxTextValidator) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS))) *************** *** 996,1000 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxGenericValidator_Delete[] = { &s_wxluatag_wxGenericValidator, NULL }; static int LUACALL wxLua_wxGenericValidator_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxGenericValidator_Delete[1] = {{ wxLua_wxGenericValidator_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxGenericValidator_Delete }}; static int LUACALL wxLua_wxGenericValidator_Delete(lua_State *L) { --- 996,1000 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxGenericValidator_Delete[] = { &s_wxluatag_wxGenericValidator, NULL }; static int LUACALL wxLua_wxGenericValidator_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxGenericValidator_Delete[1] = {{ wxLua_wxGenericValidator_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGenericValidator_Delete }}; static int LUACALL wxLua_wxGenericValidator_Delete(lua_State *L) { *************** *** 1107,1111 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGenericValidator_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxGenericValidator_Delete, 1, NULL }, { "wxGenericValidatorArrayInt", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGenericValidatorArrayInt_constructor, 1, NULL }, { "wxGenericValidatorBool", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGenericValidatorBool_constructor, 1, NULL }, --- 1107,1111 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGenericValidator_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGenericValidator_Delete, 1, NULL }, { "wxGenericValidatorArrayInt", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGenericValidatorArrayInt_constructor, 1, NULL }, { "wxGenericValidatorBool", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGenericValidatorBool_constructor, 1, NULL }, *************** *** 1858,1862 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxArrayInt_Delete[] = { &s_wxluatag_wxArrayInt, NULL }; static int LUACALL wxLua_wxArrayInt_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayInt_Delete[1] = {{ wxLua_wxArrayInt_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxArrayInt_Delete }}; static int LUACALL wxLua_wxArrayInt_Delete(lua_State *L) { --- 1858,1862 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxArrayInt_Delete[] = { &s_wxluatag_wxArrayInt, NULL }; static int LUACALL wxLua_wxArrayInt_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayInt_Delete[1] = {{ wxLua_wxArrayInt_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxArrayInt_Delete }}; static int LUACALL wxLua_wxArrayInt_Delete(lua_State *L) { *************** *** 2120,2124 **** { "Alloc", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Alloc, 1, NULL }, { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Clear, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Delete, 1, NULL }, { "Empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Empty, 1, NULL }, { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_GetCount, 1, NULL }, --- 2120,2124 ---- { "Alloc", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Alloc, 1, NULL }, { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Clear, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxArrayInt_Delete, 1, NULL }, { "Empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_Empty, 1, NULL }, { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayInt_GetCount, 1, NULL }, *************** *** 2210,2214 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxArrayString_Delete[] = { &s_wxluatag_wxArrayString, NULL }; static int LUACALL wxLua_wxArrayString_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayString_Delete[1] = {{ wxLua_wxArrayString_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxArrayString_Delete }}; static int LUACALL wxLua_wxArrayString_Delete(lua_State *L) { --- 2210,2214 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxArrayString_Delete[] = { &s_wxluatag_wxArrayString, NULL }; static int LUACALL wxLua_wxArrayString_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxArrayString_Delete[1] = {{ wxLua_wxArrayString_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxArrayString_Delete }}; static int LUACALL wxLua_wxArrayString_Delete(lua_State *L) { *************** *** 2515,2519 **** { "Alloc", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Alloc, 1, NULL }, { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Clear, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Delete, 1, NULL }, { "Empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Empty, 1, NULL }, { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_GetCount, 1, NULL }, --- 2515,2519 ---- { "Alloc", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Alloc, 1, NULL }, { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Clear, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxArrayString_Delete, 1, NULL }, { "Empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_Empty, 1, NULL }, { "GetCount", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxArrayString_GetCount, 1, NULL }, *************** *** 2551,2555 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxSortedArrayString_Delete[] = { &s_wxluatag_wxSortedArrayString, NULL }; static int LUACALL wxLua_wxSortedArrayString_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSortedArrayString_Delete[1] = {{ wxLua_wxSortedArrayString_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxSortedArrayString_Delete }}; static int LUACALL wxLua_wxSortedArrayString_Delete(lua_State *L) { --- 2551,2555 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxSortedArrayString_Delete[] = { &s_wxluatag_wxSortedArrayString, NULL }; static int LUACALL wxLua_wxSortedArrayString_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSortedArrayString_Delete[1] = {{ wxLua_wxSortedArrayString_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxSortedArrayString_Delete }}; static int LUACALL wxLua_wxSortedArrayString_Delete(lua_State *L) { *************** *** 2651,2655 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxSortedArrayString_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxSortedArrayString_Delete, 1, NULL }, #if (wxLUA_USE_wxArrayString) --- 2651,2655 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxSortedArrayString_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxSortedArrayString_Delete, 1, NULL }, #if (wxLUA_USE_wxArrayString) *************** *** 2716,2720 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxLongLong_Delete[] = { &s_wxluatag_wxLongLong, NULL }; static int LUACALL wxLua_wxLongLong_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxLongLong_Delete[1] = {{ wxLua_wxLongLong_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLongLong_Delete }}; static int LUACALL wxLua_wxLongLong_Delete(lua_State *L) { --- 2716,2720 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxLongLong_Delete[] = { &s_wxluatag_wxLongLong, NULL }; static int LUACALL wxLua_wxLongLong_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxLongLong_Delete[1] = {{ wxLua_wxLongLong_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxLongLong_Delete }}; static int LUACALL wxLua_wxLongLong_Delete(lua_State *L) { *************** *** 2852,2856 **** { "Abs", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_Abs, 1, NULL }, { "Assign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_Assign, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_Delete, 1, NULL }, { "GetHi", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_GetHi, 1, NULL }, { "GetLo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_GetLo, 1, NULL }, --- 2852,2856 ---- { "Abs", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_Abs, 1, NULL }, { "Assign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_Assign, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxLongLong_Delete, 1, NULL }, { "GetHi", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_GetHi, 1, NULL }, { "GetLo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLongLong_GetLo, 1, NULL }, *************** *** 2878,2882 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxULongLong_Delete[] = { &s_wxluatag_wxULongLong, NULL }; static int LUACALL wxLua_wxULongLong_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxULongLong_Delete[1] = {{ wxLua_wxULongLong_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxULongLong_Delete }}; static int LUACALL wxLua_wxULongLong_Delete(lua_State *L) { --- 2878,2882 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxULongLong_Delete[] = { &s_wxluatag_wxULongLong, NULL }; static int LUACALL wxLua_wxULongLong_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxULongLong_Delete[1] = {{ wxLua_wxULongLong_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxULongLong_Delete }}; static int LUACALL wxLua_wxULongLong_Delete(lua_State *L) { *************** *** 2994,2998 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxULongLong_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxULongLong_Delete, 1, NULL }, { "GetHi", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxULongLong_GetHi, 1, NULL }, { "GetLo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxULongLong_GetLo, 1, NULL }, --- 2994,2998 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxULongLong_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxULongLong_Delete, 1, NULL }, { "GetHi", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxULongLong_GetHi, 1, NULL }, { "GetLo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxULongLong_GetLo, 1, NULL }, Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** controls.cpp 12 Jun 2007 00:08:37 -0000 1.61 --- controls.cpp 13 Jun 2007 00:08:58 -0000 1.62 *************** *** 4857,4861 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxListItemAttr_Delete[] = { &s_wxluatag_wxListItemAttr, NULL }; static int LUACALL wxLua_wxListItemAttr_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListItemAttr_Delete[1] = {{ wxLua_wxListItemAttr_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxListItemAttr_Delete }}; static int LUACALL wxLua_wxListItemAttr_Delete(lua_State *L) { --- 4857,4861 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxListItemAttr_Delete[] = { &s_wxluatag_wxListItemAttr, NULL }; static int LUACALL wxLua_wxListItemAttr_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListItemAttr_Delete[1] = {{ wxLua_wxListItemAttr_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxListItemAttr_Delete }}; static int LUACALL wxLua_wxListItemAttr_Delete(lua_State *L) { *************** *** 5097,5101 **** #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItemAttr_Delete, 1, NULL }, #if (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) --- 5097,5101 ---- #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxListItemAttr_Delete, 1, NULL }, #if (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) *************** *** 5179,5183 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxListItem_Delete[] = { &s_wxluatag_wxListItem, NULL }; static int LUACALL wxLua_wxListItem_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListItem_Delete[1] = {{ wxLua_wxListItem_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxListItem_Delete }}; static int LUACALL wxLua_wxListItem_Delete(lua_State *L) { --- 5179,5183 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxListItem_Delete[] = { &s_wxluatag_wxListItem, NULL }; static int LUACALL wxLua_wxListItem_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListItem_Delete[1] = {{ wxLua_wxListItem_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxListItem_Delete }}; static int LUACALL wxLua_wxListItem_Delete(lua_State *L) { *************** *** 5765,5769 **** { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_Clear, 1, NULL }, { "ClearAttributes", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_ClearAttributes, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_Delete, 1, NULL }, { "GetAlign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_GetAlign, 1, NULL }, { "GetAttributes", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_GetAttributes, 1, NULL }, --- 5765,5769 ---- { "Clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_Clear, 1, NULL }, { "ClearAttributes", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_ClearAttributes, 1, NULL }, ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxListItem_Delete, 1, NULL }, { "GetAlign", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_GetAlign, 1, NULL }, { "GetAttributes", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListItem_GetAttributes, 1, NULL }, *************** *** 5840,5844 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxListEvent_Delete[] = { &s_wxluatag_wxListEvent, NULL }; static int LUACALL wxLua_wxListEvent_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListEvent_Delete[1] = {{ wxLua_wxListEvent_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxListEvent_Delete }}; static int LUACALL wxLua_wxListEvent_Delete(lua_State *L) { --- 5840,5844 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxListEvent_Delete[] = { &s_wxluatag_wxListEvent, NULL }; static int LUACALL wxLua_wxListEvent_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxListEvent_Delete[1] = {{ wxLua_wxListEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxListEvent_Delete }}; static int LUACALL wxLua_wxListEvent_Delete(lua_State *L) { *************** *** 6089,6093 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxListEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListEvent_Delete, 1, NULL }, { "GetColumn", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListEvent_GetColumn, 1, NULL }, { "GetData", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListEvent_GetData, 1, NULL }, --- 6089,6093 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxListEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxListEvent_Delete, 1, NULL }, { "GetColumn", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListEvent_GetColumn, 1, NULL }, { "GetData", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxListEvent_GetData, 1, NULL }, *************** *** 8082,8086 **** static wxLuaArgTag s_wxluatagArray_wxLua_wxSpinEvent_Delete[] = { &s_wxluatag_wxSpinEvent, NULL }; static int LUACALL wxLua_wxSpinEvent_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSpinEvent_Delete[1] = {{ wxLua_wxSpinEvent_Delete, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxSpinEvent_Delete }}; static int LUACALL wxLua_wxSpinEvent_Delete(lua_State *L) { --- 8082,8086 ---- static wxLuaArgTag s_wxluatagArray_wxLua_wxSpinEvent_Delete[] = { &s_wxluatag_wxSpinEvent, NULL }; static int LUACALL wxLua_wxSpinEvent_Delete(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSpinEvent_Delete[1] = {{ wxLua_wxSpinEvent_Delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxSpinEvent_Delete }}; static int LUACALL wxL... [truncated message content] |
From: John L. <jr...@us...> - 2007-06-13 00:09:09
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/samples Modified Files: bindings.wx.lua unittest.wx.lua Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bindings.wx.lua 12 Jun 2007 00:08:42 -0000 1.4 --- bindings.wx.lua 13 Jun 2007 00:09:04 -0000 1.5 *************** *** 134,137 **** --- 134,150 ---- -- ["list_item"] = last selected list item or nil if not set + 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 + + -- ---------------------------------------------------------------------------- -- Save the current listctrl settings into the listColWidths table *************** *** 263,267 **** -- Convert the wxLuaMethod_Type enum into a readable string -- ---------------------------------------------------------------------------- ! function ConvertwxLuaMethod_Type(t_) local s = {} local t = t_ --- 276,280 ---- -- Convert the wxLuaMethod_Type enum into a readable string -- ---------------------------------------------------------------------------- ! function CreatewxLuaMethod_TypeString(t_) local s = {} local t = t_ *************** *** 277,280 **** --- 290,294 ---- -- 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") *************** *** 294,297 **** --- 308,325 ---- -- ---------------------------------------------------------------------------- + -- 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 + + return table.concat(arg_names, ", ") + end + + -- ---------------------------------------------------------------------------- -- Create tables from the different binding structs type -- ---------------------------------------------------------------------------- *************** *** 343,347 **** i = i + 1 ! t[i][2] = ConvertwxLuaMethod_Type(t[i][2]) -- Add in the CFuncs --- 371,375 ---- i = i + 1 ! t[i][2] = CreatewxLuaMethod_TypeString(t[i][2]) -- Add in the CFuncs *************** *** 356,360 **** local cfunc_t = CreatewxLuaBindCFunc(t[i][3]) for j = 2, #cfunc_t do ! table.insert(t, i+j-1, {t[i][1].." "..j-1, cfunc_t[j][2], cfunc_t[j][1], "", "", cfunc_t[j][3], cfunc_t[j][4], cfunc_t[j][5], cfunc_t[j][6]}) end --- 384,390 ---- local cfunc_t = CreatewxLuaBindCFunc(t[i][3]) for j = 2, #cfunc_t do ! local cft = {t[i][1].." "..j-1, cfunc_t[j][2], cfunc_t[j][1], "", "", cfunc_t[j][3], cfunc_t[j][4], cfunc_t[j][5], cfunc_t[j][6]} ! if string.find(cfunc_t[j][2], "Overload", 1, 1) then cft.color = wx.wxGREEN end ! table.insert(t, i+j-1, cft) end *************** *** 418,432 **** t.col_labels[6] ="argtags" -- we don't want to show the table, just show the values for i = 2, #t do local args = t[i][5] - local arg_names = {} ! for j = 1, #args do ! table.insert(arg_names, wx.wxlua_typename(args[j])) ! end ! ! t[i][2] = ConvertwxLuaMethod_Type(t[i][2]) ! t[i][5] = table.concat(arg_names, ", ") -- swap these two t[i][6] = table.concat(args, ", ") end --- 448,458 ---- t.col_labels[6] ="argtags" + -- we don't want to show the table, just show the values for i = 2, #t do local args = t[i][5] ! t[i][2] = CreatewxLuaMethod_TypeString(t[i][2]) ! t[i][5] = CreateArgTagsString(args) -- swap these two t[i][6] = table.concat(args, ", ") end *************** *** 464,477 **** function OnListColClicked(event) local col = event:GetColumn() ! if not listData[list_level].col_sorted then ! listData[list_level].col_sorted = {} end ! local sorted = listData[list_level].col_sorted[col+1] local function SortListItems(item1, item2, col) ! local data1 = listData[list_level][item1] ! local data2 = listData[list_level][item2] if data1[1] == ".." then return -1 end --- 490,508 ---- function OnListColClicked(event) local col = event:GetColumn() + SortListItems(col) + end ! function SortListItems(col) ! local data = listData[list_level] ! ! if not data.col_sorted then ! data.col_sorted = {} end ! local sorted = data.col_sorted[col+1] local function SortListItems(item1, item2, col) ! local data1 = data[item1] ! local data2 = data[item2] if data1[1] == ".." then return -1 end *************** *** 481,491 **** local i2 = data2[col] ! if (listData[list_level].object_type == "wxLuaBindDefine") and (col == 2) then -- sort on the real numbers, not the strings w/ hex i1 = data1[3] i2 = data2[3] ! elseif ((listData[list_level].object_type == "wxLuaBindClass") and ((col == 3) or (col == 5) or (col == 9))) or ! ((listData[list_level].object_type == "wxLuaBindMethod") and ((col == 4) or (col == 6) or (col == 7))) or ! ((listData[list_level].object_type == "wxLuaBindCFunc") and ((col == 3) or (col == 4))) then -- sort on the real numbers, but treat "" as lower if (i1 == "") and (i2 == "") then --- 512,522 ---- local i2 = data2[col] ! if (data.object_type == "wxLuaBindDefine") and (col == 2) then -- sort on the real numbers, not the strings w/ hex i1 = data1[3] i2 = data2[3] ! elseif ((data.object_type == "wxLuaBindClass") and ((col == 3) or (col == 5) or (col == 9))) or ! ((data.object_type == "wxLuaBindMethod") and ((col == 4) or (col == 6) or (col == 7))) or ! ((data.object_type == "wxLuaBindCFunc") and ((col == 3) or (col == 4))) then -- sort on the real numbers, but treat "" as lower if (i1 == "") and (i2 == "") then *************** *** 517,520 **** --- 548,567 ---- listCtrl:SortItems(SortListItems, col+1) + -- now make the table of data match what's in the listctrl so when you + -- go up a level it'll stay sorted the same way + -- Note: it seems faster to let the listctrl sort and then match the lua table + -- rather than sort table, clear listctrl, and add it back. + local t = {} + for i = 1, listCtrl:GetItemCount() do + local d = listCtrl:GetItemData(i-1) -- old table indexes + table.insert(t, data[d]) -- table with listctrl order + end + + for i = 1, #t do + listData[list_level][i] = t[i] -- update original table + listCtrl:SetItemData(i-1, i) -- fix itemdata to match table indexes + end + + for c = 1, listCtrl:GetColumnCount() do listCtrl:SetColumnImage(c-1, -1) *************** *** 522,529 **** if not sorted then ! listData[list_level].col_sorted[col+1] = true listCtrl:SetColumnImage(col, img_sort_dn) else ! listData[list_level].col_sorted[col+1] = false listCtrl:SetColumnImage(col, img_sort_up) end --- 569,576 ---- 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 *************** *** 612,615 **** --- 659,794 ---- listData[list_level] = t GotoBindingLevel(listCtrl, list_level) + elseif itemText == "Base Classes" then + local t = { + {"..", ["icon"] = img_folder}, + ["col_labels"] = {"Class Name - wxClassInfo Name (wxClassInfo Base Name)"}, + ["object_type"] = "Base 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 c = t1[i] + local c_table = {c.name..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) + 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 + listData[list_level] = t + GotoBindingLevel(listCtrl, list_level) else local binding = _G *************** *** 774,785 **** list_level = 1 listData[1] = { ! {"wxLua Types", "Compare Lua's type to wxLua's type", ["icon"] = img_folder }, ! {"wx", "wxLuaBinding_wx", ["icon"] = img_folder }, ! {"wx", "wxLuaBinding_wxstc", ["icon"] = img_folder }, ! {"wx", "wxLuaBinding_wxluasocket", ["icon"] = img_folder }, ["col_labels"] = { "Lua Namespace", "Binding userdata" }, ["object_type"] = " " } GotoBindingLevel(listCtrl, 1) --- 953,970 ---- list_level = 1 listData[1] = { ! {"wxLua Types", "Compare Lua's type to wxLua's type", ["icon"] = img_folder }, ! {"Base Classes", "See base classes for all binding classes", ["icon"] = img_folder }, ! {"Overloaded Baseclass Functions", "See all functions that also have a baseclass function", ["icon"] = img_folder }, ! ["col_labels"] = { "Lua Namespace", "Binding userdata" }, ["object_type"] = " " } + + -- Add the binding that are installed {"wx", "wxLuaBinding_wx", ["icon"] = img_folder }, + for i = 1, #bindingList do + table.insert(listData[1], {bindingList[i][1], bindingList[i][2], ["icon"] = img_folder }) + end + GotoBindingLevel(listCtrl, 1) Index: unittest.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/unittest.wx.lua,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** unittest.wx.lua 12 Jun 2007 00:08:42 -0000 1.10 --- unittest.wx.lua 13 Jun 2007 00:09:04 -0000 1.11 *************** *** 62,65 **** --- 62,67 ---- PrintOk(a == wx.wxFile.read and a == 0, "Test %enum wxFile::OpenMode::read == 0") + PrintOk(wx.wxFTP.ASCII ~= nil, "Test class %enum wxFTP::ASCII is bound as wx.wxFTP.ASCII.") + a = wx.wxEVT_NULL PrintOk(a == wx.wxEVT_NULL, "Test %define_event wxEVT_NULL == -1") *************** *** 75,78 **** --- 77,84 ---- PrintOk(a:FindOrCreatePen(wx.wxRED, 1, wx.wxSOLID):Ok(), "Test %define_pointer wxThePenList:FindOrCreatePen(wx.wxRED, 1, wx.wxSOLID) is Ok()") + -- --------------------------------------------------------------------------- + print("\nTest some automatic overload binding functions.\n") + -- --------------------------------------------------------------------------- + a = wx.wxString("Hello") PrintOk(a:GetData() == "Hello", "Test automatic overload of wxString(\"lua string\")") *************** *** 108,117 **** -- --------------------------------------------------------------------------- ! print("\nTest some binding class functions.\n") -- --------------------------------------------------------------------------- pt = wx.wxPoint(1, 2) ! PrintOk(pt:GetX() == 1, "%rename %member using wxPoint:GetX()") ! PrintOk(pt.x == 1, "%rename %member using wxPoint.x") pt2 = wx.wxPoint(pt) --- 114,124 ---- -- --------------------------------------------------------------------------- ! print("\nTest some %member binding class functions.\n") -- --------------------------------------------------------------------------- pt = wx.wxPoint(1, 2) ! PrintOk(pt:GetX() == 1, "%rename %member using wxPoint:GetX(), member variable functions") ! PrintOk(pt.x == 1, "%rename %member using wxPoint.x, member variable properties work.") ! PrintOk(pt.X == 1, "%rename %member using wxPoint.X, automatic properties work.") pt2 = wx.wxPoint(pt) *************** *** 126,129 **** --- 133,144 ---- pt:SetX(20) PrintOk(pt.x == 20, "%rename %member using wxPoint:SetX(20); wxPoint.x") + pt.SetX(pt, 30) + PrintOk(pt.x == 30, "%rename %member using wxPoint.SetX(self, 30); wxPoint.x") + pt.X = 40 + PrintOk(pt.X == 40, "%rename %member using wxPoint.X = 40; wxPoint.x") + + -- --------------------------------------------------------------------------- + print("\nTest some binding class functions.\n") + -- --------------------------------------------------------------------------- -- Call functions with user data *************** *** 147,153 **** -- Test static functions and calling them ! fname = 'a321.123X!x!' f = wx.wxFileName(fname) PrintOk(f.GetCwd() == wx.wxFileName.GetCwd(), "Calling static wxString wxFileName::GetCwd(), as static member and static global.") -- Test overloaded static and non static functions --- 162,169 ---- -- Test static functions and calling them ! fname = 'a321.123X!x!' -- should not exist f = wx.wxFileName(fname) PrintOk(f.GetCwd() == wx.wxFileName.GetCwd(), "Calling static wxString wxFileName::GetCwd(), as static member and static global.") + PrintOk(f.GetCwd() == wx.wxGetCwd(), "Calling static wxString wxFileName::GetCwd() == wx.wxGetCwd().") -- Test overloaded static and non static functions *************** *** 158,163 **** PrintOk(f(5,5):Ok(), "Calling wx.wxImage.new(5,5) function as constructor.") ! -- Test class member enums to see if they're bound ! PrintOk(wx.wxFTP.ASCII ~= nil, "See if class enum wxFTP::ASCII enum is bound as wx.wxFTP.ASCII.") -- --------------------------------------------------------------------------- --- 174,185 ---- PrintOk(f(5,5):Ok(), "Calling wx.wxImage.new(5,5) function as constructor.") ! -- Test calling a baseclass function a few levels deep ! a = wx.wxStdDialogButtonSizer(); -- base is wxBoxSizer whose base is wxSizer ! a:SetMinSize(1, 2) -- this should also work ! PrintOk(a:GetMinSize():GetWidth() == 1, "Calling wx.wxStdDialogButtonSizer[base func wxBoxSizer->wxSizer]::GetMinSize().") ! PrintOk(a:GetOrientation() == wx.wxHORIZONTAL, "Calling wx.wxStdDialogButtonSizer[base func wxBoxSizer]::GetOrientation().") ! PrintOk(a:GetCancelButton() == nil, "Calling wx.wxStdDialogButtonSizer::GetCancelButton().") -- not a great test ! b = wx.wxButton(); b:SetName("Hello"); a:SetCancelButton(b) ! PrintOk(a:GetCancelButton():GetName() == "Hello", "Calling wx.wxStdDialogButtonSizer::GetCancelButton() after setting it with a button.") -- --------------------------------------------------------------------------- *************** *** 196,202 **** PrintOk(a:TestVirtualFunctionBinding("Hello") == "Hello-Base-Lua", "Test wxLuaPrintout::TestVirtualFunctionBinding overriding it and calling base.") ! print("\n") print("Tests run : "..tostring(tests_run)..", Tests that failed : "..tostring(failed_tests)..".\n") \ No newline at end of file --- 218,237 ---- PrintOk(a:TestVirtualFunctionBinding("Hello") == "Hello-Base-Lua", "Test wxLuaPrintout::TestVirtualFunctionBinding overriding it and calling base.") + -- --------------------------------------------------------------------------- + print("\nTest the bit library.\n") + -- --------------------------------------------------------------------------- + PrintOk(bit.bnot(0) == -1, "Test bit library bit.bnot.") + PrintOk(bit.band(0x1, 0x3, 0x5) == 1, "Test bit library bit.band.") + PrintOk(bit.bor(0x1, 0x3, 0x5) == 7, "Test bit library bit.bor.") + PrintOk(bit.bxor(0x1, 0x1, 0x3, 0x5) == 6, "Test bit library bit.bxor.") + PrintOk(bit.lshift(0x1, 1) == 2, "Test bit library bit.lshift.") + PrintOk(bit.rshift(0x2, 1) == 1, "Test bit library bit.rshift.") + PrintOk(bit.arshift(-2, 1) == -1, "Test bit library bit.arshift.") -- note this preserves sign + PrintOk(bit.mod(7, 2) == 1, "Test bit library bit.mod.") ! -- --------------------------------------------------------------------------- ! print("\n\nResults.\n") ! -- --------------------------------------------------------------------------- print("Tests run : "..tostring(tests_run)..", Tests that failed : "..tostring(failed_tests)..".\n") \ No newline at end of file |
From: John L. <jr...@us...> - 2007-06-13 00:09:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxluasocket/src Modified Files: wxluasocket.cpp Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxluasocket.cpp 12 Jun 2007 00:08:42 -0000 1.26 --- wxluasocket.cpp 13 Jun 2007 00:09:04 -0000 1.27 *************** *** 105,109 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerServer_Delete }}; static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L) { --- 105,109 ---- 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) { *************** *** 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, 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,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 }, *************** *** 459,463 **** 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, 1, 1, s_wxluatagArray_wxLua_wxLuaDebuggerEvent_Delete }}; static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L) { --- 459,463 ---- 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) { *************** *** 549,553 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaDebuggerEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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 }, --- 549,553 ---- // 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 }, |
From: John L. <jr...@us...> - 2007-06-13 00:09:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxluasocket_bind.h 12 Jun 2007 05:03:17 -0000 1.20 --- wxluasocket_bind.h 13 Jun 2007 00:09:04 -0000 1.21 *************** *** 27,33 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 11 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 11 // --------------------------------------------------------------------------- --- 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 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-13 00:09:07
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxbindstc/src Modified Files: stc.cpp Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** stc.cpp 12 Jun 2007 00:08:41 -0000 1.38 --- stc.cpp 13 Jun 2007 00:09:03 -0000 1.39 *************** *** 8561,8565 **** 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, 1, 1, s_wxluatagArray_wxLua_wxStyledTextEvent_Delete }}; static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L) { --- 8561,8565 ---- 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) { *************** *** 9366,9370 **** // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxStyledTextEvent_methods[] = { ! { "Delete", WXLUAMETHOD_METHOD, 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,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 }, |
From: John L. <jr...@us...> - 2007-06-13 00:09:07
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** wxldefs.h 12 Jun 2007 05:03:17 -0000 1.23 --- wxldefs.h 13 Jun 2007 00:09:04 -0000 1.24 *************** *** 67,71 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 11 // ---------------------------------------------------------------------------- --- 67,71 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 12 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wxlbind.h 12 Jun 2007 05:03:17 -0000 1.49 --- wxlbind.h 13 Jun 2007 00:09:04 -0000 1.50 *************** *** 86,90 **** // but are the min and max of all functions ! WXLUAMETHOD_OVERLOAD_BASE = 0x4000, // Class method has been checked to see if it is // overloaded from the base class by the function // wxLuaBinding::GetClassMethod(wxLuaBindClass...) --- 86,94 ---- // but are the min and max of all functions ! WXLUAMETHOD_DELETE = 0x4000, // This is the delete function that wxLua has generated ! // to delete this class and is not part of the ! // original class. ! ! WXLUAMETHOD_OVERLOAD_BASE = 0x8000, // Class method has been checked to see if it is // overloaded from the base class by the function // wxLuaBinding::GetClassMethod(wxLuaBindClass...) |
From: John L. <jr...@us...> - 2007-06-13 00:09:07
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10172/wxLua/modules/wxbindstc/include Modified Files: wxbind.h Log Message: Add new flag for wxLuaBindMethod WXLUAMETHOD_DELETE to know if this is our special delete function. Do not treat the delete function as if it was overloaded from base class Fix MSVC warnings about comparing ints and enums in wxlbind.cpp Add "class" to get class from wxLuaBinding_XXX in lua, also check for null for class_name Add bitlib from Reuben Thomas to wxlstate.cpp, maybe not the best place, but it's small Add code for bindings.wx.lua to check base classes and also functions overloading base class functions Add more unittest.wx.lua code to verify bindings Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/include/wxbind.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxbind.h 12 Jun 2007 05:03:17 -0000 1.26 --- wxbind.h 13 Jun 2007 00:09:03 -0000 1.27 *************** *** 26,32 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 11 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 11 // --------------------------------------------------------------------------- --- 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 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-12 20:36:17
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26773/wxLua/docs Modified Files: wxlua.html Log Message: Add bitlib and hopefully clarified using . or : for class member functions, properties, static... Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** wxlua.html 12 Jun 2007 00:08:36 -0000 1.23 --- wxlua.html 12 Jun 2007 20:36:10 -0000 1.24 *************** *** 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 Documentation</title> <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLua Documentation</u></h2> --- 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 Documentation</title> ! <meta content="John Labenski" name="author"></head> <body><h2><u>wxLua Documentation</u></h2> *************** *** 37,47 **** manipulation, sockets, displaying HTML, and printing to name a few. There is no special initialization required in lua and you can use as ! much or as little of wxWidgets as you like.<br> <h3>References:</h3> wxLua website : <a href="http://wxlua.sourceforge.net">http://wxlua.sourceforge.net</a><br> wxLua Sourceforge page : <a href="http://sourceforge.net/projects/wxlua">http://sourceforge.net/projects/wxlua</a><br> Lua website : <a href="http://www.lua.org">http://www.lua.org</a><br> ! wxWidgets website : <a href="http://www.wxwidgets.org">http://www.wxwidgets.org</a><br> ! User and developer mailing list : wxl...@li...<br> <h2 style="text-decoration: underline;">Contents</h2> <ol> <li><a href="#Version_Information">Version --- 37,51 ---- manipulation, sockets, displaying HTML, and printing to name a few. There is no special initialization required in lua and you can use as ! much or as little of wxWidgets as you like.<br><br>Additionally, ! wxLua adds a library for manipulating the bits of integer numbers using ! the Bitlib library from Reuben Thomas.<br> <h3>References:</h3> wxLua website : <a href="http://wxlua.sourceforge.net">http://wxlua.sourceforge.net</a><br> wxLua Sourceforge page : <a href="http://sourceforge.net/projects/wxlua">http://sourceforge.net/projects/wxlua</a><br> Lua website : <a href="http://www.lua.org">http://www.lua.org</a><br> ! wxWidgets website : <a href="http://www.wxwidgets.org">http://www.wxwidgets.org</a><br>Bitlib ! library : <a href="http://rrt.sc3d.org/Software/Lua/">http://rrt.sc3d.org/Software/Lua/</a><br>User ! and developer mailing list : ! wxl...@li...<br> <h2 style="text-decoration: underline;">Contents</h2> <ol> <li><a href="#Version_Information">Version *************** *** 49,53 **** <li><a href="#Introduction_to_Lua_very_brief">Introduction to Lua ! (very brief)</a></li> <li><a href="#wxLua_Programming_in_Lua">Programming in wxLua</a></li> <li><a href="#wxLua_Samples">wxLua Samples and How --- 53,58 ---- <li><a href="#Introduction_to_Lua_very_brief">Introduction to Lua ! (very brief)</a></li><li><a href="#Bit_Library">Bit ! Library</a></li> <li><a href="#wxLua_Programming_in_Lua">Programming in wxLua</a></li> <li><a href="#wxLua_Samples">wxLua Samples and How *************** *** 263,294 **** printHi() do return end; print("hi") end</i> which can be useful for debugging functions.</li> </ul> ! </ul><blockquote> <pre>do<br> -- create a new local scope<br> local a = 2<br>end<br></pre> ! </blockquote><ul> <li><b>if (bool) then ... 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 print # 5.</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 while true do<br> a = a + 1 -- no increment operator<br> if CheckA(a) then <br> break <br> else<br> print(a)<br> end<br>break end end</pre> ! </blockquote><ul> <li><b>repeat ... until (bool)</b></li> <ul> <li>Note : there is no continue keyword only break</li> </ul> ! </ul><blockquote> <pre>local a = 1<br>repeat<br> local temp = a * 2<br> print(temp, type(temp))<br> a = a + 1 -- no increment operator<br>until a > 10</pre> ! </blockquote><ul> <li><b>for var = init_value, end_value [, increment] do --- 268,296 ---- printHi() do return end; print("hi") end</i> which can be useful for debugging functions.</li> </ul> ! </ul><blockquote> <pre>do<br> -- create a new local scope<br> local a = 2<br>end<br></pre></blockquote><ul><li><b>if (bool) then ... 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 print # 5.</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 while true do<br> a = a + 1 -- no increment operator<br> if CheckA(a) then <br> break <br> else<br> print(a)<br> end<br>break end end</pre></blockquote><ul><li><b>repeat ... until (bool)</b></li> <ul> <li>Note : there is no continue keyword only break</li> </ul> ! </ul><blockquote> <pre>local a = 1<br>repeat<br> local temp = a * 2<br> print(temp, type(temp))<br> a = a + 1 -- no increment operator<br>until a > 10</pre></blockquote><ul><li><b>for var = init_value, end_value [, increment] do *************** *** 299,304 **** it did before the loop. Copy the loop counter variable to a separate variable if you need to save it when breaking for example.</li> </ul> ! </ul><blockquote> <pre>local a = "hello"<br>for a = 1, 10 --[[, increment]] do -- optional increment value, else 1<br> -- the a here is local to the for loop and you CANNOT change it to affect the loop, use break<br> local temp = a * 2<br> print(temp)<br>end<br>print(a) -- a == "hello" since the a in the for loop above was local to the loop<br></pre> ! </blockquote><ul> <li><b>functions</b></li> <ul> <li>Input any number of values by value, tables are passed by --- 301,305 ---- it did before the loop. Copy the loop counter variable to a separate variable if you need to save it when breaking for example.</li> </ul> ! </ul><blockquote> <pre>local a = "hello"<br>for a = 1, 10 --[[, increment]] do -- optional increment value, else 1<br> -- the a here is local to the for loop and you CANNOT change it to affect the loop, use break<br> local temp = a * 2<br> print(temp)<br>end<br>print(a) -- a == "hello" since the a in the for loop above was local to the loop<br></pre></blockquote><ul><li><b>functions</b></li> <ul> <li>Input any number of values by value, tables are passed by *************** *** 310,315 **** receive return values that you do not want (e.g. if you only want the second return value, use _ for the first).</li> </ul> ! </ul><blockquote> <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global and/or input number a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 10<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)<br>print(a, result) -- "10, 72" since a is not changed</pre> ! </blockquote><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 --- 311,334 ---- receive return values that you do not want (e.g. if you only want the second return value, use _ for the first).</li> </ul> ! </ul><blockquote> <pre>function DoStuff(a, b, c)<br> a = b*c -- does not change global and/or input number a<br> local function Calc(a)<br> return a*2<br> end<br> <br> return Calc(a)*b*c -- or for multiple values "return a*b*c, a*b"<br>end<br>-- call function<br>a = 10<br>result = DoStuff(a, 1, 2)<br>-- can also put function into a table<br>stuff = {}<br>stuff.DoStuff = DoStuff<br>result = stuff.DoStuff(1, 2, 3)<br>print(a, result) -- "10, 72" since a is not changed</pre></blockquote><h2 style="text-decoration: underline;"><a name="Bit_Library"></a>Bit ! Library</h2>wxLua automatically loads a library for manipulating ! the bits of an integer and puts it into the global "bit" table. This is ! because wxWidgets often uses enumeration flags to control the behavior ! of functions and for compactly storing information about the status of ! things. You can easily "or" bits by adding them together and ! this is the preferred method, for example 0x02 + 0x04 = 0x06 or bitwise ! 0110, but 0x01 + 0x03 = 0x04 or bitwise 0100 (oops). If however, you do ! require a true "or" function you have to be a ! little more clever in lua since there are no builtin methods to do ! this. <br><br>wxLua uses the bitlib library written by ! Reuben Thomas and since the code for it is small, it's embedded into ! the wxLua sourcecode. <br><br>All ! function arguments should be integers. The number of bits available for ! logical operations depends on the data type used to represent Lua ! numbers; this is typically 8-byte IEEE floats, which give 53 bits (the ! 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 *************** *** 494,498 **** function with. If you <span style="font-style: italic;">really</span> want to use the '.' notation you can pass the "self" in as the first ! parameter.</li> <ul> <li>Example : <i>"size = wx.wxSize(1, 2); size:SetWidth(10); size.SetHeight(size, 11); print(size:GetWidth(), size.GetHeight(size))"</i> where we create --- 513,521 ---- function with. If you <span style="font-style: italic;">really</span> want to use the '.' notation you can pass the "self" in as the first ! parameter. There are two exceptions to the ':' calling convention rule, ! <span style="font-weight: bold;">properties</span> ! and <span style="font-weight: bold;">static</span> ! functions, please see the sections below about why they only use the ! '.' convention.</li> <ul> <li>Example : <i>"size = wx.wxSize(1, 2); size:SetWidth(10); size.SetHeight(size, 11); print(size:GetWidth(), size.GetHeight(size))"</i> where we create *************** *** 506,527 **** <li><b>Property functions</b> allow ! you to read and/or write values to a class using the '.' convention.</li> <ul> <li>These are generated on the fly when the function is ! called and work only for these functions.</li> <ul> <li>GetXXX() ! takes no values and returns one -> ! property name XXX</li> <li>SetXXX() takes one value and ! returns one -> ! property name XXX</li> <li>The Get/Set is removed and you do not use them like ! a function call using (), but rather like accessing a table member. </li> ! </ul> </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>These properties are available for most Get/SetXXX ! class member functions.</li> <li>NOTE : Is this really necessary? Confusing? Useful? I'd stick with the Get/Set functions. - JL</li> </ul> <li><b>Member ! functions</b> allow you to read and/or write to member variables of a class.</li> <ul> <li>Declared in the interface files using the <i>%member</i> --- 529,556 ---- <li><b>Property functions</b> allow ! you to read and/or write values to a class using the '.' convention and ! a shortened name.</li> <ul> <li>These are generated on the fly when the function is ! called on a wxLua userdata and work only for functions ! following these rules.</li> <ul> <li>GetXXX() ! takes no values and returns one. </li> <li>SetXXX() ! takes one value and ! 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? I'd stick with the Get/Set functions. - JL</li> </ul> <li><b>Member ! variable functions</b> allow you to read and/or write to member variables of a class.</li> <ul> <li>Declared in the interface files using the <i>%member</i> *************** *** 531,535 **** declared for wxPoint : <i>"%rename X %member int x"</i></li> <li>The wxPoint class does not have functions to access ! the x, y variables so we create our own.</li> <li>The <i>%member</i> tag creates functions called Get/Set[variable name] or in this case Getx() and Setx(value), --- 560,564 ---- declared for wxPoint : <i>"%rename X %member int x"</i></li> <li>The wxPoint class does not have functions to access ! the int x, y variables so we create our own.</li> <li>The <i>%member</i> tag creates functions called Get/Set[variable name] or in this case Getx() and Setx(value), *************** *** 545,553 **** functions</b> are part of the table that holds the class and can be called with or without a class ! instance.</li> <ul> <li>Example : <i>f = wx.wxFileName('dummy'); f.GetCwd() == wx.wxFileName.GetCwd()</i></li> <li>Note ! that you use the '.' calling convention since ! static C++ functions do not require the object itself.<br> </li> </ul> <li><b>Enum members</b> are also part of the --- 574,587 ---- functions</b> are part of the table that holds the class and can be called with or without a class ! instance (a userdata).</li> <ul> <li>Example : <i>f ! = wx.wxFileName('dummy'); f.GetCwd() == wx.wxFileName.GetCwd()</i></li> <li>Note ! that you always use the '.' calling convention since ! static C++ functions do not require the object itself or in lua's case ! the userdata.</li><li>See the <span style="font-weight: bold;">properties</span> section ! about the difference between '.' and ':' and why using a ':' cannot be ! made to work reliably when you don't want or need the self pushed onto ! the stack. </li> </ul> <li><b>Enum members</b> are also part of the *************** *** 625,629 **** the virtual functions overridden to check to see if there is a lua function to call instead of the base class function. This has only ! been done for cases where it is necessary, in many cases you can intercept the appropriate wxEvent and change the behavior from within the handler.</li><li>Examples of virtual functions that --- 659,663 ---- the virtual functions overridden to check to see if there is a lua function to call instead of the base class function. This has only ! been done for cases where it is necessary. In many cases you can intercept the appropriate wxEvent and change the behavior from within the handler.</li><li>Examples of virtual functions that *************** *** 663,668 **** that creates a new wxRect, sets your extra functions for it, and returns it for use.</li><ul> </ul> </ul> ! </ul> </ul> ! </ul><h2><a name="wxLua_Samples"></a><u><u>wxLua Samples and How to Run Them</u></u></h2> There are a number of sample programs in the <i style="font-style: italic;">wxLua/samples</i> --- 697,701 ---- that creates a new wxRect, sets your extra functions for it, and returns it for use.</li><ul> </ul> </ul> ! </ul> </ul></ul><h2><a name="wxLua_Samples"></a><u><u>wxLua Samples and How to Run Them</u></u></h2> There are a number of sample programs in the <i style="font-style: italic;">wxLua/samples</i> *************** *** 711,716 **** directory so you may have to specify a different path depending on where you are running lua.exe from. For more information see <a href="#wrapmodule.wx.lua">wrapmodule.wx.lua</a>. </li> ! </ul> ! </ul><h3><a name="Provided_samples"></a>Provided Samples</h3> <ul> <li><b>bindings.wx.lua</b></li> <ul> --- 744,748 ---- directory so you may have to specify a different path depending on where you are running lua.exe from. For more information see <a href="#wrapmodule.wx.lua">wrapmodule.wx.lua</a>. </li> ! </ul></ul><h3><a name="Provided_samples"></a>Provided Samples</h3> <ul> <li><b>bindings.wx.lua</b></li> <ul> *************** *** 991,996 **** = ";;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;"</li> ! </ul> </ul> ! </ul><h2><a name="wxLua_Sourcecode_Modules"></a><u>wxLua Sourcecode Modules</u></h2> wxLua is broken up into "modules" that are compiled into libraries so --- 1023,1027 ---- = ";;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;"</li> ! </ul> </ul></ul><h2><a name="wxLua_Sourcecode_Modules"></a><u>wxLua Sourcecode Modules</u></h2> wxLua is broken up into "modules" that are compiled into libraries so |
From: John L. <jr...@us...> - 2007-06-12 13:19:45
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21156/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Fix wxLuaBinding::GetClassMethod to not always return the baseclass Fix CreateArgTagsMessage to use the correct method->funcs_n Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** wxlstate.cpp 12 Jun 2007 00:08:42 -0000 1.107 --- wxlstate.cpp 12 Jun 2007 13:19:37 -0000 1.108 *************** *** 904,908 **** //---------------------------------------------------------------------------- ! wxLuaStateData::wxLuaStateData() :m_bindings_registered(false), m_wxluatag_wxLuaFunction(0), --- 904,908 ---- //---------------------------------------------------------------------------- ! wxLuaStateData::wxLuaStateData() :m_bindings_registered(false), m_wxluatag_wxLuaFunction(0), *************** *** 973,977 **** wxHashMapLuaStateRefData wxLuaStateRefData::s_wxHashMapLuaStateRefData; ! wxLuaStateRefData::wxLuaStateRefData(bool create_data) :m_lua_State(NULL), m_lua_State_static(false), --- 973,977 ---- wxHashMapLuaStateRefData wxLuaStateRefData::s_wxHashMapLuaStateRefData; ! wxLuaStateRefData::wxLuaStateRefData(bool create_data) :m_lua_State(NULL), m_lua_State_static(false), *************** *** 1059,1063 **** } ! // Clear these after closing lua for gc to run m_wxlStateData->m_callbackList.Clear(); m_wxlStateData->m_winDestroyCallbackList.Clear(); --- 1059,1063 ---- } ! // Clear these after closing lua for gc to run m_wxlStateData->m_callbackList.Clear(); m_wxlStateData->m_winDestroyCallbackList.Clear(); *************** *** 1193,1197 **** lua_pushlightuserdata( L, (void*)m_refData ); lua_rawset( L, LUA_REGISTRYINDEX ); // set the value ! // register handlers to send events RegisterFunction(wxlua_printFunction, "print"); --- 1193,1197 ---- lua_pushlightuserdata( L, (void*)m_refData ); lua_rawset( L, LUA_REGISTRYINDEX ); // set the value ! // register handlers to send events RegisterFunction(wxlua_printFunction, "print"); *************** *** 1692,1696 **** lua_State* L = M_WXLSTATEDATA->m_lua_State; ! // Stick us into the lua_State - push key, value // make sure we're there, even though we might have already done this. wxlua_pushstring_wxLuaStateRefData(L); --- 1692,1696 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; ! // Stick us into the lua_State - push key, value // make sure we're there, even though we might have already done this. wxlua_pushstring_wxLuaStateRefData(L); *************** *** 1785,1789 **** lua_State* L = M_WXLSTATEDATA->m_lua_State; const wxLuaBindClass* wxlClass = wxlua_tgetclass(L, class_tag); ! // we shouldn't ever need this code if (wxlClass == NULL) --- 1785,1789 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; const wxLuaBindClass* wxlClass = wxlua_tgetclass(L, class_tag); ! // we shouldn't ever need this code if (wxlClass == NULL) *************** *** 3463,3467 **** { wxLuaBindCFunc* funcs = method->funcs; ! int i, arg, funcs_count = wxlMethod->funcs_n; wxString className; --- 3463,3467 ---- { wxLuaBindCFunc* funcs = method->funcs; ! int i, arg, funcs_count = method->funcs_n; wxString className; Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** wxlbind.cpp 12 Jun 2007 05:03:17 -0000 1.71 --- wxlbind.cpp 12 Jun 2007 13:19:37 -0000 1.72 *************** *** 1066,1072 **** if (search_baseclasses && wxlClass->baseclass) ! wxlMethod = GetClassMethod(wxlClass->baseclass, methodName, search_baseclasses); ! return wxlMethod; } --- 1066,1072 ---- if (search_baseclasses && wxlClass->baseclass) ! return GetClassMethod(wxlClass->baseclass, methodName, search_baseclasses); ! return NULL; } |
From: John L. <jr...@us...> - 2007-06-12 05:03:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22549/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h wxlstate.h Log Message: Add ability to do profiling in GCC using Makefiles Add InitBinding function to wxLuaBinding to presort items Test code for sorted wxLuaMethods, doesn't seem to be any faster though. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxldefs.h 12 Jun 2007 00:08:42 -0000 1.22 --- wxldefs.h 12 Jun 2007 05:03:17 -0000 1.23 *************** *** 67,71 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 10 // ---------------------------------------------------------------------------- --- 67,71 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 11 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** wxlbind.h 12 Jun 2007 00:08:42 -0000 1.48 --- wxlbind.h 12 Jun 2007 05:03:17 -0000 1.49 *************** *** 225,229 **** // Call GetObject() so that it's on the stack then try to get the value of // the object as the specified type and set the member variable equal to it ! // and return a pointer to member variable to a function that wants // a pointer to read/write from/to. bool *GetBoolPtr(); --- 225,229 ---- // Call GetObject() so that it's on the stack then try to get the value of // the object as the specified type and set the member variable equal to it ! // and return a pointer to member variable to a function that wants // a pointer to read/write from/to. bool *GetBoolPtr(); *************** *** 339,343 **** virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing namespace Lua table ! virtual void UnRegisterBinding(lua_State* L); // ----------------------------------------------------------------------- --- 339,343 ---- virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing namespace Lua table ! virtual void UnRegisterBinding(const wxLuaState& wxlState); // ----------------------------------------------------------------------- *************** *** 397,401 **** // Lookup a lua method or get property called methodName in the wxLuaBindClass array wxlClass. ! // Ensure that the lookup is of WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP type. // If the lua method cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the method name, --- 397,401 ---- // Lookup a lua method or get property called methodName in the wxLuaBindClass array wxlClass. ! // Ensure that the lookup is of WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP type. // If the lua method cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the method name, *************** *** 403,407 **** static wxLuaBindMethod* GetClassMethod(const wxLuaBindClass *wxlClass, const char *methodName, bool search_baseclasses = true); // Lookup a lua property function named propName in the wxLuaBindClass wxlClass ! // Ensure that the lookup is of WXLUAMETHOD_GETPROP|WXLUAMETHOD_SETPROP type. // If the lua property cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the property name, --- 403,407 ---- static wxLuaBindMethod* GetClassMethod(const wxLuaBindClass *wxlClass, const char *methodName, bool search_baseclasses = true); // Lookup a lua property function named propName in the wxLuaBindClass wxlClass ! // Ensure that the lookup is of WXLUAMETHOD_GETPROP|WXLUAMETHOD_SETPROP type. // If the lua property cannot be found on the current class recurse through base classes // Return a pointer to the wxLuaBindMethod that corresponds to the property name, *************** *** 417,420 **** --- 417,423 ---- protected: + void InitBinding(); // must called after subclassed version is created + // to sort the bindings appropriately + // Registers binding, returns lua table reference to binding virtual int LUACALL RegisterFunctions(const wxLuaState& wxlState, bool registerTypes); Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** wxlstate.h 12 Jun 2007 00:08:42 -0000 1.76 --- wxlstate.h 12 Jun 2007 05:03:17 -0000 1.77 *************** *** 132,136 **** // Push the errorMsg on the stack and call lua_error WXDLLIMPEXP_WXLUA void LUACALL wxlua_terror(lua_State* L, const char* errorMsg); ! wxLUA_UNICODE_ONLY(WXDLLIMPEXP_WXLUA void LUACALL wxlua_terror(lua_State* L, const wxString& errorMsg) { wxlua_terror(L, wx2lua(errorMsg)); }) // Push the object u onto the top of the stack wrapped in a newuserdata // with it's metatable set to the table from tget(tag). Returns true if the --- 132,136 ---- // Push the errorMsg on the stack and call lua_error WXDLLIMPEXP_WXLUA void LUACALL wxlua_terror(lua_State* L, const char* errorMsg); ! wxLUA_UNICODE_ONLY(inline WXDLLIMPEXP_WXLUA void LUACALL wxlua_terror(lua_State* L, const wxString& errorMsg) { wxlua_terror(L, wx2lua(errorMsg)); }) // Push the object u onto the top of the stack wrapped in a newuserdata // with it's metatable set to the table from tget(tag). Returns true if the *************** *** 184,188 **** // and wxlua_getluatype() since it allows a small amount of coersion between types. // It also doesn't account for the automatic conversion of certain lua types ! // to wxluatypes, (wxString, wxArrayString, wxArrayInt) // see wxLuaState::IswxLuaType which is more complete. WXDLLIMPEXP_WXLUA int LUACALL wxlua_iswxluatype(int luatype, int wxluaarg_tag); --- 184,188 ---- // and wxlua_getluatype() since it allows a small amount of coersion between types. // It also doesn't account for the automatic conversion of certain lua types ! // to wxluatypes, (wxString, wxArrayString, wxArrayInt) // see wxLuaState::IswxLuaType which is more complete. WXDLLIMPEXP_WXLUA int LUACALL wxlua_iswxluatype(int luatype, int wxluaarg_tag); *************** *** 198,202 **** // Is this data a userdata object that wxLua has pushed into lua? ! // This should be the same as // (lua_isuserdata(L, stack_idx) && !lua_islightuserdata(L, stack_idx)) #define wxlua_iswxuserdata(L, stack_idx) (lua_type((L), (stack_idx)) == LUA_TUSERDATA) --- 198,202 ---- // Is this data a userdata object that wxLua has pushed into lua? ! // This should be the same as // (lua_isuserdata(L, stack_idx) && !lua_islightuserdata(L, stack_idx)) #define wxlua_iswxuserdata(L, stack_idx) (lua_type((L), (stack_idx)) == LUA_TUSERDATA) *************** *** 217,221 **** // wxlua_terror with a message that's appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) ! // Note: The function wxLuaState::GetwxStringType does automatic conversion // of both a lua string and a userdata wxString to a wxString. WXDLLIMPEXP_WXLUA const char* LUACALL wxlua_getstringtype(lua_State* L, int stack_idx); --- 217,221 ---- // wxlua_terror with a message that's appropriate for stack_idx to be a // parameter to a function call. (These are used in the bindings) ! // Note: The function wxLuaState::GetwxStringType does automatic conversion // of both a lua string and a userdata wxString to a wxString. WXDLLIMPEXP_WXLUA const char* LUACALL wxlua_getstringtype(lua_State* L, int stack_idx); *************** *** 232,236 **** // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings. You need to delete the array, but not ! // the individual strings since lua should still have them during the life of the // returned array, if not you will need to copy them. // returns the number of character strings in the array in count. --- 232,236 ---- // Convert the table at stack index to a "new" array of const char* strings. // Return a pointer to the array of strings. You need to delete the array, but not ! // the individual strings since lua should still have them during the life of the // returned array, if not you will need to copy them. // returns the number of character strings in the array in count. *************** *** 585,589 **** // delete all stray wxWindow derived classes that have been destroyed ! // by wxWidgets (eg. a child window) // This function does not need to be called ever, for debugging perhaps? void GarbageCollectWindows(bool closeWindows); --- 585,589 ---- // delete all stray wxWindow derived classes that have been destroyed ! // by wxWidgets (eg. a child window) // This function does not need to be called ever, for debugging perhaps? void GarbageCollectWindows(bool closeWindows); *************** *** 734,738 **** // 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 SetDerivedMethod(void *pObject, const char *method_name, wxLuaObject* wxlObj); --- 734,738 ---- // 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 SetDerivedMethod(void *pObject, const char *method_name, wxLuaObject* wxlObj); *************** *** 746,750 **** // Find a derived method given an object and and a method name. // If the method can be found, return the valid wxLuaState it belongs to. ! // This function can be used for classes that implement virtual functions to // try to find a wxLuaState that may have overridden the function to call it. // It is probably easier to merely make a wxLuaState a class member for --- 746,750 ---- // Find a derived method given an object and and a method name. // If the method can be found, return the valid wxLuaState it belongs to. ! // This function can be used for classes that implement virtual functions to // try to find a wxLuaState that may have overridden the function to call it. // It is probably easier to merely make a wxLuaState a class member for |
From: John L. <jr...@us...> - 2007-06-12 05:03:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22549/wxLua/modules/wxlua/src Modified Files: Makefile wxlbind.cpp Log Message: Add ability to do profiling in GCC using Makefiles Add InitBinding function to wxLuaBinding to presort items Test code for sorted wxLuaMethods, doesn't seem to be any faster though. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 23 May 2007 20:17:24 -0000 1.12 --- Makefile 12 Jun 2007 05:03:17 -0000 1.13 *************** *** 36,40 **** CXX = $(WXCXX) ! APPEXTRADEFS = -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= TARGET_LIBNAME = lib$(WXBASENAME)_wxlua-$(WXRELEASE) --- 36,42 ---- CXX = $(WXCXX) ! GCC_PROFILE = #-pg ! APPEXTRADEFS = $(GCC_PROFILE) -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= ! APPEXTRALIBS = $(GCC_PROFILE) TARGET_LIBNAME = lib$(WXBASENAME)_wxlua-$(WXRELEASE) *************** *** 78,82 **** $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ --- 80,84 ---- $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) $(APPEXTRALIBS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wxlbind.cpp 12 Jun 2007 00:08:42 -0000 1.70 --- wxlbind.cpp 12 Jun 2007 05:03:17 -0000 1.71 *************** *** 245,249 **** wxLuaBindClass *wxlClass = (wxLuaBindClass *)lua_touserdata(L, lua_upvalueindex(1)); - //bool tracked = false; long key = -1; --- 245,248 ---- *************** *** 254,265 **** wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxluabind_garbageCollect")); - //tracked = wxlState.RemoveTrackedObject((void*)key, true); wxlState.RemoveDerivedMethod((void*)key); } - //wxPrintf(wxT("wxluabind_garbageCollect - '%s' tag %d lua %d key %ld tracked %d return value %d\n"), - // lua2wx(wxlClass ? wxlClass->name : "").c_str(), wxlClass ? *wxlClass->class_tag : 0, (int)L, key, (int)tracked, retVal); - return 0; } --- 253,260 ---- *************** *** 270,276 **** // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). ! // If the method is a function method push the create a wxLua function object ! // onto the lua stack, setting its tag so that the function tag of the object ! // will be called to invoke the function. // ---------------------------------------------------------------------------- --- 265,271 ---- // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). ! // If the method is a function method push a wxLuaFunction object ! // onto the lua stack, setting its metatable so that when lua calls __call ! // the wxLuaFunction will run it. // ---------------------------------------------------------------------------- *************** *** 297,315 **** const char *name = NULL; - // debugging code for the table function, see print statement below - //int init_isuserdata = lua_isuserdata(L, 1); - //int init_islightuserdata = lua_islightuserdata(L, 1); - //int init_ttag = wxlState.ttag(1); - //int init_class_tag = wxlClass ? *wxlClass->class_tag : -1; - if ((wxlClass != NULL) && wxlua_iswxuserdata(L, 1) && (wxlState.ttag(1) == *wxlClass->class_tag)) { void *pObject = wxlState.ttouserdata(1); ! name = lua_tostring(L, 2); // make a copy of the string ! callbase = name[0] == '_'; if (callbase) ! name++; // skip past "_"FunctionName else { --- 292,304 ---- const char *name = NULL; if ((wxlClass != NULL) && wxlua_iswxuserdata(L, 1) && (wxlState.ttag(1) == *wxlClass->class_tag)) { void *pObject = wxlState.ttouserdata(1); ! name = lua_tostring(L, 2); // name of the __index method called in lua ! callbase = (name[0] == '_'); if (callbase) ! name++; // skip past "_"[FunctionName] else { *************** *** 318,322 **** { found = true; ! result = 1; } } --- 307,311 ---- { found = true; ! result = 1; // the function for lua to call } } *************** *** 331,335 **** found = true; lua_remove(L, 2); // remove the name of the function ! result = (*wxlMethod->funcs[0].func)(L); } else --- 320,324 ---- found = true; lua_remove(L, 2); // remove the name of the function ! result = (*wxlMethod->funcs[0].func)(L); // always run 0th func, is main func or overload func } else *************** *** 337,342 **** found = true; result = 1; ! wxLuaFunction *pFunction = new wxLuaFunction(wxlMethod, wxlClass, pObject); ! wxlState.tpushusertag(pFunction, wxlState.GetwxLuaFunctionTag()); } } --- 326,331 ---- found = true; result = 1; ! wxLuaFunction *wxlFunc = new wxLuaFunction(wxlMethod, wxlClass, pObject); ! wxlState.tpushusertag(wxlFunc, wxlState.GetwxLuaFunctionTag()); } } *************** *** 354,358 **** if ((wxlMethod != NULL) && WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_METHOD)) ! //wxlMethod->funcs && (wxlMethod->funcs->minargs == 0) && //(wxlMethod->funcs->maxargs == 0)) { --- 343,347 ---- if ((wxlMethod != NULL) && WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_METHOD)) ! //wxlMethod->funcs && (wxlMethod->funcs->minargs == 0) && // let it error out //(wxlMethod->funcs->maxargs == 0)) { *************** *** 368,375 **** } - //if (lua2wx(name).Find(wxT("OnBeginDocument")) != -1) - // wxPrintf(wxT("wxluabind_getTableFunc func '%s' wxlClass %d '%s', userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d call base %d\n"), - // lua2wx(name).c_str(), (long)wxlClass, wxlClass ? lua2wx(wxlClass->name).c_str() : wxT(""), init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData(), (int)wxlState.GetCallBaseClassFunction()); - if (!found) wxlState.terror(wxString::Format(_("wxLua: Attempt to call an invalid method '%s'."), lua2wx(name).c_str())); --- 357,360 ---- *************** *** 383,387 **** // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). - // todo: Handling of properties // ---------------------------------------------------------------------------- --- 368,371 ---- *************** *** 395,400 **** bool found = false; - //wxPrintf(wxT("wxluabind_setTableFunc '%s'\n"), lua2wx(name).c_str()); - if ((wxlClass != NULL) && wxlua_iswxuserdata(L, 1) && (wxlState.ttag(1) == *wxlClass->class_tag)) { --- 379,382 ---- *************** *** 417,424 **** memcpy(str+3, name, len+1); // include terminating NULL - //wxPrintf(wxT("'%s' %d\n"), lua2wx(str).c_str(), lua_gettop(L)); - //wxLuaCheckStack stk(L, wxT("wxluabind_setTableFunc")); - //stk.DumpStack(); - wxlMethod = wxLuaBinding::GetClassMethod(wxlClass, str); if ((wxlMethod != NULL) && WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_METHOD)) --- 399,402 ---- *************** *** 441,450 **** } static int wxluabind_checkremovetable = 0; int wxluabind_removetableforcall(lua_State* L, bool only_check) { ! //void* p = (void *)lua_tocfunction(L, lua_upvalueindex(1)); ! void* p = (void *)lua_touserdata(L, lua_upvalueindex(1)); if (!only_check && (p == &wxluabind_checkremovetable)) lua_remove(L, 1); --- 419,431 ---- } + // Use the pointer to this int as a special tag to know that __call has been + // made on a table and that we want to remove the table for the bindings to + // work. This is because lua always pushes the table on the stack if '.' or ':' + // is used for the __call metamethod. static int wxluabind_checkremovetable = 0; int wxluabind_removetableforcall(lua_State* L, bool only_check) { ! void* p = (void *)lua_touserdata(L, lua_upvalueindex(1)); // lightuserdata if (!only_check && (p == &wxluabind_checkremovetable)) lua_remove(L, 1); *************** *** 454,470 **** // ---------------------------------------------------------------------------- ! // Function to compare to events by eventType // ---------------------------------------------------------------------------- ! int wxLuaEventListCompareFn(const void *p1, const void *p2) { ! return (*((const wxLuaBindEvent *) p1)->eventType) - (*((const wxLuaBindEvent *) p2)->eventType); } ! // ---------------------------------------------------------------------------- ! // Function to compare the class tag of two classes ! // ---------------------------------------------------------------------------- ! int wxLuaClassListCompareByTag(const void *p1, const void *p2) { ! return (*((const wxLuaBindClass *) p1)->class_tag) - (*((const wxLuaBindClass *) p2)->class_tag); } --- 435,498 ---- // ---------------------------------------------------------------------------- ! // Functions to compare binding structs using qsort and bsearch // ---------------------------------------------------------------------------- ! ! // Function to compare to wxLuaBindEvents by eventType ! int wxLuaBindEventArrayCompareFn(const void *p1, const void *p2) { ! return (*((const wxLuaBindEvent*)p1)->eventType) - (*((const wxLuaBindEvent*)p2)->eventType); ! } ! // Function to compare to wxLuaBindDefines by name ! int wxLuaBindDefineArrayCompareFn(const void *p1, const void *p2) ! { ! return strcmp(((const wxLuaBindDefine*)p1)->name, ((const wxLuaBindDefine*)p2)->name); ! } ! // Function to compare to wxLuaBindStrings by name ! int wxLuaBindStringArrayCompareFn(const void *p1, const void *p2) ! { ! return strcmp(((const wxLuaBindString*)p1)->name, ((const wxLuaBindString*)p2)->name); } + // Function to compare to wxLuaBindObjects by name + int wxLuaBindObjectArrayCompareFn(const void *p1, const void *p2) + { + return strcmp(((const wxLuaBindObject*)p1)->name, ((const wxLuaBindObject*)p2)->name); + } + // Function to compare to wxLuaBindMethods by name + int wxLuaBindMethodArrayCompareFnInit(const void *p1, const void *p2) + { + int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); + if (v == 0) + v = ((const wxLuaBindMethod*)p1)->type - ((const wxLuaBindMethod*)p2)->type; ! return v; ! } ! int wxLuaBindMethodArrayCompareFnGet(const void *p1, const void *p2) { ! int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); ! if (v == 0) ! { ! // get methods are either WXLUAMETHOD_METHOD or WXLUAMETHOD_GETPROP ! // and they can't both have the same names so either type will work ! int t1 = 0xFF & ((const wxLuaBindMethod*)p1)->type; ! int t2 = 0xFF & ((const wxLuaBindMethod*)p2)->type; ! int t12 = (t1 & t2); ! if ((t12 == WXLUAMETHOD_METHOD) || (t12 == WXLUAMETHOD_GETPROP) || ! (t12 == WXLUAMETHOD_METHOD|WXLUAMETHOD_GETPROP)) ! return 0; ! ! v = t1 - t2; ! } ! ! return v; ! } ! // Function to compare the wxLuaBindClasses by name ! int wxLuaBindClassArrayCompareFn(const void *p1, const void *p2) ! { ! return strcmp(((const wxLuaBindClass*)p1)->name, ((const wxLuaBindClass*)p2)->name); ! } ! // Function to compare the wxLuaBindClasses by class_tag ! int wxLuaBindClassArrayCompareByTag(const void *p1, const void *p2) ! { ! return (*((const wxLuaBindClass*)p1)->class_tag) - (*((const wxLuaBindClass*)p2)->class_tag); } *************** *** 480,483 **** --- 508,512 ---- m_classCount(0), m_classArray(NULL), m_defineCount(0), m_defineArray(NULL), + m_stringCount(0), m_stringArray(NULL), m_eventCount(0), m_eventArray(NULL), m_objectCount(0), m_objectArray(NULL), *************** *** 490,493 **** --- 519,550 ---- } + void wxLuaBinding::InitBinding() + { + // Sort all the bindings by something useful + if (m_classArray && (m_classCount > 0)) + { + qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); + + wxLuaBindClass* wxlClass = m_classArray; + for (size_t i = 0; i < m_classCount; ++i, ++wxlClass) + { + qsort(wxlClass->methods, wxlClass->methods_n, sizeof(wxLuaBindMethod), wxLuaBindMethodArrayCompareFnInit); + } + } + + if (m_defineArray && (m_defineCount > 0)) + qsort(m_defineArray, m_defineCount, sizeof(wxLuaBindDefine), wxLuaBindDefineArrayCompareFn); + + if (m_stringArray && (m_stringCount > 0)) + qsort(m_stringArray, m_stringCount, sizeof(wxLuaBindString), wxLuaBindStringArrayCompareFn); + + // sort by event type for fastest lookup + if (m_eventArray && (m_eventCount > 0)) + qsort(m_eventArray, m_eventCount, sizeof(wxLuaBindEvent), wxLuaBindEventArrayCompareFn); + + if (m_objectArray && (m_objectCount > 0)) + qsort(m_objectArray, m_objectCount, sizeof(wxLuaBindObject), wxLuaBindObjectArrayCompareFn); + } + void wxLuaBinding::RegisterBinding(const wxLuaState& wxlState, bool registerTypes) { *************** *** 499,506 **** --- 556,565 ---- // create a global table for the namespace if it doesn't already exist + // Note: we have to do it a second time to set the table RegisterFunctions created lua_getglobal(L, wx2lua(m_nameSpace)); if (!lua_istable(L, -1)) { + // The first time this namespace is used we need to create it lua_pop(L, 1); // pop the nil value *************** *** 510,523 **** } else ! lua_pop(L, 1); ! lua_pop(L, 1); } ! void wxLuaBinding::UnRegisterBinding(lua_State* L) { ! lua_pushstring(L, wx2lua(m_nameSpace)); ! lua_pushnil(L); ! lua_rawset(L, LUA_GLOBALSINDEX); } --- 569,583 ---- } else ! lua_pop(L, 1); // pop the already created namespace table ! lua_pop(L, 1); // pop the table created by RegisterFunctions } ! void wxLuaBinding::UnRegisterBinding(const wxLuaState& wxlState_) { ! wxLuaState wxlState(wxlState_); // unconst the state ! wxlState.lua_PushString(m_nameSpace); ! wxlState.lua_PushNil(); ! wxlState.lua_RawSet(LUA_GLOBALSINDEX); } *************** *** 525,529 **** { wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); ! wxLuaState wxlState(wxlState_); if (!registerTypes && !m_bindings_registered) --- 585,589 ---- { wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); ! wxLuaState wxlState(wxlState_); // unconst the state if (!registerTypes && !m_bindings_registered) *************** *** 599,603 **** lua_rawset(L, -3); - m_bindings_registered = true; --- 659,662 ---- *************** *** 630,634 **** for (size_t i_class = 0; i_class < m_classCount; ++i_class, ++wxlClass) { - // Create a new tag if registering types, else use tag already set if (registerTypes) --- 689,692 ---- *************** *** 641,645 **** // store a lookup table for the class tags to wxLuaBindClass structs ! wxlua_tget(L, *wxlClass->class_tag); lua_pushstring(L, "wxLuaBindClass"); lua_pushlightuserdata(L, (void *)wxlClass); --- 699,703 ---- // store a lookup table for the class tags to wxLuaBindClass structs ! wxlua_tget(L, iTag); lua_pushstring(L, "wxLuaBindClass"); lua_pushlightuserdata(L, (void *)wxlClass); *************** *** 650,654 **** wxlua_pushstring_wxLuaClasses(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (the classes table) - lua_pushstring(L, wxlClass->name); lua_pushlightuserdata(L, (void *)wxlClass); --- 708,711 ---- *************** *** 662,667 **** } - int i_method, method_count = wxlClass->methods_n; - // install the table for the class lua_pushstring(L, wxlClass->name); --- 719,722 ---- *************** *** 676,686 **** } // Install the static functions for the classname table ! for (int i_static_method = 0; i_static_method < method_count; ++i_static_method) { ! if (WXLUA_HASBIT(wxlClass->methods[i_static_method].type, WXLUAMETHOD_STATIC)) { ! lua_pushstring(L, wxlClass->methods[i_static_method].name); ! lua_pushcfunction(L, wxlClass->methods[i_static_method].funcs[0].func); lua_rawset(L, -3); } --- 731,744 ---- } + int method_count = wxlClass->methods_n; + // Install the static functions for the classname table ! wxLuaBindMethod *wxlMethod = wxlClass->methods; ! for (int i_static_method = 0; i_static_method < method_count; ++i_static_method, ++wxlMethod) { ! if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_STATIC) && wxlMethod->funcs_n) { ! lua_pushstring(L, wxlMethod->name); ! lua_pushcfunction(L, wxlMethod->funcs[0].func); lua_rawset(L, -3); } *************** *** 689,699 **** // Install public functions like constructors or global functions ! wxLuaBindMethod *wxlMethod = wxlClass->methods; ! for (i_method = 0; i_method < method_count; ++i_method, ++wxlMethod) { ! if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_CONSTRUCTOR | WXLUAMETHOD_CFUNCTION)) { #if 1 // C++ class constructors are tables and use the __call metatable to make them "functions" // push name of nested table and create the table or use existing lua_pushstring(L, wxlMethod->name); if (strcmp(wxlMethod->name, wxlClass->name) != 0) --- 747,759 ---- // Install public functions like constructors or global functions ! wxlMethod = wxlClass->methods; ! for (int i_method = 0; i_method < method_count; ++i_method, ++wxlMethod) { ! if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_CONSTRUCTOR | WXLUAMETHOD_CFUNCTION) && wxlMethod->funcs_n) { #if 1 // C++ class constructors are tables and use the __call metatable to make them "functions" // push name of nested table and create the table or use existing + // we do it this way since we can have multiple constructors (renamed) + // that are of the same class and so they share the same tag. lua_pushstring(L, wxlMethod->name); if (strcmp(wxlMethod->name, wxlClass->name) != 0) *************** *** 795,801 **** // register all the builtin functions, global C style functions ! for (size_t i_func = 0; i_func < m_functionCount; ++i_func) { - wxLuaBindMethod *wxlMethod = m_functionArray + i_func; lua_pushstring(L, wxlMethod->name); lua_pushcfunction(L, wxlMethod->funcs[0].func); --- 855,861 ---- // register all the builtin functions, global C style functions ! wxLuaBindMethod* wxlMethod = m_functionArray; ! for (size_t i_func = 0; i_func < m_functionCount; ++i_func, ++wxlMethod) { lua_pushstring(L, wxlMethod->name); lua_pushcfunction(L, wxlMethod->funcs[0].func); *************** *** 803,842 **** } - // for backward compatibility - removed, lua has bool now - //lua_pushliteral(L, "FALSE"); - //lua_pushboolean(L, false); - //lua_rawset(L, tableOffset); - //lua_pushliteral(L, "TRUE"); - //lua_pushboolean(L, true); - //lua_rawset(L, tableOffset); - // install the numerical definitions ! for (size_t i_define = 0; i_define < m_defineCount; ++i_define) { ! wxLuaBindDefine *pDefine = m_defineArray + i_define; ! lua_pushstring(L, pDefine->name); ! lua_pushnumber(L, pDefine->value); lua_rawset(L, tableOffset); } // install the strings ! for (size_t i_string = 0; i_string < m_stringCount; ++i_string) { ! wxLuaBindString *pString = m_stringArray + i_string; ! lua_pushstring(L, pString->name); ! lua_pushstring(L, wx2lua(pString->value)); lua_rawset(L, tableOffset); } // install the objects and pointers ! for (size_t i_object = 0; i_object < m_objectCount; ++i_object) { ! wxLuaBindObject *pObject = m_objectArray + i_object; ! lua_pushstring(L, pObject->name); ! if (pObject->objPtr != 0) ! wxlState.tpushusertag(pObject->objPtr, *pObject->class_tag); else ! wxlState.tpushusertag(*pObject->pObjPtr, *pObject->class_tag); lua_rawset(L, tableOffset); --- 863,894 ---- } // install the numerical definitions ! wxLuaBindDefine* wxlDefine = m_defineArray; ! for (size_t i_define = 0; i_define < m_defineCount; ++i_define, ++wxlDefine) { ! lua_pushstring(L, wxlDefine->name); ! lua_pushnumber(L, wxlDefine->value); lua_rawset(L, tableOffset); } // install the strings ! wxLuaBindString *wxlString = m_stringArray; ! for (size_t i_string = 0; i_string < m_stringCount; ++i_string, ++wxlString) { ! lua_pushstring(L, wxlString->name); ! lua_pushstring(L, wx2lua(wxlString->value)); lua_rawset(L, tableOffset); } // install the objects and pointers ! wxLuaBindObject *wxlObject = m_objectArray; ! for (size_t i_object = 0; i_object < m_objectCount; ++i_object, ++wxlObject) { ! lua_pushstring(L, wxlObject->name); ! if (wxlObject->objPtr != 0) ! wxlState.tpushusertag(wxlObject->objPtr, *wxlObject->class_tag); else ! wxlState.tpushusertag(*wxlObject->pObjPtr, *wxlObject->class_tag); lua_rawset(L, tableOffset); *************** *** 844,857 **** // register all the wxevent types ! for (size_t i_event = 0; i_event < m_eventCount; ++i_event) { ! wxLuaBindEvent *pEvent = m_eventArray + i_event; ! lua_pushstring(L, pEvent->name); ! lua_pushnumber(L, *pEvent->eventType); lua_rawset(L, tableOffset); } - - // sort the event list into order for faster lookup. - qsort(m_eventArray, m_eventCount, sizeof(wxLuaBindEvent), wxLuaEventListCompareFn); } --- 896,906 ---- // register all the wxevent types ! wxLuaBindEvent *wxlEvent = m_eventArray; ! for (size_t i_event = 0; i_event < m_eventCount; ++i_event, ++wxlEvent) { ! lua_pushstring(L, wxlEvent->name); ! lua_pushnumber(L, *wxlEvent->eventType); lua_rawset(L, tableOffset); } } *************** *** 877,881 **** const wxLuaBindEvent* wxLuaBinding::GetEvent(wxEventType eventType_) const { ! const int eventType = eventType_; wxLuaBindEvent eventItem = { "", &eventType }; --- 926,931 ---- const wxLuaBindEvent* wxLuaBinding::GetEvent(wxEventType eventType_) const { ! // we've sorted this, see InitBinding() ! const wxEventType eventType = eventType_; wxLuaBindEvent eventItem = { "", &eventType }; *************** *** 884,888 **** m_eventCount, sizeof(wxLuaBindEvent), ! wxLuaEventListCompareFn); return pLuaEvent; } --- 934,938 ---- m_eventCount, sizeof(wxLuaBindEvent), ! wxLuaBindEventArrayCompareFn); return pLuaEvent; } *************** *** 895,901 **** ! const wxLuaBindClass* wxLuaBinding::GetLuaClass(int class_tag) const { ! wxLuaBindClass classItem; classItem.class_tag = &class_tag; --- 945,952 ---- ! const wxLuaBindClass* wxLuaBinding::GetLuaClass(int class_tag_) const { ! int class_tag = class_tag_; ! wxLuaBindClass classItem = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; classItem.class_tag = &class_tag; *************** *** 906,910 **** m_classCount, sizeof(wxLuaBindClass), ! wxLuaClassListCompareByTag); return wxlClass; // maybe NULL if class_tag not found --- 957,961 ---- m_classCount, sizeof(wxLuaBindClass), ! wxLuaBindClassArrayCompareByTag); return wxlClass; // maybe NULL if class_tag not found *************** *** 961,970 **** { wxCHECK_MSG(wxlClass, NULL, wxT("Invalid wxLuaBindClass to find method from.")); int i_method, method_count = wxlClass->methods_n; // find a method in the class, recurse through classes from which this class is derived. ! for (i_method = 0; i_method < method_count; ++i_method) { - wxLuaBindMethod *wxlMethod = wxlClass->methods + i_method; if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_METHOD | WXLUAMETHOD_GETPROP) && (strcmp(wxlMethod->name, methodName) == 0)) --- 1012,1036 ---- { wxCHECK_MSG(wxlClass, NULL, wxT("Invalid wxLuaBindClass to find method from.")); + /* + wxLuaBindMethod methodItem = { 0, WXLUAMETHOD_METHOD, 0, 0, 0 }; + methodItem.name = methodName; + + // this relies on LUA allocating tags in ascending order of definition + // if LUA stops doing this, then the search may break. + wxLuaBindMethod *wxlMethod = (wxLuaBindMethod *)bsearch(&methodItem, + wxlClass->methods, + wxlClass->methods_n, + sizeof(wxLuaBindMethod), + wxLuaBindMethodArrayCompareFnGet); + //wxPrintf(wxT("wxlMethod %d\n"), wxlMethod); + */ + + wxLuaBindMethod *wxlMethod = wxlClass->methods; int i_method, method_count = wxlClass->methods_n; + // find a method in the class, recurse through classes from which this class is derived. ! for (i_method = 0; i_method < method_count; ++i_method, ++wxlMethod) { if (WXLUA_HASBIT(wxlMethod->type, WXLUAMETHOD_METHOD | WXLUAMETHOD_GETPROP) && (strcmp(wxlMethod->name, methodName) == 0)) *************** *** 995,999 **** } } - return wxlMethod; } --- 1061,1064 ---- *************** *** 1001,1007 **** if (search_baseclasses && wxlClass->baseclass) ! return GetClassMethod(wxlClass->baseclass, methodName); ! return NULL; } --- 1066,1072 ---- if (search_baseclasses && wxlClass->baseclass) ! wxlMethod = GetClassMethod(wxlClass->baseclass, methodName, search_baseclasses); ! return wxlMethod; } |
From: John L. <jr...@us...> - 2007-06-12 05:03:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22549/wxLua/modules/wxluasocket/src Modified Files: Makefile wxluasocket_bind.cpp Log Message: Add ability to do profiling in GCC using Makefiles Add InitBinding function to wxLuaBinding to presort items Test code for sorted wxLuaMethods, doesn't seem to be any faster though. Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxluasocket_bind.cpp 8 Jun 2007 01:36:32 -0000 1.19 --- wxluasocket_bind.cpp 12 Jun 2007 05:03:17 -0000 1.20 *************** *** 156,159 **** --- 156,160 ---- m_objectArray = wxLuaGetObjectList_wxluasocket(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxluasocket(m_functionCount); + InitBinding(); } Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile 24 May 2007 00:29:01 -0000 1.14 --- Makefile 12 Jun 2007 05:03:17 -0000 1.15 *************** *** 36,40 **** CXX = $(WXCXX) ! APPEXTRADEFS = -I$(WXLUA_WXLUASETUP_DIR) -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= TARGET_LIBNAME = lib$(WXBASENAME)_wxluasocket-$(WXRELEASE) --- 36,42 ---- CXX = $(WXCXX) ! GCC_PROFILE = #-pg ! APPEXTRADEFS = $(GCC_PROFILE) -I$(WXLUA_WXLUASETUP_DIR) -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= ! APPEXTRALIBS = $(GCC_PROFILE) TARGET_LIBNAME = lib$(WXBASENAME)_wxluasocket-$(WXRELEASE) *************** *** 79,83 **** $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ --- 81,85 ---- $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) $(APPEXTRALIBS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ |
From: John L. <jr...@us...> - 2007-06-12 05:03:21
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22549/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Add ability to do profiling in GCC using Makefiles Add InitBinding function to wxLuaBinding to presort items Test code for sorted wxLuaMethods, doesn't seem to be any faster though. Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxluasocket_bind.h 8 Jun 2007 01:36:32 -0000 1.19 --- wxluasocket_bind.h 12 Jun 2007 05:03:17 -0000 1.20 *************** *** 27,33 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 10 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 10 // --------------------------------------------------------------------------- --- 27,33 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 11 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 11 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-06-12 05:03:20
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22549/wxLua/modules/wxluadebug/src Modified Files: Makefile Log Message: Add ability to do profiling in GCC using Makefiles Add InitBinding function to wxLuaBinding to presort items Test code for sorted wxLuaMethods, doesn't seem to be any faster though. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 24 May 2007 00:59:46 -0000 1.11 --- Makefile 12 Jun 2007 05:03:17 -0000 1.12 *************** *** 36,40 **** CXX = $(WXCXX) ! APPEXTRADEFS = -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= TARGET_LIBNAME = lib$(WXBASENAME)_wxluadebug-$(WXRELEASE) --- 36,42 ---- CXX = $(WXCXX) ! GCC_PROFILE = #-pg ! APPEXTRADEFS = $(GCC_PROFILE) -I$(WXLUA_DIR) -I$(WXLUA_DIR)/modules -I$(WXLUA_DIR)/modules/lua/include -I$(WXPREFIX)/contrib/include -DLUACALL= ! APPEXTRALIBS = $(GCC_PROFILE) TARGET_LIBNAME = lib$(WXBASENAME)_wxluadebug-$(WXRELEASE) *************** *** 74,78 **** $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ --- 76,80 ---- $(TARGET_LIB_SHARED): $(OBJECTS) ! $(CXX) -shared -o $@ $(OBJECTS) $(APPEXTRALIBS) cd $(TARGET_LIBDIR) \ && $(RM) $(TARGET_LIB_LINK1) $(TARGET_LIB_LINK2) \ |