Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5608/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 mdi.cpp menutool.cpp print.cpp regex.cpp sizer.cpp socket.cpp thread.cpp wave.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: simplified binding generator and write bindings out alphabetically use #elif statements to guarantee there is only one item with the same name Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** xml.cpp 15 Mar 2007 00:01:24 -0000 1.25 --- xml.cpp 15 Mar 2007 23:24:57 -0000 1.26 *************** *** 35,105 **** int s_wxluatag_wxXmlNode = -1; ! // %constructor wxXmlNodeDefault() ! static int LUACALL wxLua_wxXmlNodeDefault_constructor(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxXmlNode *returns; ! // call constructor ! returns = new wxXmlNode(); ! // add to tracked memory list [...2366 lines suppressed...] ! { LuaMethod, "LoadMenuBarWindow", wxLua_wxXmlResource_LoadMenuBarWindow, 2, 2, s_wxluatagArray_wxLua_wxXmlResource_LoadMenuBarWindow }, ! #endif // (wxLUA_USE_wxMenu && wxUSE_MENUS) && (wxLUA_USE_wxXMLResource && wxUSE_XML) + { LuaMethod, "LoadPanel", wxLua_wxXmlResource_LoadPanel, 2, 2, s_wxluatagArray_wxLua_wxXmlResource_LoadPanel }, + { LuaMethod, "LoadPanelCreate", wxLua_wxXmlResource_LoadPanelCreate, 3, 3, s_wxluatagArray_wxLua_wxXmlResource_LoadPanelCreate }, #if (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) { LuaMethod, "LoadToolBar", wxLua_wxXmlResource_LoadToolBar, 2, 2, s_wxluatagArray_wxLua_wxXmlResource_LoadToolBar }, ! #endif // (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) { LuaMethod, "Set", wxLua_wxXmlResource_Set, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Set }, { LuaMethod, "SetFlags", wxLua_wxXmlResource_SetFlags, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_SetFlags }, { LuaMethod, "Unload", wxLua_wxXmlResource_Unload, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Unload }, { LuaGetProp, "Version", wxLua_wxXmlResource_GetVersion, 0, 0, s_wxluaargArray_None }, ! { LuaConstructor, "wxXmlResource", wxLua_wxXmlResource_constructor, 2, 1, s_wxluatagArray_wxLua_wxXmlResource_constructor }, ! { LuaConstructor, "wxXmlResourceDefault", wxLua_wxXmlResourceDefault_constructor, 1, 0, s_wxluatagArray_wxLua_wxXmlResourceDefault_constructor }, ! { LuaConstructor, "wxXmlResourceGetDefault", wxLua_wxXmlResourceGetDefault_constructor, 0, 0, s_wxluaargArray_None }, ! }; Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** defsutil.cpp 15 Mar 2007 00:01:16 -0000 1.27 --- defsutil.cpp 15 Mar 2007 23:24:52 -0000 1.28 *************** *** 35,38 **** --- 35,96 ---- int s_wxluatag_wxProcess = -1; + #if (wxUSE_STREAMS) && (wxLUA_USE_wxProcess) + // void CloseOutput() + static int LUACALL wxLua_wxProcess_CloseOutput(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); [...1105 lines suppressed...] ! #endif // wxLUA_USE_wxBusyInfo && wxUSE_BUSYINFO *************** *** 841,846 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxBusyInfo_methods[] = { - { LuaConstructor, "wxBusyInfo", wxLua_wxBusyInfo_constructor, 2, 1, s_wxluatagArray_wxLua_wxBusyInfo_constructor }, { LuaMethod, "Delete", wxLua_wxBusyInfo_Delete, 0, 0, s_wxluaargArray_None }, }; --- 874,880 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxBusyInfo_methods[] = { { LuaMethod, "Delete", wxLua_wxBusyInfo_Delete, 0, 0, s_wxluaargArray_None }, + { LuaConstructor, "wxBusyInfo", wxLua_wxBusyInfo_constructor, 2, 1, s_wxluatagArray_wxLua_wxBusyInfo_constructor }, + }; Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxlua.cpp 15 Mar 2007 00:01:24 -0000 1.31 --- wxlua.cpp 15 Mar 2007 23:24:57 -0000 1.32 *************** *** 62,93 **** int s_wxluatag_wxLuaObject = -1; ! // %override wxLua_wxLuaObject_constructor ! // wxLuaObject(void *object) ! static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaObject *returns; ! // call constructor ! returns = new wxLuaObject(wxlState, 1); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); ! // return the number of parameters ! return 1; } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxLuaObject_SetObject ! // void SetObject(void *object) ! static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) { wxLuaState wxlState(L); // get this ! wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call SetObject ! self->SetObject(1); ! // return the number of parameters ! return 0; } --- 62,91 ---- int s_wxluatag_wxLuaObject = -1; ! static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // 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; } ! // int GetAllocationFlags() const ! static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) { wxLuaState wxlState(L); + int returns; // get this ! wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call GetAllocationFlags ! returns = self->GetAllocationFlags(); ! // push the result number ! lua_pushnumber(L, returns); ! ! return 1; } *************** *** 105,123 **** } - // int GetAllocationFlags() const - static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetAllocationFlags - returns = self->GetAllocationFlags(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluaarg_Enumeration, 0 }; // bool HasAllocationFlag(wxLuaObject_Type flag) --- 103,106 ---- *************** *** 158,188 **** } ! static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // 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; } // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaObject_methods[] = { ! { LuaConstructor, "wxLuaObject", wxLua_wxLuaObject_constructor, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "SetObject", wxLua_wxLuaObject_SetObject, 1, 0, s_wxluatagArray_wxLua_wxLuaObject_SetObject }, ! { LuaMethod, "GetObject", wxLua_wxLuaObject_GetObject, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetAllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, s_wxluaargArray_None }, { LuaMethod, "HasAllocationFlag", wxLua_wxLuaObject_HasAllocationFlag, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }, - { LuaMethod, "SetAllocationFlag", wxLua_wxLuaObject_SetAllocationFlag, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_SetAllocationFlag }, - { LuaGetProp, "AllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, s_wxluaargArray_None }, { LuaGetProp, "Object", wxLua_wxLuaObject_GetObject, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Object", wxLua_wxLuaObject_SetObject, 1, 1, s_wxluaargArray_None }, ! { LuaMethod, "Delete", wxLua_wxLuaObject_Delete, 0, 0, s_wxluaargArray_None }, }; --- 141,188 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxLuaObject_SetObject ! // void SetObject(void *object) ! static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L) { wxLuaState wxlState(L); ! // get this ! wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call SetObject ! self->SetObject(1); ! // return the number of parameters return 0; } + // %override wxLua_wxLuaObject_constructor + // wxLuaObject(void *object) + static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaObject *returns; + // call constructor + returns = new wxLuaObject(wxlState, 1); + // add to tracked memory list + wxlState.AddTrackedObject(returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); + // return the number of parameters + return 1; + } + // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaObject_methods[] = { ! { LuaGetProp, "AllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "Delete", wxLua_wxLuaObject_Delete, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetAllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetObject", wxLua_wxLuaObject_GetObject, 0, 0, s_wxluaargArray_None }, { LuaMethod, "HasAllocationFlag", wxLua_wxLuaObject_HasAllocationFlag, 1, 1, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }, { LuaGetProp, "Object", wxLua_wxLuaObject_GetObject, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Object", wxLua_wxLuaObject_SetObject, 1, 1, s_wxluaargArray_None }, ! { LuaMethod, "SetAllocationFlag", wxLua_wxLuaObject_SetAllocationFlag, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_SetAllocationFlag }, ! { LuaMethod, "SetObject", wxLua_wxLuaObject_SetObject, 1, 0, s_wxluatagArray_wxLua_wxLuaObject_SetObject }, ! { LuaConstructor, "wxLuaObject", wxLua_wxLuaObject_constructor, 0, 0, s_wxluaargArray_None }, }; *************** *** 198,222 **** int s_wxluatag_wxLuaPrintout = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_constructor[] = { &s_wxluaarg_String, &s_wxluatag_wxLuaObject, 0 }; ! // %override wxLua_wxLuaPrintout_constructor ! // wxLuaPrintout(const wxString& title = "Printout", wxLuaObject *pObject = NULL) ! static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaPrintout *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // wxLuaObject pObject = NULL ! wxLuaObject * pObject = (argCount >= 2 ? (wxLuaObject *)wxlState.GetUserDataType(2, s_wxluatag_wxLuaObject) : NULL); ! // const wxString title = "Printout" ! const wxString title = (argCount >= 1 ? wxlState.GetwxStringType(1) : wxString(wxT("Printout"))); ! // call constructor ! returns = new wxLuaPrintout(wxlState, title, pObject); ! // add to tracked memory list ! wxlState.AddTrackedObject((wxLuaPrintout *)returns); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); ! ! return 1; } --- 198,213 ---- int s_wxluatag_wxLuaPrintout = -1; ! #if wxLUA_USE_wxLuaPrintout ! static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); ! // 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; } *************** *** 259,283 **** } ! static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) { wxLuaState wxlState(L); ! wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); ! // 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; } // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaPrintout_methods[] = { ! { LuaConstructor, "wxLuaPrintout", wxLua_wxLuaPrintout_constructor, 2, 0, s_wxluatagArray_wxLua_wxLuaPrintout_constructor }, { LuaMethod, "GetID", wxLua_wxLuaPrintout_GetID, 0, 0, s_wxluaargArray_None }, { LuaMethod, "SetPageInfo", wxLua_wxLuaPrintout_SetPageInfo, 4, 2, s_wxluatagArray_wxLua_wxLuaPrintout_SetPageInfo }, ! { LuaMethod, "Delete", wxLua_wxLuaPrintout_Delete, 0, 0, s_wxluaargArray_None }, }; --- 250,287 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_constructor[] = { &s_wxluaarg_String, &s_wxluatag_wxLuaObject, 0 }; ! // %override wxLua_wxLuaPrintout_constructor ! // wxLuaPrintout(const wxString& title = "Printout", wxLuaObject *pObject = NULL) ! static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L) { wxLuaState wxlState(L); ! wxLuaPrintout *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // wxLuaObject pObject = NULL ! wxLuaObject * pObject = (argCount >= 2 ? (wxLuaObject *)wxlState.GetUserDataType(2, s_wxluatag_wxLuaObject) : NULL); ! // const wxString title = "Printout" ! const wxString title = (argCount >= 1 ? wxlState.GetwxStringType(1) : wxString(wxT("Printout"))); ! // call constructor ! returns = new wxLuaPrintout(wxlState, title, pObject); ! // add to tracked memory list ! wxlState.AddTrackedObject((wxLuaPrintout *)returns); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); ! ! return 1; } + #endif // wxLUA_USE_wxLuaPrintout + // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaPrintout_methods[] = { ! { LuaMethod, "Delete", wxLua_wxLuaPrintout_Delete, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetID", wxLua_wxLuaPrintout_GetID, 0, 0, s_wxluaargArray_None }, { LuaMethod, "SetPageInfo", wxLua_wxLuaPrintout_SetPageInfo, 4, 2, s_wxluatagArray_wxLua_wxLuaPrintout_SetPageInfo }, ! { LuaConstructor, "wxLuaPrintout", wxLua_wxLuaPrintout_constructor, 2, 0, s_wxluatagArray_wxLua_wxLuaPrintout_constructor }, ! }; *************** *** 294,298 **** int s_wxluatag_wxLuaHtmlWindow = -1; - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWindow_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, 0 }; --- 298,301 ---- *************** *** 334,341 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaHtmlWindow_methods[] = { - #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) { LuaConstructor, "wxLuaHtmlWindow", wxLua_wxLuaHtmlWindow_constructor, 6, 1, s_wxluatagArray_wxLua_wxLuaHtmlWindow_constructor }, ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) }; --- 337,343 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaHtmlWindow_methods[] = { #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) { LuaConstructor, "wxLuaHtmlWindow", wxLua_wxLuaHtmlWindow_constructor, 6, 1, s_wxluatagArray_wxLua_wxLuaHtmlWindow_constructor }, ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) }; *************** *** 353,373 **** int s_wxluatag_wxLuaHtmlWinTagEvent = -1; ! ! #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! // const wxHtmlTag *GetHtmlTag() const ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag(lua_State *L) { wxLuaState wxlState(L); - const wxHtmlTag *returns; - // get this wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // call GetHtmlTag ! returns = (const wxHtmlTag *)self->GetHtmlTag(); ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlTag, returns); ! ! return 1; } // wxHtmlWinParser *GetHtmlParser() const static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser(lua_State *L) --- 355,375 ---- int s_wxluatag_wxLuaHtmlWinTagEvent = -1; ! #if wxLUA_USE_wxLuaHtmlWindow ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // 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; } + #endif // wxLUA_USE_wxLuaHtmlWindow + + #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) // wxHtmlWinParser *GetHtmlParser() const static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser(lua_State *L) *************** *** 385,407 **** } ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled[] = { &s_wxluaarg_Boolean, 0 }; ! // void SetParseInnerCalled(bool fParseInnerCalled = true) ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled(lua_State *L) { wxLuaState wxlState(L); ! // get number of arguments ! int argCount = lua_gettop(L); ! // bool fParseInnerCalled = true ! bool fParseInnerCalled = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); // get this wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // call SetParseInnerCalled ! self->SetParseInnerCalled(fParseInnerCalled); ! return 0; } // bool GetParseInnerCalled() const static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled(lua_State *L) --- 387,408 ---- } ! // const wxHtmlTag *GetHtmlTag() const ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag(lua_State *L) { wxLuaState wxlState(L); ! const wxHtmlTag *returns; // get this wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // call GetHtmlTag ! returns = (const wxHtmlTag *)self->GetHtmlTag(); ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlTag, returns); ! return 1; } + #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) + + #if wxLUA_USE_wxLuaHtmlWindow // bool GetParseInnerCalled() const static int LUACALL wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled(lua_State *L) *************** *** 419,452 **** } ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // 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; } // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaHtmlWinTagEvent_methods[] = { #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) - { LuaMethod, "GetHtmlTag", wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetHtmlParser", wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "HtmlTag", wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "HtmlParser", wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 0, 0, s_wxluaargArray_None }, ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) - { LuaMethod, "SetParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, 0, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled }, { LuaMethod, "GetParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, 1, s_wxluaargArray_None }, ! { LuaMethod, "Delete", wxLua_wxLuaHtmlWinTagEvent_Delete, 0, 0, s_wxluaargArray_None }, }; --- 420,470 ---- } ! #endif // wxLUA_USE_wxLuaHtmlWindow ! ! #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! ! #if wxLUA_USE_wxLuaHtmlWindow ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled[] = { &s_wxluaarg_Boolean, 0 }; ! // void SetParseInnerCalled(bool fParseInnerCalled = true) ! static int LUACALL wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled(lua_State *L) { wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // bool fParseInnerCalled = true + bool fParseInnerCalled = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); + // get this wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // call SetParseInnerCalled ! self->SetParseInnerCalled(fParseInnerCalled); ! return 0; } + #endif // wxLUA_USE_wxLuaHtmlWindow + // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaHtmlWinTagEvent_methods[] = { + { LuaMethod, "Delete", wxLua_wxLuaHtmlWinTagEvent_Delete, 0, 0, s_wxluaargArray_None }, #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) { LuaMethod, "GetHtmlParser", wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "GetHtmlTag", wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag, 0, 0, s_wxluaargArray_None }, ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) { LuaMethod, "GetParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 0, 0, s_wxluaargArray_None }, ! ! #if (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! { LuaGetProp, "HtmlParser", wxLua_wxLuaHtmlWinTagEvent_GetHtmlParser, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "HtmlTag", wxLua_wxLuaHtmlWinTagEvent_GetHtmlTag, 0, 0, s_wxluaargArray_None }, ! #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxHTML && wxUSE_HTML) ! { LuaSetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, 1, s_wxluaargArray_None }, ! { LuaGetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "SetParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, 0, s_wxluatagArray_wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled }, ! }; *************** *** 463,484 **** int s_wxluatag_wxLuaTreeItemData = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaTreeItemData_constructor[] = { &s_wxluaarg_Number, 0 }; ! // wxLuaTreeItemData(double value = 0) ! static int LUACALL wxLua_wxLuaTreeItemData_constructor(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxLuaTreeItemData *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // double value = 0 ! double value = (argCount >= 1 ? (double)wxlState.GetNumberType(1) : 0); ! // call constructor ! returns = new wxLuaTreeItemData(value); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxLuaTreeItemData, returns); ! ! return 1; ! } ! // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) --- 481,485 ---- int s_wxluatag_wxLuaTreeItemData = -1; ! #if wxLUA_USE_wxTreeCtrl // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) *************** *** 511,523 **** } // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaTreeItemData_methods[] = { - { LuaConstructor, "wxLuaTreeItemData", wxLua_wxLuaTreeItemData_constructor, 1, 0, s_wxluatagArray_wxLua_wxLuaTreeItemData_constructor }, { LuaMethod, "GetValue", wxLua_wxLuaTreeItemData_GetValue, 0, 0, s_wxluaargArray_None }, { LuaMethod, "SetValue", wxLua_wxLuaTreeItemData_SetValue, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }, - { LuaGetProp, "Value", wxLua_wxLuaTreeItemData_GetValue, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Value", wxLua_wxLuaTreeItemData_SetValue, 1, 1, s_wxluaargArray_None }, }; --- 512,545 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaTreeItemData_constructor[] = { &s_wxluaarg_Number, 0 }; + // wxLuaTreeItemData(double value = 0) + static int LUACALL wxLua_wxLuaTreeItemData_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLuaTreeItemData *returns; + // get number of arguments + int argCount = lua_gettop(L); + // double value = 0 + double value = (argCount >= 1 ? (double)wxlState.GetNumberType(1) : 0); + // call constructor + returns = new wxLuaTreeItemData(value); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLuaTreeItemData, returns); + + return 1; + } + + #endif // wxLUA_USE_wxTreeCtrl + // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaTreeItemData_methods[] = { { LuaMethod, "GetValue", wxLua_wxLuaTreeItemData_GetValue, 0, 0, s_wxluaargArray_None }, { LuaMethod, "SetValue", wxLua_wxLuaTreeItemData_SetValue, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }, { LuaSetProp, "Value", wxLua_wxLuaTreeItemData_SetValue, 1, 1, s_wxluaargArray_None }, + { LuaGetProp, "Value", wxLua_wxLuaTreeItemData_GetValue, 0, 0, s_wxluaargArray_None }, + { LuaConstructor, "wxLuaTreeItemData", wxLua_wxLuaTreeItemData_constructor, 1, 0, s_wxluatagArray_wxLua_wxLuaTreeItemData_constructor }, + }; Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** image.cpp 15 Mar 2007 00:01:19 -0000 1.32 --- image.cpp 15 Mar 2007 23:24:54 -0000 1.33 *************** *** 35,38 **** --- 35,53 ---- int s_wxluatag_wxImage = -1; + #if wxLUA_USE_wxImage && wxUSE_IMAGE + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_AddHandler[] = { &s_wxluatag_wxImageHandler, 0 }; + // static void AddHandler(wxImageHandler* handler) + static int LUACALL wxLua_wxImage_AddHandler(lua_State *L) + { + wxLuaState wxlState(L); + // wxImageHandler handler [...3133 lines suppressed...] ! #endif // ((wxLUA_USE_wxIcon) && (wxLUA_USE_wxPointSizeRect)) && (wxLUA_USE_wxArtProvider) ! ! #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxArtProvider) ! { LuaMethod, "GetSizeHint", wxLua_wxArtProvider_GetSizeHint, 2, 1, s_wxluatagArray_wxLua_wxArtProvider_GetSizeHint }, ! #endif // (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxArtProvider) + #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) + { LuaMethod, "Insert", wxLua_wxArtProvider_Insert, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Insert }, + #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) { LuaMethod, "Pop", wxLua_wxArtProvider_Pop, 0, 0, s_wxluaargArray_None }, ! #endif // (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider) #if (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) { LuaMethod, "Push", wxLua_wxArtProvider_Push, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Push }, { LuaMethod, "Remove", wxLua_wxArtProvider_Remove, 1, 1, s_wxluatagArray_wxLua_wxArtProvider_Remove }, ! #endif // (wxLUA_USE_wxArtProvider) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxArtProvider)) }; Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** mdi.cpp 15 Mar 2007 00:01:19 -0000 1.28 --- mdi.cpp 15 Mar 2007 23:24:55 -0000 1.29 *************** *** 53,125 **** int s_wxluatag_wxMDIParentFrame = -1; ! ! #if ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) ! // %win wxMenu* GetWindowMenu() const ! static int LUACALL wxLua_wxMDIParentFrame_GetWindowMenu(lua_State *L) { wxLuaState wxlState(L); - wxMenu *returns; // get this [...3211 lines suppressed...] ! #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { LuaMethod, "RemoveFileFromHistory", wxLua_wxFileHistory_RemoveFileFromHistory, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_RemoveFileFromHistory }, #if (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) { LuaMethod, "RemoveMenu", wxLua_wxFileHistory_RemoveMenu, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_RemoveMenu }, + #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) + + #if (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + { LuaMethod, "Save", wxLua_wxFileHistory_Save, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_Save }, + #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxConfig && wxUSE_CONFIG) + + #if (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) { LuaMethod, "UseMenu", wxLua_wxFileHistory_UseMenu, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_UseMenu }, ! #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) { LuaConstructor, "wxFileHistory", wxLua_wxFileHistory_constructor, 2, 0, s_wxluatagArray_wxLua_wxFileHistory_constructor }, ! }; Index: config.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/config.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** config.cpp 15 Mar 2007 00:01:14 -0000 1.31 --- config.cpp 15 Mar 2007 23:24:50 -0000 1.32 *************** *** 35,112 **** int s_wxluatag_wxConfigBase = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigGet_constructor[] = { &s_wxluaarg_Boolean, 0 }; ! // %override wxLua_wxConfigGet_constructor ! // %constructor wxConfigGet(bool CreateOnDemand = true) ! static int LUACALL wxLua_wxConfigGet_constructor(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxConfigBase *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // bool CreateOnDemand = true ! bool CreateOnDemand = (argCount >= 1 ? wxlState.GetBooleanType(1) : true); ! // call constructor ! returns = wxConfigBase::Get(CreateOnDemand); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); ! // return the number of parameters ! return 1; ! } ! ! // %override wxLua_wxConfigCreate_constructor ! // %constructor wxConfigCreate() ! static int LUACALL wxLua_wxConfigCreate_constructor(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxConfigBase *returns; ! // call constructor ! returns = wxConfigBase::Create(); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); ! // return the number of parameters ! return 1; ! } ! ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigCreateFileConfig_constructor[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigCreateFileConfig_constructor ! // %constructor wxConfigCreateFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8) ! static int LUACALL wxLua_wxConfigCreateFileConfig_constructor(lua_State *L) ! { ! wxLuaState wxlState(L); ! wxConfigBase *returns; ! // get number of arguments ! int argCount = lua_gettop(L); ! // long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE ! long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE); ! // const wxString& globalFilename = "" ! wxString globalFilename = (argCount >= 4 ? wxlState.GetwxStringType(4) : wxString(wxEmptyString)); ! // const wxString& localFilename = "", ! wxString localFilename = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); ! // const wxString& vendorName = "" ! wxString vendorName = (argCount >= 2 ? wxlState.GetwxStringType(2) : wxString(wxEmptyString)); ! // const wxString& appName = "" ! wxString appName = (argCount >= 1 ? wxlState.GetwxStringType(1) : wxString(wxEmptyString)); ! // call constructor ! returns = (wxConfigBase*)new wxFileConfig(appName, vendorName, localFilename, globalFilename, style); ! wxConfigBase::Set(returns); ! // push the constructed class pointer ! wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); ! // return the number of parameters ! return 1; ! } ! ! // %override wxLua_wxConfigBase_Destroy ! // void Destroy() ! static int LUACALL wxLua_wxConfigBase_Destroy(lua_State *L) ! { ! wxLuaState wxlState(L); ! // get this ! wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); ! // call Destroy ! delete self; ! // return the number of parameters ! return 0; ! } ! // static wxConfigBase* Create() static int LUACALL wxLua_wxConfigBase_Create(lua_State *L) --- 35,39 ---- int s_wxluatag_wxConfigBase = -1; ! #if wxLUA_USE_wxConfig && wxUSE_CONFIG // static wxConfigBase* Create() static int LUACALL wxLua_wxConfigBase_Create(lua_State *L) *************** *** 122,135 **** } - // static void DontCreateOnDemand() - static int LUACALL wxLua_wxConfigBase_DontCreateOnDemand(lua_State *L) - { - wxLuaState wxlState(L); - // call DontCreateOnDemand - wxConfigBase::DontCreateOnDemand(); - - return 0; - } - // bool DeleteAll() static int LUACALL wxLua_wxConfigBase_DeleteAll(lua_State *L) --- 49,52 ---- *************** *** 187,190 **** --- 104,130 ---- } + // %override wxLua_wxConfigBase_Destroy + // void Destroy() + static int LUACALL wxLua_wxConfigBase_Destroy(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxConfigBase *self = (wxConfigBase *)wxlState.GetUserDataType(1, s_wxluatag_wxConfigBase); + // call Destroy + delete self; + // return the number of parameters + return 0; + } + + // static void DontCreateOnDemand() + static int LUACALL wxLua_wxConfigBase_DontCreateOnDemand(lua_State *L) + { + wxLuaState wxlState(L); + // call DontCreateOnDemand + wxConfigBase::DontCreateOnDemand(); + + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_Exists[] = { &s_wxluaarg_String, 0 }; // bool Exists(wxString& strName) const *************** *** 258,264 **** } ! // %override wxLua_wxConfigBase_GetFirstGroup ! // bool GetFirstGroup(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetFirstGroup(lua_State *L) { wxLuaState wxlState(L); --- 198,204 ---- } ! // %override wxLua_wxConfigBase_GetFirstEntry ! // bool GetFirstEntry(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetFirstEntry(lua_State *L) { wxLuaState wxlState(L); *************** *** 271,279 **** // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetFirstGroup ! returns = self->GetFirstGroup(str, index); // push the result number lua_pushboolean(L, returns); ! // push the result string wxlState.lua_PushString(str); // push the next index --- 211,219 ---- // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetFirstEntry ! returns = self->GetFirstEntry(str, index); // push the result number lua_pushboolean(L, returns); ! // push the next string wxlState.lua_PushString(str); // push the next index *************** *** 283,289 **** } ! // %override wxLua_wxConfigBase_GetFirstEntry ! // bool GetFirstEntry(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetFirstEntry(lua_State *L) { wxLuaState wxlState(L); --- 223,229 ---- } ! // %override wxLua_wxConfigBase_GetFirstGroup ! // bool GetFirstGroup(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetFirstGroup(lua_State *L) { wxLuaState wxlState(L); *************** *** 296,304 **** // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetFirstEntry ! returns = self->GetFirstEntry(str, index); // push the result number lua_pushboolean(L, returns); ! // push the next string wxlState.lua_PushString(str); // push the next index --- 236,244 ---- // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetFirstGroup ! returns = self->GetFirstGroup(str, index); // push the result number lua_pushboolean(L, returns); ! // push the result string wxlState.lua_PushString(str); // push the next index *************** *** 308,317 **** } ! // %override wxLua_wxConfigBase_GetNextGroup ! // bool GetNextGroup(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetNextGroup(lua_State *L) { wxLuaState wxlState(L); ! bool returns; // only the number is needed long index = (long)wxlState.GetNumberType(2); --- 248,258 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_GetNextEntry[] = { &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_GetNextEntry ! // bool GetNextEntry(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetNextEntry(lua_State *L) { wxLuaState wxlState(L); ! bool returns; // only the number is needed long index = (long)wxlState.GetNumberType(2); *************** *** 319,327 **** // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetNextGroup ! returns = self->GetNextGroup(str, index); // push the result number lua_pushboolean(L, returns); ! // push the next result string wxlState.lua_PushString(str); // push the next index --- 260,268 ---- // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetNextEntry ! returns = self->GetNextEntry(str, index); // push the result number lua_pushboolean(L, returns); ! // push the result string wxlState.lua_PushString(str); // push the next index *************** *** 331,341 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_GetNextEntry[] = { &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_GetNextEntry ! // bool GetNextEntry(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetNextEntry(lua_State *L) { wxLuaState wxlState(L); ! bool returns; // only the number is needed long index = (long)wxlState.GetNumberType(2); --- 272,281 ---- } ! // %override wxLua_wxConfigBase_GetNextGroup ! // bool GetNextGroup(wxString& str, long& index) const ! static int LUACALL wxLua_wxConfigBase_GetNextGroup(lua_State *L) { wxLuaState wxlState(L); ! bool returns; // only the number is needed long index = (long)wxlState.GetNumberType(2); *************** *** 343,351 **** // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetNextEntry ! returns = self->GetNextEntry(str, index); // push the result number lua_pushboolean(L, returns); ! // push the result string wxlState.lua_PushString(str); // push the next index --- 283,291 ---- // get this wxConfig *self = (wxConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxConfig); ! // call GetNextGroup ! returns = self->GetNextGroup(str, index); // push the result number lua_pushboolean(L, returns); ! // push the next result string wxlState.lua_PushString(str); // push the next index *************** *** 516,530 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_ReadInt[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_ReadInt ! // %rename ReadInt bool Read(const wxString& key, long* l, long defaultVal = 0) const ! static int LUACALL wxLua_wxConfigBase_ReadInt(lua_State *L) { wxLuaState wxlState(L); ! long returns = 0; // get number of arguments int argCount = lua_gettop(L); // double defaultVal = 0 ! long defaultVal = (argCount >= 3 ? (long)wxlState.GetNumberType(3) : 0); // const wxString& key wxString key = wxlState.GetwxStringType(2); --- 456,470 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_ReadFloat[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_ReadFloat ! // %rename ReadFloat bool Read(const wxString& key, double* d, double defaultVal = 0) const ! static int LUACALL wxLua_wxConfigBase_ReadFloat(lua_State *L) { wxLuaState wxlState(L); ! double returns = 0; // get number of arguments int argCount = lua_gettop(L); // double defaultVal = 0 ! double defaultVal = (argCount >= 3 ? (double)wxlState.GetNumberType(3) : 0); // const wxString& key wxString key = wxlState.GetwxStringType(2); *************** *** 541,555 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_ReadFloat[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_ReadFloat ! // %rename ReadFloat bool Read(const wxString& key, double* d, double defaultVal = 0) const ! static int LUACALL wxLua_wxConfigBase_ReadFloat(lua_State *L) { wxLuaState wxlState(L); ! double returns = 0; // get number of arguments int argCount = lua_gettop(L); // double defaultVal = 0 ! double defaultVal = (argCount >= 3 ? (double)wxlState.GetNumberType(3) : 0); // const wxString& key wxString key = wxlState.GetwxStringType(2); --- 481,495 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_ReadInt[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %override wxLua_wxConfigBase_ReadInt ! // %rename ReadInt bool Read(const wxString& key, long* l, long defaultVal = 0) const ! static int LUACALL wxLua_wxConfigBase_ReadInt(lua_State *L) { wxLuaState wxlState(L); ! long returns = 0; // get number of arguments int argCount = lua_gettop(L); // double defaultVal = 0 ! long defaultVal = (argCount >= 3 ? (long)wxlState.GetNumberType(3) : 0); // const wxString& key wxString key = wxlState.GetwxStringType(2); *************** *** 693,704 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_WriteInt[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %rename WriteInt bool Write(const wxString &key, long value) ! static int LUACALL wxLua_wxConfigBase_WriteInt(lua_State *L) { wxLuaState wxlState(L); bool returns; ! // long value ! long value = (long)wxlState.GetNumberType(3); // const wxString key const wxString key = wxlState.GetwxStringType(2); --- 633,644 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_WriteFloat[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %rename WriteFloat bool Write(const wxString &key, double value) ! static int LUACALL wxLua_wxConfigBase_WriteFloat(lua_State *L) { wxLuaState wxlState(L); bool returns; ! // double value ! double value = (double)wxlState.GetNumberType(3); // const wxString key const wxString key = wxlState.GetwxStringType(2); *************** *** 713,724 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_WriteFloat[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %rename WriteFloat bool Write(const wxString &key, double value) ! static int LUACALL wxLua_wxConfigBase_WriteFloat(lua_State *L) { wxLuaState wxlState(L); bool returns; ! // double value ! double value = (double)wxlState.GetNumberType(3); // const wxString key const wxString key = wxlState.GetwxStringType(2); --- 653,664 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigBase_WriteInt[] = { &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; ! // %rename WriteInt bool Write(const wxString &key, long value) ! static int LUACALL wxLua_wxConfigBase_WriteInt(lua_State *L) { wxLuaState wxlState(L); bool returns; ! // long value ! long value = (long)wxlState.GetNumberType(3); // const wxString key const wxString key = wxlState.GetwxStringType(2); *************** *** 733,757 **** } // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxConfigBase_methods[] = { ! { LuaConstructor, "wxConfigGet", wxLua_wxConfigGet_constructor, 1, 0, s_wxluatagArray_wxLua_wxConfigGet_constructor }, ! { LuaConstructor, "wxConfigCreate", wxLua_wxConfigCreate_constructor, 0, 0, s_wxluaargArray_None }, ! { LuaConstructor, "wxConfigCreateFileConfig", wxLua_wxConfigCreateFileConfig_constructor, 5, 0, s_wxluatagArray_wxLua_wxConfigCreateFileConfig_constructor }, ! { LuaMethod, "Destroy", wxLua_wxConfigBase_Destroy, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Create", wxLua_wxConfigBase_Create, 0, 0, s_wxluaargArray_None }, - { LuaMethod, "DontCreateOnDemand", wxLua_wxConfigBase_DontCreateOnDemand, 0, 0, s_wxluaargArray_None }, { LuaMethod, "DeleteAll", wxLua_wxConfigBase_DeleteAll, 0, 0, s_wxluaargArray_None }, { LuaMethod, "DeleteEntry", wxLua_wxConfigBase_DeleteEntry, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_DeleteEntry }, { LuaMethod, "DeleteGroup", wxLua_wxConfigBase_DeleteGroup, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_DeleteGroup }, { LuaMethod, "Exists", wxLua_wxConfigBase_Exists, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_Exists }, { LuaMethod, "Flush", wxLua_wxConfigBase_Flush, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_Flush }, { LuaMethod, "GetAppName", wxLua_wxConfigBase_GetAppName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetEntryType", wxLua_wxConfigBase_GetEntryType, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_GetEntryType }, - { LuaMethod, "GetFirstGroup", wxLua_wxConfigBase_GetFirstGroup, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetFirstEntry", wxLua_wxConfigBase_GetFirstEntry, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "GetNextGroup", wxLua_wxConfigBase_GetNextGroup, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNextEntry", wxLua_wxConfigBase_GetNextEntry, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_GetNextEntry }, { LuaMethod, "GetNumberOfEntries", wxLua_wxConfigBase_GetNumberOfEntries, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_GetNumberOfEntries }, { LuaMethod, "GetNumberOfGroups", wxLua_wxConfigBase_GetNumberOfGroups, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_GetNumberOfGroups }, --- 673,758 ---- } + // %override wxLua_wxConfigCreate_constructor + // %constructor wxConfigCreate() + static int LUACALL wxLua_wxConfigCreate_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxConfigBase *returns; + // call constructor + returns = wxConfigBase::Create(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); + // return the number of parameters + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigCreateFileConfig_constructor[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; + // %override wxLua_wxConfigCreateFileConfig_constructor + // %constructor wxConfigCreateFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8) + static int LUACALL wxLua_wxConfigCreateFileConfig_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxConfigBase *returns; + // get number of arguments + int argCount = lua_gettop(L); + // long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE + long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE); + // const wxString& globalFilename = "" + wxString globalFilename = (argCount >= 4 ? wxlState.GetwxStringType(4) : wxString(wxEmptyString)); + // const wxString& localFilename = "", + wxString localFilename = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); + // const wxString& vendorName = "" + wxString vendorName = (argCount >= 2 ? wxlState.GetwxStringType(2) : wxString(wxEmptyString)); + // const wxString& appName = "" + wxString appName = (argCount >= 1 ? wxlState.GetwxStringType(1) : wxString(wxEmptyString)); + // call constructor + returns = (wxConfigBase*)new wxFileConfig(appName, vendorName, localFilename, globalFilename, style); + wxConfigBase::Set(returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); + // return the number of parameters + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxConfigGet_constructor[] = { &s_wxluaarg_Boolean, 0 }; + // %override wxLua_wxConfigGet_constructor + // %constructor wxConfigGet(bool CreateOnDemand = true) + static int LUACALL wxLua_wxConfigGet_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxConfigBase *returns; + // get number of arguments + int argCount = lua_gettop(L); + // bool CreateOnDemand = true + bool CreateOnDemand = (argCount >= 1 ? wxlState.GetBooleanType(1) : true); + // call constructor + returns = wxConfigBase::Get(CreateOnDemand); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxConfig, returns); + // return the number of parameters + return 1; + } + + #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG + // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxConfigBase_methods[] = { ! { LuaGetProp, "AppName", wxLua_wxConfigBase_GetAppName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Create", wxLua_wxConfigBase_Create, 0, 0, s_wxluaargArray_None }, { LuaMethod, "DeleteAll", wxLua_wxConfigBase_DeleteAll, 0, 0, s_wxluaargArray_None }, { LuaMethod, "DeleteEntry", wxLua_wxConfigBase_DeleteEntry, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_DeleteEntry }, { LuaMethod, "DeleteGroup", wxLua_wxConfigBase_DeleteGroup, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_DeleteGroup }, + { LuaMethod, "Destroy", wxLua_wxConfigBase_Destroy, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "DontCreateOnDemand", wxLua_wxConfigBase_DontCreateOnDemand, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Exists", wxLua_wxConfigBase_Exists, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_Exists }, { LuaMethod, "Flush", wxLua_wxConfigBase_Flush, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_Flush }, { LuaMethod, "GetAppName", wxLua_wxConfigBase_GetAppName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetEntryType", wxLua_wxConfigBase_GetEntryType, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_GetEntryType }, { LuaMethod, "GetFirstEntry", wxLua_wxConfigBase_GetFirstEntry, 0, 0, s_wxluaargArray_None }, ! { LuaMethod, "GetFirstGroup", wxLua_wxConfigBase_GetFirstGroup, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNextEntry", wxLua_wxConfigBase_GetNextEntry, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_GetNextEntry }, + { LuaMethod, "GetNextGroup", wxLua_wxConfigBase_GetNextGroup, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNumberOfEntries", wxLua_wxConfigBase_GetNumberOfEntries, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_GetNumberOfEntries }, { LuaMethod, "GetNumberOfGroups", wxLua_wxConfigBase_GetNumberOfGroups, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_GetNumberOfGroups }, *************** *** 762,768 **** { LuaMethod, "IsExpandingEnvVars", wxLua_wxConfigBase_IsExpandingEnvVars, 0, 0, s_wxluaargArray_None }, { LuaMethod, "IsRecordingDefaults", wxLua_wxConfigBase_IsRecordingDefaults, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Read", wxLua_wxConfigBase_Read, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_Read }, - { LuaMethod, "ReadInt", wxLua_wxConfigBase_ReadInt, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_ReadInt }, { LuaMethod, "ReadFloat", wxLua_wxConfigBase_ReadFloat, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_ReadFloat }, { LuaMethod, "RenameEntry", wxLua_wxConfigBase_RenameEntry, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_RenameEntry }, { LuaMethod, "RenameGroup", wxLua_wxConfigBase_RenameGroup, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_RenameGroup }, --- 763,771 ---- { LuaMethod, "IsExpandingEnvVars", wxLua_wxConfigBase_IsExpandingEnvVars, 0, 0, s_wxluaargArray_None }, { LuaMethod, "IsRecordingDefaults", wxLua_wxConfigBase_IsRecordingDefaults, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "Path", wxLua_wxConfigBase_SetPath, 1, 1, s_wxluaargArray_None }, + { LuaGetProp, "Path", wxLua_wxConfigBase_GetPath, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Read", wxLua_wxConfigBase_Read, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_Read }, { LuaMethod, "ReadFloat", wxLua_wxConfigBase_ReadFloat, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_ReadFloat }, + { LuaMethod, "ReadInt", wxLua_wxConfigBase_ReadInt, 2, 1, s_wxluatagArray_wxLua_wxConfigBase_ReadInt }, { LuaMethod, "RenameEntry", wxLua_wxConfigBase_RenameEntry, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_RenameEntry }, { LuaMethod, "RenameGroup", wxLua_wxConfigBase_RenameGroup, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_RenameGroup }, *************** *** 771,781 **** { LuaMethod, "SetPath", wxLua_wxConfigBase_SetPath, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_SetPath }, { LuaMethod, "SetRecordDefaults", wxLua_wxConfigBase_SetRecordDefaults, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_SetRecordDefaults }, { LuaMethod, "Write", wxLua_wxConfigBase_Write, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_Write }, - { LuaMethod, "WriteInt", wxLua_wxConfigBase_WriteInt, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_WriteInt }, { LuaMethod, "WriteFloat", wxLua_wxConfigBase_WriteFloat, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_WriteFloat }, ! { LuaGetProp, "AppName", wxLua_wxConfigBase_GetAppName, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "VendorName", wxLua_wxConfigBase_GetVendorName, 0, 0, s_wxluaargArray_None }, ! { LuaGetProp, "Path", wxLua_wxConfigBase_GetPath, 0, 0, s_wxluaargArray_None }, ! { LuaSetProp, "Path", wxLua_wxConfigBase_SetPath, 1, 1, s_wxluaargArray_None }, }; --- 774,785 ---- { LuaMethod, "SetPath", wxLua_wxConfigBase_SetPath, 1, 1, s_wxluatagArray_wxLua_wxConfigBase_SetPath }, { LuaMethod, "SetRecordDefaults", wxLua_wxConfigBase_SetRecordDefaults, 1, 0, s_wxluatagArray_wxLua_wxConfigBase_SetRecordDefaults }, + { LuaGetProp, "VendorName", wxLua_wxConfigBase_GetVendorName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Write", wxLua_wxConfigBase_Write, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_Write }, { LuaMethod, "WriteFloat", wxLua_wxConfigBase_WriteFloat, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_WriteFloat }, ! { LuaMethod, "WriteInt", wxLua_wxConfigBase_WriteInt, 2, 2, s_wxluatagArray_wxLua_wxConfigBase_WriteInt }, ! { LuaConstructor, "wxConfigCreate", wxLua_wxConfigCreate_constructor, 0, 0, s_wxluaargArray_None }, ! { LuaConstructor, "wxConfigCreateFileConfig", wxLua_wxConfigCreateFileConfig_constructor, 5, 0, s_wxluatagArray_wxLua_wxConfigCreateFileConfig_constructor }, ! { LuaConstructor, "wxConfigGet", wxLua_wxConfigGet_constructor, 1, 0, s_wxluatagArray_wxLua_wxConfigGet_constructor }, ! }; *************** *** 792,795 **** --- 796,800 ---- int s_wxluatag_wxConfig = -1; + #if wxLUA_USE_wxConfig && wxUSE_CONFIG static wxLuaArgTag s_wxluatagArray_wxLua_wxConfig_constructor[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; // wxConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = 0) *************** *** 818,821 **** --- 823,828 ---- } + #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG + *************** *** 823,826 **** --- 830,834 ---- WXLUAMETHOD wxConfig_methods[] = { { LuaConstructor, "wxConfig", wxLua_wxConfig_constructor, 5, 0, s_wxluatagArray_wxLua_wxConfig_constructor }, + }; *************** *** 837,840 **** --- 845,864 ---- int s_wxluatag_wxFileConfig = -1; + #if wxLUA_USE_wxConfig && wxUSE_CONFIG + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileConfig_SetUmask[] = { &s_wxluaarg_Number, 0 }; + // void SetUmask(int mode) + static int LUACALL wxLua_wxFileConfig_SetUmask(lua_State *L) + { + wxLuaState wxlState(L); + // int mode + int mode = (int)wxlState.GetNumberType(2); + // get this + wxFileConfig * self = (wxFileConfig *)wxlState.GetUserDataType(1, s_wxluatag_wxFileConfig); + // call SetUmask + self->SetUmask(mode); + + return 0; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileConfig_constructor[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; // wxFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8) *************** *** 863,880 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileConfig_SetUmask[] = { &s_wxluaarg_Number, 0 }; ! // void SetUmask(int mode) ! static int LUACALL wxLua_wxFileConfi... [truncated message content] |