From: John L. <jr...@us...> - 2007-03-19 04:39:48
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10862/wxLua/modules/wxbind/src Modified Files: defsutil.cpp dialogs.cpp wx_bind.cpp xml.cpp Log Message: fixes in the bindings for MSW missing functions rem out wxXMLResourceHandler since it didn't have any methods Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** xml.cpp 15 Mar 2007 23:24:57 -0000 1.26 --- xml.cpp 17 Mar 2007 19:08:14 -0000 1.27 *************** *** 955,976 **** #if wxLUA_USE_wxXMLResource && wxUSE_XML // --------------------------------------------------------------------------- - // Bind class wxXmlResourceHandler - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxXmlResourceHandler' - int s_wxluatag_wxXmlResourceHandler = -1; - - - - // Map Lua Class Methods to C Binding Functions - WXLUAMETHOD wxXmlResourceHandler_methods[] = { - }; - - int wxXmlResourceHandler_methodCount = sizeof(wxXmlResourceHandler_methods)/sizeof(wxXmlResourceHandler_methods[0]); - #endif // wxLUA_USE_wxXMLResource && wxUSE_XML - - - #if wxLUA_USE_wxXMLResource && wxUSE_XML - // --------------------------------------------------------------------------- // Bind class wxXmlResource // --------------------------------------------------------------------------- --- 955,958 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** wx_bind.cpp 15 Mar 2007 23:24:56 -0000 1.89 --- wx_bind.cpp 17 Mar 2007 19:08:14 -0000 1.90 *************** *** 7348,7352 **** #if wxLUA_USE_wxBusyCursor { "wxBusyCursor", wxBusyCursor_methods, wxBusyCursor_methodCount, NULL, &s_wxluatag_wxBusyCursor, NULL, NULL }, - { "wxBusyCursorSuspender", wxBusyCursorSuspender_methods, wxBusyCursorSuspender_methodCount, NULL, &s_wxluatag_wxBusyCursorSuspender, NULL, NULL }, #endif // wxLUA_USE_wxBusyCursor --- 7348,7351 ---- *************** *** 8395,8399 **** { "wxXmlProperty", wxXmlProperty_methods, wxXmlProperty_methodCount, NULL, &s_wxluatag_wxXmlProperty, NULL, NULL }, { "wxXmlResource", wxXmlResource_methods, wxXmlResource_methodCount, NULL, &s_wxluatag_wxXmlResource, "wxObject", NULL }, - { "wxXmlResourceHandler", wxXmlResourceHandler_methods, wxXmlResourceHandler_methodCount, NULL, &s_wxluatag_wxXmlResourceHandler, "wxObject", NULL }, #endif // wxLUA_USE_wxXMLResource && wxUSE_XML --- 8394,8397 ---- *************** *** 8578,8582 **** #if wxLUA_USE_wxBusyCursor wxLUA_IMPLEMENT_ENCAPSULATION(wxBusyCursor, wxBusyCursor) - wxLUA_IMPLEMENT_ENCAPSULATION(wxBusyCursorSuspender, wxBusyCursorSuspender) #endif // wxLUA_USE_wxBusyCursor --- 8576,8579 ---- Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** dialogs.cpp 15 Mar 2007 23:24:52 -0000 1.33 --- dialogs.cpp 17 Mar 2007 19:08:13 -0000 1.34 *************** *** 1393,1435 **** int s_wxluatag_wxFileDialog = -1; - #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - static wxLuaArgTag s_wxluatagArray_wxLua_wxFileDialog_Create[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_String, 0 }; - // %wxchkver_2_8 bool Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, const wxString& name = "wxFileDialog") - static int LUACALL wxLua_wxFileDialog_Create(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - // get number of arguments - int argCount = lua_gettop(L); - // const wxString name = "wxFileDialog" - const wxString name = (argCount >= 10 ? wxlState.GetwxStringType(10) : wxString(wxT("wxFileDialog"))); - // const wxSize sz = wxDefaultSize - const wxSize * sz = (argCount >= 9 ? (const wxSize *)wxlState.GetUserDataType(9, s_wxluatag_wxSize) : &wxDefaultSize); - // const wxPoint pos = wxDefaultPosition - const wxPoint * pos = (argCount >= 8 ? (const wxPoint *)wxlState.GetUserDataType(8, s_wxluatag_wxPoint) : &wxDefaultPosition); - // long style = wxFD_DEFAULT_STYLE - long style = (argCount >= 7 ? (long)wxlState.GetNumberType(7) : wxFD_DEFAULT_STYLE); - // const wxString wildCard = wxFileSelectorDefaultWildcardStr - const wxString wildCard = (argCount >= 6 ? wxlState.GetwxStringType(6) : wxString(wxFileSelectorDefaultWildcardStr)); - // const wxString defaultFile = "" - const wxString defaultFile = (argCount >= 5 ? wxlState.GetwxStringType(5) : wxString(wxEmptyString)); - // const wxString defaultDir = "" - const wxString defaultDir = (argCount >= 4 ? wxlState.GetwxStringType(4) : wxString(wxEmptyString)); - // const wxString message = wxFileSelectorPromptStr - const wxString message = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxFileSelectorPromptStr)); - // wxWindow parent - wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); - // get this - wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); - // call Create - returns = self->Create(parent, message, defaultDir, defaultFile, wildCard, style, *pos, *sz, name); - // push the result flag - lua_pushboolean(L, returns); - - return 1; - } - - #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG // wxString GetDirectory() const --- 1393,1396 ---- *************** *** 1780,1810 **** #endif // (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG) - #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG - // %constructor wxFileDialogDefault() - static int LUACALL wxLua_wxFileDialogDefault_constructor(lua_State *L) - { - wxLuaState wxlState(L); - wxFileDialog *returns; - // call constructor - returns = new wxFileDialog(); - // add to tracked window list - if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) - wxlState.AddTrackedWindow((wxWindow*)returns); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxFileDialog, returns); - - return 1; - } - - #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG - // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxFileDialog_methods[] = { - #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - { LuaMethod, "Create", wxLua_wxFileDialog_Create, 9, 1, s_wxluatagArray_wxLua_wxFileDialog_Create }, - #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) - { LuaSetProp, "Directory", wxLua_wxFileDialog_SetDirectory, 1, 1, s_wxluaargArray_None }, { LuaGetProp, "Directory", wxLua_wxFileDialog_GetDirectory, 0, 0, s_wxluaargArray_None }, --- 1741,1748 ---- *************** *** 1862,1867 **** { LuaConstructor, "wxFileDialog", wxLua_wxFileDialog_constructor, 9, 1, s_wxluatagArray_wxLua_wxFileDialog_constructor }, #endif // (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG)) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxFileDialog && wxUSE_FILEDLG) - { LuaConstructor, "wxFileDialogDefault", wxLua_wxFileDialogDefault_constructor, 0, 0, s_wxluaargArray_None }, - }; --- 1800,1803 ---- Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** defsutil.cpp 15 Mar 2007 23:24:52 -0000 1.28 --- defsutil.cpp 17 Mar 2007 19:08:13 -0000 1.29 *************** *** 772,827 **** - #if wxLUA_USE_wxBusyCursor - // --------------------------------------------------------------------------- - // Bind class wxBusyCursorSuspender - // --------------------------------------------------------------------------- - - // Lua MetaTable Tag for Class 'wxBusyCursorSuspender' - int s_wxluatag_wxBusyCursorSuspender = -1; - - #if wxLUA_USE_wxBusyCursor - static int LUACALL wxLua_wxBusyCursorSuspender_Delete(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursorSuspender * self = (wxBusyCursorSuspender *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursorSuspender); - // if removed from tracked mem list, reset the tag so that gc() is not called on this object. - if ((self != NULL) && wxlState.RemoveTrackedObject(self)) - { - lua_pushnil(L); - lua_setmetatable(L, -2); - } - return 0; - } - - // wxBusyCursorSuspender() - static int LUACALL wxLua_wxBusyCursorSuspender_constructor(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursorSuspender *returns; - // call constructor - returns = new wxBusyCursorSuspender(); - // add to tracked memory list - wxlState.AddTrackedObject((long)returns, new wxObject_wxBusyCursorSuspender((wxBusyCursorSuspender *)returns)); - // push the constructed class pointer - wxlState.PushUserDataType(s_wxluatag_wxBusyCursorSuspender, returns); - - return 1; - } - - #endif // wxLUA_USE_wxBusyCursor - - - - // Map Lua Class Methods to C Binding Functions - WXLUAMETHOD wxBusyCursorSuspender_methods[] = { - { LuaMethod, "Delete", wxLua_wxBusyCursorSuspender_Delete, 0, 0, s_wxluaargArray_None }, - { LuaConstructor, "wxBusyCursorSuspender", wxLua_wxBusyCursorSuspender_constructor, 0, 0, s_wxluaargArray_None }, - - }; - - int wxBusyCursorSuspender_methodCount = sizeof(wxBusyCursorSuspender_methods)/sizeof(wxBusyCursorSuspender_methods[0]); - #endif // wxLUA_USE_wxBusyCursor - - #if wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO // --------------------------------------------------------------------------- --- 772,775 ---- |