From: Francesco M. <fr...@us...> - 2006-05-14 13:11:52
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1208/modules/wxbind/src Modified Files: dialogs.cpp Log Message: removed Set/GetStyle for wx >= 2.7 from wxDir|FileDialog Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dialogs.cpp 2 May 2006 05:25:02 -0000 1.13 --- dialogs.cpp 14 May 2006 13:11:49 -0000 1.14 *************** *** 580,583 **** --- 580,616 ---- + #if (!wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxFileDialog) + // !%wxchkver27 long GetStyle() const + static int LUACALL wxLua_wxFileDialog_GetStyle(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); + // call GetStyle + returns = self->GetStyle(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // !%wxchkver27 void SetStyle(long style) + static int LUACALL wxLua_wxFileDialog_SetStyle(lua_State *L) + { + wxLuaState wxlState(L); + // long style + long style = (long)wxlState.GetNumberType(2); + // get this + wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); + // call SetStyle + self->SetStyle(style); + + return 0; + } + + #endif + + #if (wxLUA_USE_wxFileDialog) && (wxLUA_USE_wxArrayString) // %override wxLua_wxFileDialog_GetFilenames *************** *** 724,742 **** } - // long GetStyle() const - static int LUACALL wxLua_wxFileDialog_GetStyle(lua_State *L) - { - wxLuaState wxlState(L); - long returns; - // get this - wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); - // call GetStyle - returns = self->GetStyle(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - // wxString GetWildcard() const static int LUACALL wxLua_wxFileDialog_GetWildcard(lua_State *L) --- 757,760 ---- *************** *** 824,841 **** } - // void SetStyle(long style) - static int LUACALL wxLua_wxFileDialog_SetStyle(lua_State *L) - { - wxLuaState wxlState(L); - // long style - long style = (long)wxlState.GetNumberType(2); - // get this - wxFileDialog * self = (wxFileDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxFileDialog); - // call SetStyle - self->SetStyle(style); - - return 0; - } - // void SetWildcard(const wxString& wildCard) static int LUACALL wxLua_wxFileDialog_SetWildcard(lua_State *L) --- 842,845 ---- *************** *** 864,867 **** --- 868,879 ---- static WXLUAMETHOD s_wxFileDialog_methods[] = { + #if (!wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxFileDialog) + { LuaMethod, "GetStyle", wxLua_wxFileDialog_GetStyle, 0, 0, { 0 } }, + { LuaMethod, "SetStyle", wxLua_wxFileDialog_SetStyle, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "Style", wxLua_wxFileDialog_GetStyle, 0, 0, {0} }, + { LuaSetProp, "Style", wxLua_wxFileDialog_SetStyle, 1, 1, {0} }, + #endif + + #if (wxLUA_USE_wxFileDialog) && (wxLUA_USE_wxArrayString) { LuaMethod, "GetFilenames", wxLua_wxFileDialog_GetFilenames, 1, 1, { &s_wxluatag_wxArrayString, 0 } }, *************** *** 879,883 **** { LuaMethod, "GetMessage", wxLua_wxFileDialog_GetMessage, 0, 0, { 0 } }, { LuaMethod, "GetPath", wxLua_wxFileDialog_GetPath, 0, 0, { 0 } }, - { LuaMethod, "GetStyle", wxLua_wxFileDialog_GetStyle, 0, 0, { 0 } }, { LuaMethod, "GetWildcard", wxLua_wxFileDialog_GetWildcard, 0, 0, { 0 } }, { LuaMethod, "SetDirectory", wxLua_wxFileDialog_SetDirectory, 1, 1, { &s_wxluaarg_String, 0 } }, --- 891,894 ---- *************** *** 886,890 **** { LuaMethod, "SetMessage", wxLua_wxFileDialog_SetMessage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetPath", wxLua_wxFileDialog_SetPath, 1, 1, { &s_wxluaarg_String, 0 } }, - { LuaMethod, "SetStyle", wxLua_wxFileDialog_SetStyle, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWildcard", wxLua_wxFileDialog_SetWildcard, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "Directory", wxLua_wxFileDialog_GetDirectory, 0, 0, {0} }, --- 897,900 ---- *************** *** 898,903 **** { LuaGetProp, "Path", wxLua_wxFileDialog_GetPath, 0, 0, {0} }, { LuaSetProp, "Path", wxLua_wxFileDialog_SetPath, 1, 1, {0} }, - { LuaGetProp, "Style", wxLua_wxFileDialog_GetStyle, 0, 0, {0} }, - { LuaSetProp, "Style", wxLua_wxFileDialog_SetStyle, 1, 1, {0} }, { LuaGetProp, "Wildcard", wxLua_wxFileDialog_GetWildcard, 0, 0, {0} }, { LuaSetProp, "Wildcard", wxLua_wxFileDialog_SetWildcard, 1, 1, {0} }, --- 908,911 ---- *************** *** 920,923 **** --- 928,964 ---- + #if (!wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxDirDialog) + // !%wxchkver27 long GetStyle() const + static int LUACALL wxLua_wxDirDialog_GetStyle(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxDirDialog * self = (wxDirDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDirDialog); + // call GetStyle + returns = self->GetStyle(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // !%wxchkver27 void SetStyle(long style) + static int LUACALL wxLua_wxDirDialog_SetStyle(lua_State *L) + { + wxLuaState wxlState(L); + // long style + long style = (long)wxlState.GetNumberType(2); + // get this + wxDirDialog * self = (wxDirDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDirDialog); + // call SetStyle + self->SetStyle(style); + + return 0; + } + + #endif + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDirDialog) // wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition) *************** *** 978,996 **** } - // long GetStyle() const - static int LUACALL wxLua_wxDirDialog_GetStyle(lua_State *L) - { - wxLuaState wxlState(L); - long returns; - // get this - wxDirDialog * self = (wxDirDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDirDialog); - // call GetStyle - returns = self->GetStyle(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - // void SetMessage(const wxString& message) static int LUACALL wxLua_wxDirDialog_SetMessage(lua_State *L) --- 1019,1022 ---- *************** *** 1021,1038 **** } - // void SetStyle(long style) - static int LUACALL wxLua_wxDirDialog_SetStyle(lua_State *L) - { - wxLuaState wxlState(L); - // long style - long style = (long)wxlState.GetNumberType(2); - // get this - wxDirDialog * self = (wxDirDialog *)wxlState.GetUserDataType(1, s_wxluatag_wxDirDialog); - // call SetStyle - self->SetStyle(style); - - return 0; - } - static int LUACALL wxLua_wxDirDialog_destructor(lua_State *) { --- 1047,1050 ---- *************** *** 1047,1050 **** --- 1059,1070 ---- static WXLUAMETHOD s_wxDirDialog_methods[] = { + #if (!wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxDirDialog) + { LuaMethod, "GetStyle", wxLua_wxDirDialog_GetStyle, 0, 0, { 0 } }, + { LuaMethod, "SetStyle", wxLua_wxDirDialog_SetStyle, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "Style", wxLua_wxDirDialog_GetStyle, 0, 0, {0} }, + { LuaSetProp, "Style", wxLua_wxDirDialog_SetStyle, 1, 1, {0} }, + #endif + + #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxDirDialog) { LuaConstructor, "wxDirDialog", wxLua_wxDirDialog_constructor, 5, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, &s_wxluatag_wxPoint, 0 } }, *************** *** 1053,1066 **** { LuaMethod, "GetPath", wxLua_wxDirDialog_GetPath, 0, 0, { 0 } }, { LuaMethod, "GetMessage", wxLua_wxDirDialog_GetMessage, 0, 0, { 0 } }, - { LuaMethod, "GetStyle", wxLua_wxDirDialog_GetStyle, 0, 0, { 0 } }, { LuaMethod, "SetMessage", wxLua_wxDirDialog_SetMessage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetPath", wxLua_wxDirDialog_SetPath, 1, 1, { &s_wxluaarg_String, 0 } }, - { LuaMethod, "SetStyle", wxLua_wxDirDialog_SetStyle, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "Message", wxLua_wxDirDialog_GetMessage, 0, 0, {0} }, { LuaSetProp, "Message", wxLua_wxDirDialog_SetMessage, 1, 1, {0} }, { LuaGetProp, "Path", wxLua_wxDirDialog_GetPath, 0, 0, {0} }, { LuaSetProp, "Path", wxLua_wxDirDialog_SetPath, 1, 1, {0} }, - { LuaGetProp, "Style", wxLua_wxDirDialog_GetStyle, 0, 0, {0} }, - { LuaSetProp, "Style", wxLua_wxDirDialog_SetStyle, 1, 1, {0} }, { LuaDelete, "wxDirDialog", wxLua_wxDirDialog_destructor, 0, 0, {0} }, }; --- 1073,1082 ---- |