From: John L. <jr...@us...> - 2007-03-08 06:26:54
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6394/wxLua/modules/wxbind/src Modified Files: file.cpp wx_bind.cpp Log Message: update to wxWidgets 2.8 Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** wx_bind.cpp 7 Mar 2007 23:56:43 -0000 1.81 --- wx_bind.cpp 8 Mar 2007 06:26:43 -0000 1.82 *************** *** 392,395 **** --- 392,399 ---- #endif // (!wxCHECK_VERSION(2,7,0) || (defined(WXWIN_COMPATIBILITY_2_6) && WXWIN_COMPATIBILITY_2_6)) && (wxLUA_USE_wxNotebook && wxUSE_NOTEBOOK) + #if (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDirDialog && wxUSE_DIRDLG) + { "wxDD_NEW_DIR_BUTTON", wxDD_NEW_DIR_BUTTON }, + #endif // (!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDirDialog && wxUSE_DIRDLG) + #if (defined(__WXMSW__)) && ((defined(__WXMSW__) && !wxCHECK_VERSION(2,5,0) && wxUSE_WAVE) && (wxLUA_USE_wxWave)) { "wxSOUND_ASYNC", wxSOUND_ASYNC }, *************** *** 430,433 **** --- 434,442 ---- #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDirDialog && wxUSE_DIRDLG) + { "wxDD_CHANGE_DIR", wxDD_CHANGE_DIR }, + { "wxDD_DIR_MUST_EXIST", wxDD_DIR_MUST_EXIST }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDirDialog && wxUSE_DIRDLG) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxID_XXX) { "wxID_EDIT", wxID_EDIT }, *************** *** 810,814 **** #if wxLUA_USE_wxDirDialog && wxUSE_DIRDLG { "wxDD_DEFAULT_STYLE", wxDD_DEFAULT_STYLE }, - { "wxDD_NEW_DIR_BUTTON", wxDD_NEW_DIR_BUTTON }, #endif // wxLUA_USE_wxDirDialog && wxUSE_DIRDLG --- 819,822 ---- *************** *** 4924,4928 **** static wxLuaArgTag s_wxluatagArray_wxLua_function_wxDirSelector[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxWindow, 0 }; ! // %function wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxString& default_path = "", long style = 0, const wxPoint& pos = wxDefaultPosition, wxWindow *parent = NULL) static int LUACALL wxLua_function_wxDirSelector(lua_State *L) { --- 4932,4936 ---- static wxLuaArgTag s_wxluatagArray_wxLua_function_wxDirSelector[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxWindow, 0 }; ! // %function wxString wxDirSelector(const wxString& message = wxDirSelectorPromptStr, const wxString& default_path = "", long style = wxDD_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, wxWindow *parent = NULL) static int LUACALL wxLua_function_wxDirSelector(lua_State *L) { *************** *** 4935,4940 **** // const wxPoint pos = wxDefaultPosition const wxPoint * pos = (argCount >= 4 ? (const wxPoint *)wxlState.GetUserDataType(4, s_wxluatag_wxPoint) : &wxDefaultPosition); ! // long style = 0 ! long style = (argCount >= 3 ? (long)wxlState.GetNumberType(3) : 0); // const wxString default_path = "" const wxString default_path = (argCount >= 2 ? wxlState.GetwxStringType(2) : wxString(wxEmptyString)); --- 4943,4948 ---- // const wxPoint pos = wxDefaultPosition const wxPoint * pos = (argCount >= 4 ? (const wxPoint *)wxlState.GetUserDataType(4, s_wxluatag_wxPoint) : &wxDefaultPosition); ! // long style = wxDD_DEFAULT_STYLE ! long style = (argCount >= 3 ? (long)wxlState.GetNumberType(3) : wxDD_DEFAULT_STYLE); // const wxString default_path = "" const wxString default_path = (argCount >= 2 ? wxlState.GetwxStringType(2) : wxString(wxEmptyString)); Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** file.cpp 2 Mar 2007 05:44:24 -0000 1.33 --- file.cpp 8 Mar 2007 06:26:43 -0000 1.34 *************** *** 2043,2046 **** --- 2043,2072 ---- + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_FindFirst[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT); + static int LUACALL wxLua_wxDir_FindFirst(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get number of arguments + int argCount = lua_gettop(L); + // int flags = wxDIR_DEFAULT + int flags = (argCount >= 4 ? (int)wxlState.GetNumberType(4) : wxDIR_DEFAULT); + // const wxString filespec + const wxString filespec = wxlState.GetwxStringType(3); + // const wxString dirname + const wxString dirname = wxlState.GetwxStringType(2); + // call FindFirst + returns = wxDir::FindFirst(dirname, filespec, flags); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) + + #if (wxLUA_USE_wxArrayString) && (wxLUA_USE_wxDir) static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_GetAllFiles[] = { &s_wxluaarg_String, &s_wxluatag_wxArrayString, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; *************** *** 2147,2150 **** --- 2173,2191 ---- } + // wxString GetName() const + static int LUACALL wxLua_wxDir_GetName(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxDir * self = (wxDir *)wxlState.GetUserDataType(1, s_wxluatag_wxDir); + // call GetName + returns = self->GetName(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_GetNext[] = { &s_wxluaarg_String, 0 }; // %override wxLua_wxDir_GetNext *************** *** 2270,2273 **** --- 2311,2319 ---- WXLUAMETHOD wxDir_methods[] = { + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) + { LuaMethod, "FindFirst", wxLua_wxDir_FindFirst, 3, 2, s_wxluatagArray_wxLua_wxDir_FindFirst }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) + + #if (wxLUA_USE_wxArrayString) && (wxLUA_USE_wxDir) { LuaMethod, "GetAllFiles", wxLua_wxDir_GetAllFiles, 4, 2, s_wxluatagArray_wxLua_wxDir_GetAllFiles }, *************** *** 2278,2281 **** --- 2324,2328 ---- { LuaMethod, "Exists", wxLua_wxDir_Exists, 1, 1, s_wxluatagArray_wxLua_wxDir_Exists }, { LuaMethod, "GetFirst", wxLua_wxDir_GetFirst, 3, 1, s_wxluatagArray_wxLua_wxDir_GetFirst }, + { LuaMethod, "GetName", wxLua_wxDir_GetName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNext", wxLua_wxDir_GetNext, 1, 1, s_wxluatagArray_wxLua_wxDir_GetNext }, { LuaMethod, "HasFiles", wxLua_wxDir_HasFiles, 1, 0, s_wxluatagArray_wxLua_wxDir_HasFiles }, |