From: John L. <jr...@us...> - 2005-11-25 10:09:21
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1505/wxLua/bindings/wxwidgets Modified Files: override.hpp Log Message: flesh out the wxLuaState SmartString/IntArray to wxLuaSmartXXX TRUE/FALSE - true/false Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** override.hpp 17 Nov 2005 05:51:20 -0000 1.3 --- override.hpp 25 Nov 2005 10:09:10 -0000 1.4 *************** *** 100,104 **** long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); --- 100,104 ---- long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); *************** *** 132,136 **** long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); --- 132,136 ---- long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); *************** *** 166,170 **** long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); --- 166,170 ---- long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); *************** *** 200,204 **** long style = (argCount >= 8 ? (long) lua_tonumber(L, 8) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 7 ? tostringarray(L, 7, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 6 ? (wxSize *) getuserdatatype(L, 6, s_wxSize) : &wxDefaultSize); --- 200,204 ---- long style = (argCount >= 8 ? (long) lua_tonumber(L, 8) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 7 ? tostringarray(L, 7, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 6 ? (wxSize *) getuserdatatype(L, 6, s_wxSize) : &wxDefaultSize); *************** *** 236,240 **** long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); --- 236,240 ---- long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); *************** *** 268,272 **** long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); --- 268,272 ---- long style = (argCount >= 7 ? (long) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); *************** *** 302,306 **** long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); --- 302,306 ---- long style = (argCount >= 6 ? (long) lua_tonumber(L, 6) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 5 ? tostringarray(L, 5, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 4 ? (wxSize *) getuserdatatype(L, 4, s_wxSize) : &wxDefaultSize); *************** *** 336,340 **** int majorDimension = (argCount >= 7 ? (int) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); --- 336,340 ---- int majorDimension = (argCount >= 7 ? (int) lua_tonumber(L, 7) : 0); // const wxString choices[] = NULL ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = (argCount >= 6 ? tostringarray(L, 6, count) : NULL); // const wxSize& size = wxDefaultSize const wxSize *size = (argCount >= 5 ? (wxSize *) getuserdatatype(L, 5, s_wxSize) : &wxDefaultSize); *************** *** 873,877 **** static int LUACALL wxFrame_SetStatusWidths(lua_State *L) { ! int count = 0; SmartIntArray ptr; int *choices; ptr = choices = tointarray(L, 2, count); // get this wxFrame *self = ( wxFrame * ) getuserdatatype(L, 1, s_wxFrame ); --- 873,877 ---- static int LUACALL wxFrame_SetStatusWidths(lua_State *L) { ! int count = 0; wxLuaSmartIntArray ptr; int *choices; ptr = choices = tointarray(L, 2, count); // get this wxFrame *self = ( wxFrame * ) getuserdatatype(L, 1, s_wxFrame ); *************** *** 887,891 **** static int LUACALL wxStatusBar_SetStatusWidths(lua_State *L) { ! int count = 0; SmartIntArray ptr; int *choices; ptr = choices = tointarray(L, 2, count); // get this wxStatusBar *self = ( wxStatusBar * ) getuserdatatype(L, 1, s_wxStatusBar ); --- 887,891 ---- static int LUACALL wxStatusBar_SetStatusWidths(lua_State *L) { ! int count = 0; wxLuaSmartIntArray ptr; int *choices; ptr = choices = tointarray(L, 2, count); // get this wxStatusBar *self = ( wxStatusBar * ) getuserdatatype(L, 1, s_wxStatusBar ); *************** *** 1569,1573 **** int *widths = NULL; ! SmartIntArray ptr; if (lua_istable(L, 2)) --- 1569,1573 ---- int *widths = NULL; ! wxLuaSmartIntArray ptr; if (lua_istable(L, 2)) *************** *** 1680,1684 **** #if wxCHECK_VERSION(2, 5, 0) wxTreeItemIdValue cookie = 0; ! #else // long& cookie long cookie = 0; --- 1680,1684 ---- #if wxCHECK_VERSION(2, 5, 0) wxTreeItemIdValue cookie = 0; ! #else // long& cookie long cookie = 0; *************** *** 1697,1701 **** #if wxCHECK_VERSION(2, 5, 0) pushuserdatatype(L, s_wxTreeItemIdValue, cookie ); ! #else // push the cookie lua_pushnumber(L, cookie); --- 1697,1701 ---- #if wxCHECK_VERSION(2, 5, 0) pushuserdatatype(L, s_wxTreeItemIdValue, cookie ); ! #else // push the cookie lua_pushnumber(L, cookie); *************** *** 1711,1718 **** { wxTreeItemId *returns; ! #if wxCHECK_VERSION(2, 5, 0) wxTreeItemIdValue cookie = ( wxTreeItemIdValue * ) getuserdatatype(L, 1, s_wxTreeItemIdValue ); ! #else // long& cookie long cookie = (long) lua_tonumber(L, 3); --- 1711,1718 ---- { wxTreeItemId *returns; ! #if wxCHECK_VERSION(2, 5, 0) wxTreeItemIdValue cookie = ( wxTreeItemIdValue * ) getuserdatatype(L, 1, s_wxTreeItemIdValue ); ! #else // long& cookie long cookie = (long) lua_tonumber(L, 3); *************** *** 1731,1735 **** #if wxCHECK_VERSION(2, 5, 0) pushuserdatatype(L, s_wxTreeItemIdValue, cookie ); ! #else // push the cookie lua_pushnumber(L, cookie); --- 1731,1735 ---- #if wxCHECK_VERSION(2, 5, 0) pushuserdatatype(L, s_wxTreeItemIdValue, cookie ); ! #else // push the cookie lua_pushnumber(L, cookie); *************** *** 2599,2603 **** if (argCount == 1 && lua_istable(L, 1)) { ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 1, count); for (idx = 0; idx < count; ++idx) returns->Add(choices[idx]); --- 2599,2603 ---- if (argCount == 1 && lua_istable(L, 1)) { ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 1, count); for (idx = 0; idx < count; ++idx) returns->Add(choices[idx]); *************** *** 3309,3314 **** // bool GetFirstGroup(wxString& str, long& index) const static int LUACALL wxConfigBase_GetFirstGroup(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); --- 3309,3314 ---- // bool GetFirstGroup(wxString& str, long& index) const static int LUACALL wxConfigBase_GetFirstGroup(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); *************** *** 3330,3335 **** // bool GetFirstEntry(wxString& str, long& index) const static int LUACALL wxConfigBase_GetFirstEntry(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); --- 3330,3335 ---- // bool GetFirstEntry(wxString& str, long& index) const static int LUACALL wxConfigBase_GetFirstEntry(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); *************** *** 3351,3356 **** // bool GetNextGroup(wxString& str, long& index) const static int LUACALL wxConfigBase_GetNextGroup(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); --- 3351,3356 ---- // bool GetNextGroup(wxString& str, long& index) const static int LUACALL wxConfigBase_GetNextGroup(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); *************** *** 3372,3377 **** // bool GetNextEntry(wxString& str, long& index) const static int LUACALL wxConfigBase_GetNextEntry(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); --- 3372,3377 ---- // bool GetNextEntry(wxString& str, long& index) const static int LUACALL wxConfigBase_GetNextEntry(lua_State *L) ! { ! bool returns; // long& index long index = (long) getnumbertype(L, 3); *************** *** 3823,3827 **** wxWindow *parent = (argCount >= 5 ? (wxWindow *) getuserdatatype(L, 4, s_wxWindow) : NULL); // const wxString& choices[] ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 3, count); // const wxString& caption wxString caption = lua2wx(getstringtype(L, 2)); --- 3823,3827 ---- wxWindow *parent = (argCount >= 5 ? (wxWindow *) getuserdatatype(L, 4, s_wxWindow) : NULL); // const wxString& choices[] ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 3, count); // const wxString& caption wxString caption = lua2wx(getstringtype(L, 2)); *************** *** 3857,3861 **** wxWindow *parent = (argCount >= 5 ? (wxWindow *) getuserdatatype(L, 5, s_wxWindow) : (wxWindow *) NULL); // const wxString& choices[] ! int count = 0; SmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 4, count); // const wxString& caption wxString caption = lua2wx(getstringtype(L, 3)); --- 3857,3861 ---- wxWindow *parent = (argCount >= 5 ? (wxWindow *) getuserdatatype(L, 5, s_wxWindow) : (wxWindow *) NULL); // const wxString& choices[] ! int count = 0; wxLuaSmartStringArray ptr; wxString *choices; ptr = choices = tostringarray(L, 4, count); // const wxString& caption wxString caption = lua2wx(getstringtype(L, 3)); *************** *** 3956,3961 **** // wxInputStream& Read(void *buffer, size_t size) static int LUACALL wxInputStream_Read(lua_State *L) ! { ! wxInputStream *returns; // size_t size size_t size = (size_t) getnumbertype(L, 2); --- 3956,3961 ---- // wxInputStream& Read(void *buffer, size_t size) static int LUACALL wxInputStream_Read(lua_State *L) ! { ! wxInputStream *returns; // size_t size size_t size = (size_t) getnumbertype(L, 2); *************** *** 3981,3986 **** // %rename ReadStream wxInputStream& Read(wxOutputStream& stream_in) static int LUACALL wxInputStream_ReadStream(lua_State *L) ! { ! wxInputStream *returns; // wxOutputStream& stream_in wxOutputStream *stream_in = (wxOutputStream *) getuserdatatype(L, 2, s_wxOutputStream); --- 3981,3986 ---- // %rename ReadStream wxInputStream& Read(wxOutputStream& stream_in) static int LUACALL wxInputStream_ReadStream(lua_State *L) ! { ! wxInputStream *returns; // wxOutputStream& stream_in wxOutputStream *stream_in = (wxOutputStream *) getuserdatatype(L, 2, s_wxOutputStream); *************** *** 3999,4004 **** // wxOutputStream& Write(const void *buffer, size_t size) static int LUACALL wxOutputStream_Write(lua_State *L) ! { ! wxOutputStream *returns; // size_t size size_t size = (size_t) getnumbertype(L, 3); --- 3999,4004 ---- // wxOutputStream& Write(const void *buffer, size_t size) static int LUACALL wxOutputStream_Write(lua_State *L) ! { ! wxOutputStream *returns; // size_t size size_t size = (size_t) getnumbertype(L, 3); *************** *** 4019,4024 **** // %rename WriteStream wxOutputStream& Write(wxInputStream& stream_in) static int LUACALL wxOutputStream_WriteStream(lua_State *L) ! { ! wxOutputStream *returns; // wxInputStream& stream_in wxInputStream *stream_in = (wxInputStream *) getuserdatatype(L, 2, s_wxInputStream); --- 4019,4024 ---- // %rename WriteStream wxOutputStream& Write(wxInputStream& stream_in) static int LUACALL wxOutputStream_WriteStream(lua_State *L) ! { ! wxOutputStream *returns; // wxInputStream& stream_in wxInputStream *stream_in = (wxInputStream *) getuserdatatype(L, 2, s_wxInputStream); *************** *** 4037,4042 **** // bool SetTransferMode(wxFTP::TransferMode mode) static int LUACALL wxFTP_SetTransferMode(lua_State *L) ! { ! bool returns; // wxFTP::TransferMode mode wxFTP::TransferMode mode = (wxFTP::TransferMode)(int) getnumbertype(L, 2); --- 4037,4042 ---- // bool SetTransferMode(wxFTP::TransferMode mode) static int LUACALL wxFTP_SetTransferMode(lua_State *L) ! { ! bool returns; // wxFTP::TransferMode mode wxFTP::TransferMode mode = (wxFTP::TransferMode)(int) getnumbertype(L, 2); *************** *** 4055,4060 **** // %rename Unget size_t Ungetch(const char* buffer, size_t size) static int LUACALL wxInputStream_Unget(lua_State *L) ! { ! size_t returns; // size_t size size_t size = (size_t) getnumbertype(L, 3); --- 4055,4060 ---- // %rename Unget size_t Ungetch(const char* buffer, size_t size) static int LUACALL wxInputStream_Unget(lua_State *L) ! { ! size_t returns; // size_t size size_t size = (size_t) getnumbertype(L, 3); *************** *** 4075,4085 **** // wxGLCanvas(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="GLCanvas", int* attribList = 0, const wxPalette& palette = wxNullPalette) static int LUACALL wxGLCanvas_constructor(lua_State *L) ! { ! SmartIntArray ptr; ! int *attribList = NULL; ! int count = 0; wxGLCanvas *returns; // get number of arguments ! int argCount = lua_gettop(L); // const wxPalette& palette = wxNullPalette const wxPalette *palette = (argCount >= 8 ? (wxPalette *) getuserdatatype(L, 8, s_wxPalette) : &wxNullPalette); --- 4075,4085 ---- // wxGLCanvas(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="GLCanvas", int* attribList = 0, const wxPalette& palette = wxNullPalette) static int LUACALL wxGLCanvas_constructor(lua_State *L) ! { ! wxLuaSmartIntArray ptr; ! int *attribList = NULL; ! int count = 0; wxGLCanvas *returns; // get number of arguments ! int argCount = lua_gettop(L); // const wxPalette& palette = wxNullPalette const wxPalette *palette = (argCount >= 8 ? (wxPalette *) getuserdatatype(L, 8, s_wxPalette) : &wxNullPalette); *************** *** 4113,4117 **** // double GetValue() const; static int LUACALL wxTreeItemId_GetValue(lua_State *L) ! { double returns; // get this --- 4113,4117 ---- // double GetValue() const; static int LUACALL wxTreeItemId_GetValue(lua_State *L) ! { double returns; // get this *************** *** 4129,4133 **** // void SetValue(double value); static int LUACALL wxTreeItemId_SetValue(lua_State *L) ! { // double value long value = (long) getnumbertype(L, 2); --- 4129,4133 ---- // void SetValue(double value); static int LUACALL wxTreeItemId_SetValue(lua_State *L) ! { // double value long value = (long) getnumbertype(L, 2); |