Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32516/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp config.cpp controls.cpp data.cpp datetime.cpp dialogs.cpp event.cpp file.cpp gdi.cpp grid.cpp help.cpp html.cpp image.cpp mdi.cpp menutool.cpp picker.cpp socket.cpp thread.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: Add %gc, %ungc, %gc_this, and %ungc_this for fine tuning of tracking or releasing the garbage collection of userdata objects that become owned or released by something other than wxLua. Added %delete to many more classes using the above tags to control when and if they should be deleted. Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** xml.cpp 17 Jun 2007 18:36:27 -0000 1.40 --- xml.cpp 25 Jun 2007 03:19:49 -0000 1.41 *************** *** 1295,1301 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Get[] = { &s_wxluatag_wxXmlResource, NULL }; static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Get[1] = {{ wxLua_wxXmlResource_Get, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxXmlResource_Get }}; // %override wxLua_wxXmlResource_Get // wxXmlResource* Get() --- 1295,1300 ---- #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) static int LUACALL wxLua_wxXmlResource_Get(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Get[1] = {{ wxLua_wxXmlResource_Get, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, s_wxluaargArray_None }}; // %override wxLua_wxXmlResource_Get // wxXmlResource* Get() *************** *** 1670,1693 **** #endif // (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_Set[] = { &s_wxluatag_wxXmlResource, &s_wxluatag_wxXmlResource, NULL }; - static int LUACALL wxLua_wxXmlResource_Set(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlResource_Set[1] = {{ wxLua_wxXmlResource_Set, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxXmlResource_Set }}; - // %override wxLua_wxXmlResource_Set - // wxXmlResource* Set(wxXmlResource *res) - static int LUACALL wxLua_wxXmlResource_Set(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlResource *returns; - // wxXmlResource *res - wxXmlResource *res = (wxXmlResource *)wxlState.GetUserDataType(2, s_wxluatag_wxXmlResource); - // call Set - returns = wxXmlResource::Set(res); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); - // return the number of parameters - return 1; - } - - static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlResource_SetFlags[] = { &s_wxluatag_wxXmlResource, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxXmlResource_SetFlags(lua_State *L); --- 1669,1672 ---- *************** *** 1897,1901 **** #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Get", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, { "GetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetVersion, 1, NULL }, --- 1876,1880 ---- #endif // (wxLUA_USE_wxFrame) && (wxLUA_USE_wxXMLResource && wxUSE_XML) ! { "Get", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxXmlResource_Get, 1, NULL }, { "GetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetFlags, 1, NULL }, { "GetVersion", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_GetVersion, 1, NULL }, *************** *** 1936,1940 **** #endif // (wxLUA_USE_wxToolbar) && (wxLUA_USE_wxXMLResource && wxUSE_XML) - { "Set", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Set, 1, NULL }, { "SetFlags", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_SetFlags, 1, NULL }, { "Unload", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxXmlResource_Unload, 1, NULL }, --- 1915,1918 ---- Index: dialogs.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/dialogs.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** dialogs.cpp 18 Jun 2007 21:40:42 -0000 1.51 --- dialogs.cpp 25 Jun 2007 03:19:42 -0000 1.52 *************** *** 99,103 **** static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_CreateSeparatedButtonSizer[1] = {{ wxLua_wxDialog_CreateSeparatedButtonSizer, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxDialog_CreateSeparatedButtonSizer }}; ! // %wxchkver_2_8&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L) { --- 99,103 ---- static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDialog_CreateSeparatedButtonSizer[1] = {{ wxLua_wxDialog_CreateSeparatedButtonSizer, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxDialog_CreateSeparatedButtonSizer }}; ! // %wxchkver_2_8&&wxUSE_BUTTON wxSizer *CreateSeparatedButtonSizer(long flags) static int LUACALL wxLua_wxDialog_CreateSeparatedButtonSizer(lua_State *L) { *************** *** 2355,2361 **** #if ((wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog) && (wxLUA_USE_wxArrayString)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxArrayString, &s_wxluaarg_LightUserData, &s_wxluaarg_Number, &s_wxluatag_wxPoint, NULL }; static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSingleChoiceDialog_constructor[1] = {{ wxLua_wxSingleChoiceDialog_constructor, WXLUAMETHOD_CONSTRUCTOR, 4, 7, s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor }}; // %override wxLua_wxSingleChoiceDialog_constructor // wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) --- 2355,2361 ---- #if ((wxUSE_CHOICEDLG && wxLUA_USE_wxSingleChoiceDialog) && (wxLUA_USE_wxArrayString)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxArrayString, &s_wxluaarg_Number, &s_wxluatag_wxPoint, NULL }; static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L); ! static wxLuaBindCFunc s_wxluafunc_wxLua_wxSingleChoiceDialog_constructor[1] = {{ wxLua_wxSingleChoiceDialog_constructor, WXLUAMETHOD_CONSTRUCTOR, 4, 6, s_wxluatagArray_wxLua_wxSingleChoiceDialog_constructor }}; // %override wxLua_wxSingleChoiceDialog_constructor // wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition) *************** *** 3043,3047 **** static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFindReplaceDialog_Create[1] = {{ wxLua_wxFindReplaceDialog_Create, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFindReplaceDialog_Create }}; ! // bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L) { --- 3043,3047 ---- static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFindReplaceDialog_Create[1] = {{ wxLua_wxFindReplaceDialog_Create, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFindReplaceDialog_Create }}; ! // bool Create(wxWindow *parent, wxFindReplaceData *findData, const wxString &title, int style = 0) static int LUACALL wxLua_wxFindReplaceDialog_Create(lua_State *L) { Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** wxlua.cpp 18 Jun 2007 21:40:52 -0000 1.46 --- wxlua.cpp 25 Jun 2007 03:19:49 -0000 1.47 *************** *** 356,360 **** static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_GetValue[1] = {{ wxLua_wxLuaTreeItemData_GetValue, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_GetValue }}; ! // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) { --- 356,360 ---- static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_GetValue[1] = {{ wxLua_wxLuaTreeItemData_GetValue, WXLUAMETHOD_METHOD, 1, 1, s_wxluatagArray_wxLua_wxLuaTreeItemData_GetValue }}; ! // double GetValue() const; static int LUACALL wxLua_wxLuaTreeItemData_GetValue(lua_State *L) { *************** *** 374,378 **** static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_SetValue[1] = {{ wxLua_wxLuaTreeItemData_SetValue, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }}; ! // void SetValue(double value); static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L) { --- 374,378 ---- static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaTreeItemData_SetValue[1] = {{ wxLua_wxLuaTreeItemData_SetValue, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaTreeItemData_SetValue }}; ! // void SetValue(double value); static int LUACALL wxLua_wxLuaTreeItemData_SetValue(lua_State *L) { Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** image.cpp 18 Jun 2007 21:40:46 -0000 1.49 --- image.cpp 25 Jun 2007 03:19:44 -0000 1.50 *************** *** 38,42 **** static int LUACALL wxLua_wxImage_AddHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_AddHandler[1] = {{ wxLua_wxImage_AddHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_AddHandler }}; ! // static void AddHandler(wxImageHandler* handler) static int LUACALL wxLua_wxImage_AddHandler(lua_State *L) { --- 38,42 ---- static int LUACALL wxLua_wxImage_AddHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_AddHandler[1] = {{ wxLua_wxImage_AddHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_AddHandler }}; ! // static void AddHandler(%ungc wxImageHandler* handler) static int LUACALL wxLua_wxImage_AddHandler(lua_State *L) { *************** *** 44,47 **** --- 44,48 ---- // wxImageHandler handler wxImageHandler * handler = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + if (wxlState.IsTrackedObject(handler)) wxlState.RemoveTrackedObject(handler, false); // call AddHandler wxImage::AddHandler(handler); *************** *** 867,871 **** static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_InsertHandler[1] = {{ wxLua_wxImage_InsertHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_InsertHandler }}; ! // static void InsertHandler(wxImageHandler* handler) static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L) { --- 868,872 ---- static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_InsertHandler[1] = {{ wxLua_wxImage_InsertHandler, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatagArray_wxLua_wxImage_InsertHandler }}; ! // static void InsertHandler(%ungc wxImageHandler* handler) static int LUACALL wxLua_wxImage_InsertHandler(lua_State *L) { *************** *** 873,876 **** --- 874,878 ---- // wxImageHandler handler wxImageHandler * handler = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); + if (wxlState.IsTrackedObject(handler)) wxlState.RemoveTrackedObject(handler, false); // call InsertHandler wxImage::InsertHandler(handler); *************** *** 1632,1636 **** static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_SetRGB1[1] = {{ wxLua_wxImage_SetRGB1, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxImage_SetRGB1 }}; ! // void SetRGB(wxRect & rect, unsigned char red, unsigned char green, unsigned char blue) static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L) { --- 1634,1638 ---- static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxImage_SetRGB1[1] = {{ wxLua_wxImage_SetRGB1, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxImage_SetRGB1 }}; ! // void SetRGB(wxRect& rect, unsigned char red, unsigned char green, unsigned char blue) static int LUACALL wxLua_wxImage_SetRGB1(lua_State *L) { *************** *** 2347,2350 **** --- 2349,2368 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogramEntry_delete[] = { &s_wxluatag_wxImageHistogramEntry, NULL }; + static int LUACALL wxLua_wxImageHistogramEntry_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogramEntry_delete[1] = {{ wxLua_wxImageHistogramEntry_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogramEntry_delete }}; + static int LUACALL wxLua_wxImageHistogramEntry_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogramEntry * self = (wxImageHistogramEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + // 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; + } + static int LUACALL wxLua_wxImageHistogramEntry_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogramEntry_constructor[1] = {{ wxLua_wxImageHistogramEntry_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 2357,2360 **** --- 2375,2380 ---- // call constructor returns = new wxImageHistogramEntry(); + // add to tracked memory list + wxlState.AddTrackedObject((long)returns, new wxLua_wxObject_wxImageHistogramEntry((wxImageHistogramEntry *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImageHistogramEntry, returns); *************** *** 2372,2375 **** --- 2392,2396 ---- { "SetIndex", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogramEntry_SetIndex, 1, NULL }, { "SetValue", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogramEntry_SetValue, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogramEntry_delete, 1, NULL }, { "index", WXLUAMETHOD_SETPROP, s_wxluafunc_wxLua_wxImageHistogramEntry_SetIndex, 1, NULL }, { "index", WXLUAMETHOD_GETPROP, s_wxluafunc_wxLua_wxImageHistogramEntry_GetIndex, 1, NULL }, *************** *** 2468,2471 **** --- 2489,2508 ---- + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_iterator_delete[] = { &s_wxluatag_wxImageHistogram_iterator, NULL }; + static int LUACALL wxLua_wxImageHistogram_iterator_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogram_iterator_delete[1] = {{ wxLua_wxImageHistogram_iterator_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_iterator_delete }}; + static int LUACALL wxLua_wxImageHistogram_iterator_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // 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; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_iterator_op_eq[] = { &s_wxluatag_wxImageHistogram_iterator, &s_wxluatag_wxImageHistogram_iterator, NULL }; static int LUACALL wxLua_wxImageHistogram_iterator_op_eq(lua_State *L); *************** *** 2516,2519 **** --- 2553,2557 ---- { "Set_first", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_first, 1, NULL }, { "Set_second", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_second, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogram_iterator_delete, 1, NULL }, { "first", WXLUAMETHOD_SETPROP, s_wxluafunc_wxLua_wxImageHistogram_iterator_Set_first, 1, NULL }, { "first", WXLUAMETHOD_GETPROP, s_wxluafunc_wxLua_wxImageHistogram_iterator_Get_first, 1, NULL }, *************** *** 2616,2619 **** --- 2654,2673 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_delete[] = { &s_wxluatag_wxImageHistogram, NULL }; + static int LUACALL wxLua_wxImageHistogram_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxImageHistogram_delete[1] = {{ wxLua_wxImageHistogram_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_delete }}; + static int LUACALL wxLua_wxImageHistogram_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // 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; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_empty[] = { &s_wxluatag_wxImageHistogram, NULL }; static int LUACALL wxLua_wxImageHistogram_empty(lua_State *L); *************** *** 2726,2729 **** --- 2780,2785 ---- // call constructor returns = new wxImageHistogram(); + // add to tracked memory list + wxlState.AddTrackedObject((long)returns, new wxLua_wxObject_wxImageHistogram((wxImageHistogram *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImageHistogram, returns); *************** *** 2741,2744 **** --- 2797,2801 ---- { "clear", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_clear, 1, NULL }, { "count", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_count, 1, NULL }, + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxImageHistogram_delete, 1, NULL }, { "empty", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_empty, 1, NULL }, { "end", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxImageHistogram_end, 1, NULL }, *************** *** 3091,3094 **** --- 3148,3167 ---- int s_wxluatag_wxBMPHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxBMPHandler_delete[] = { &s_wxluatag_wxBMPHandler, NULL }; + static int LUACALL wxLua_wxBMPHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxBMPHandler_delete[1] = {{ wxLua_wxBMPHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxBMPHandler_delete }}; + static int LUACALL wxLua_wxBMPHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxBMPHandler * self = (wxBMPHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxBMPHandler); + // 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; + } + static int LUACALL wxLua_wxBMPHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxBMPHandler_constructor[1] = {{ wxLua_wxBMPHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3101,3106 **** // call constructor returns = new wxBMPHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); --- 3174,3179 ---- // call constructor returns = new wxBMPHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); *************** *** 3114,3117 **** --- 3187,3191 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBMPHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxBMPHandler_delete, 1, NULL }, { "wxBMPHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxBMPHandler_constructor, 1, NULL }, *************** *** 3132,3135 **** --- 3206,3225 ---- int s_wxluatag_wxICOHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxICOHandler_delete[] = { &s_wxluatag_wxICOHandler, NULL }; + static int LUACALL wxLua_wxICOHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxICOHandler_delete[1] = {{ wxLua_wxICOHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxICOHandler_delete }}; + static int LUACALL wxLua_wxICOHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxICOHandler * self = (wxICOHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxICOHandler); + // 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; + } + static int LUACALL wxLua_wxICOHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxICOHandler_constructor[1] = {{ wxLua_wxICOHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3142,3147 **** // call constructor returns = new wxICOHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); --- 3232,3237 ---- // call constructor returns = new wxICOHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); *************** *** 3155,3158 **** --- 3245,3249 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxICOHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxICOHandler_delete, 1, NULL }, { "wxICOHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxICOHandler_constructor, 1, NULL }, *************** *** 3173,3176 **** --- 3264,3283 ---- int s_wxluatag_wxCURHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxCURHandler_delete[] = { &s_wxluatag_wxCURHandler, NULL }; + static int LUACALL wxLua_wxCURHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxCURHandler_delete[1] = {{ wxLua_wxCURHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxCURHandler_delete }}; + static int LUACALL wxLua_wxCURHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxCURHandler * self = (wxCURHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxCURHandler); + // 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; + } + static int LUACALL wxLua_wxCURHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxCURHandler_constructor[1] = {{ wxLua_wxCURHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3183,3188 **** // call constructor returns = new wxCURHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); --- 3290,3295 ---- // call constructor returns = new wxCURHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); *************** *** 3196,3199 **** --- 3303,3307 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxCURHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxCURHandler_delete, 1, NULL }, { "wxCURHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxCURHandler_constructor, 1, NULL }, *************** *** 3214,3217 **** --- 3322,3341 ---- int s_wxluatag_wxANIHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxANIHandler_delete[] = { &s_wxluatag_wxANIHandler, NULL }; + static int LUACALL wxLua_wxANIHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxANIHandler_delete[1] = {{ wxLua_wxANIHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxANIHandler_delete }}; + static int LUACALL wxLua_wxANIHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxANIHandler * self = (wxANIHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxANIHandler); + // 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; + } + static int LUACALL wxLua_wxANIHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxANIHandler_constructor[1] = {{ wxLua_wxANIHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3224,3229 **** // call constructor returns = new wxANIHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); --- 3348,3353 ---- // call constructor returns = new wxANIHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); *************** *** 3237,3240 **** --- 3361,3365 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxANIHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxANIHandler_delete, 1, NULL }, { "wxANIHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxANIHandler_constructor, 1, NULL }, *************** *** 3255,3258 **** --- 3380,3399 ---- int s_wxluatag_wxIFFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxIFFHandler_delete[] = { &s_wxluatag_wxIFFHandler, NULL }; + static int LUACALL wxLua_wxIFFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxIFFHandler_delete[1] = {{ wxLua_wxIFFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxIFFHandler_delete }}; + static int LUACALL wxLua_wxIFFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxIFFHandler * self = (wxIFFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxIFFHandler); + // 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; + } + static int LUACALL wxLua_wxIFFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxIFFHandler_constructor[1] = {{ wxLua_wxIFFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3265,3270 **** // call constructor returns = new wxIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); --- 3406,3411 ---- // call constructor returns = new wxIFFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); *************** *** 3278,3281 **** --- 3419,3423 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxIFFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxIFFHandler_delete, 1, NULL }, { "wxIFFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxIFFHandler_constructor, 1, NULL }, *************** *** 3296,3299 **** --- 3438,3457 ---- int s_wxluatag_wxGIFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxGIFHandler_delete[] = { &s_wxluatag_wxGIFHandler, NULL }; + static int LUACALL wxLua_wxGIFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxGIFHandler_delete[1] = {{ wxLua_wxGIFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxGIFHandler_delete }}; + static int LUACALL wxLua_wxGIFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxGIFHandler * self = (wxGIFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxGIFHandler); + // 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; + } + static int LUACALL wxLua_wxGIFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGIFHandler_constructor[1] = {{ wxLua_wxGIFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3306,3311 **** // call constructor returns = new wxGIFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); --- 3464,3469 ---- // call constructor returns = new wxGIFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); *************** *** 3319,3322 **** --- 3477,3481 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGIFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxGIFHandler_delete, 1, NULL }, { "wxGIFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxGIFHandler_constructor, 1, NULL }, *************** *** 3337,3340 **** --- 3496,3515 ---- int s_wxluatag_wxJPEGHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxJPEGHandler_delete[] = { &s_wxluatag_wxJPEGHandler, NULL }; + static int LUACALL wxLua_wxJPEGHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxJPEGHandler_delete[1] = {{ wxLua_wxJPEGHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxJPEGHandler_delete }}; + static int LUACALL wxLua_wxJPEGHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxJPEGHandler * self = (wxJPEGHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxJPEGHandler); + // 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; + } + static int LUACALL wxLua_wxJPEGHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxJPEGHandler_constructor[1] = {{ wxLua_wxJPEGHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3347,3352 **** // call constructor returns = new wxJPEGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); --- 3522,3527 ---- // call constructor returns = new wxJPEGHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); *************** *** 3360,3363 **** --- 3535,3539 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxJPEGHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxJPEGHandler_delete, 1, NULL }, { "wxJPEGHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxJPEGHandler_constructor, 1, NULL }, *************** *** 3378,3381 **** --- 3554,3573 ---- int s_wxluatag_wxPCXHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPCXHandler_delete[] = { &s_wxluatag_wxPCXHandler, NULL }; + static int LUACALL wxLua_wxPCXHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPCXHandler_delete[1] = {{ wxLua_wxPCXHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPCXHandler_delete }}; + static int LUACALL wxLua_wxPCXHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPCXHandler * self = (wxPCXHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPCXHandler); + // 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; + } + static int LUACALL wxLua_wxPCXHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPCXHandler_constructor[1] = {{ wxLua_wxPCXHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3388,3393 **** // call constructor returns = new wxPCXHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); --- 3580,3585 ---- // call constructor returns = new wxPCXHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); *************** *** 3401,3404 **** --- 3593,3597 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPCXHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPCXHandler_delete, 1, NULL }, { "wxPCXHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPCXHandler_constructor, 1, NULL }, *************** *** 3419,3422 **** --- 3612,3631 ---- int s_wxluatag_wxPNGHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPNGHandler_delete[] = { &s_wxluatag_wxPNGHandler, NULL }; + static int LUACALL wxLua_wxPNGHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNGHandler_delete[1] = {{ wxLua_wxPNGHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPNGHandler_delete }}; + static int LUACALL wxLua_wxPNGHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPNGHandler * self = (wxPNGHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPNGHandler); + // 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; + } + static int LUACALL wxLua_wxPNGHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNGHandler_constructor[1] = {{ wxLua_wxPNGHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3429,3434 **** // call constructor returns = new wxPNGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); --- 3638,3643 ---- // call constructor returns = new wxPNGHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); *************** *** 3442,3445 **** --- 3651,3655 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPNGHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPNGHandler_delete, 1, NULL }, { "wxPNGHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPNGHandler_constructor, 1, NULL }, *************** *** 3460,3463 **** --- 3670,3689 ---- int s_wxluatag_wxPNMHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxPNMHandler_delete[] = { &s_wxluatag_wxPNMHandler, NULL }; + static int LUACALL wxLua_wxPNMHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNMHandler_delete[1] = {{ wxLua_wxPNMHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxPNMHandler_delete }}; + static int LUACALL wxLua_wxPNMHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxPNMHandler * self = (wxPNMHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxPNMHandler); + // 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; + } + static int LUACALL wxLua_wxPNMHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxPNMHandler_constructor[1] = {{ wxLua_wxPNMHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3470,3475 **** // call constructor returns = new wxPNMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); --- 3696,3701 ---- // call constructor returns = new wxPNMHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); *************** *** 3483,3486 **** --- 3709,3713 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxPNMHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxPNMHandler_delete, 1, NULL }, { "wxPNMHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxPNMHandler_constructor, 1, NULL }, *************** *** 3501,3504 **** --- 3728,3747 ---- int s_wxluatag_wxTIFFHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxTIFFHandler_delete[] = { &s_wxluatag_wxTIFFHandler, NULL }; + static int LUACALL wxLua_wxTIFFHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTIFFHandler_delete[1] = {{ wxLua_wxTIFFHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTIFFHandler_delete }}; + static int LUACALL wxLua_wxTIFFHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxTIFFHandler * self = (wxTIFFHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxTIFFHandler); + // 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; + } + static int LUACALL wxLua_wxTIFFHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxTIFFHandler_constructor[1] = {{ wxLua_wxTIFFHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3511,3516 **** // call constructor returns = new wxTIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); --- 3754,3759 ---- // call constructor returns = new wxTIFFHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); *************** *** 3524,3527 **** --- 3767,3771 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTIFFHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTIFFHandler_delete, 1, NULL }, { "wxTIFFHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTIFFHandler_constructor, 1, NULL }, *************** *** 3542,3545 **** --- 3786,3805 ---- int s_wxluatag_wxTGAHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxTGAHandler_delete[] = { &s_wxluatag_wxTGAHandler, NULL }; + static int LUACALL wxLua_wxTGAHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxTGAHandler_delete[1] = {{ wxLua_wxTGAHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxTGAHandler_delete }}; + static int LUACALL wxLua_wxTGAHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxTGAHandler * self = (wxTGAHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxTGAHandler); + // 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; + } + static int LUACALL wxLua_wxTGAHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxTGAHandler_constructor[1] = {{ wxLua_wxTGAHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3552,3557 **** // call constructor returns = new wxTGAHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); --- 3812,3817 ---- // call constructor returns = new wxTGAHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); *************** *** 3565,3568 **** --- 3825,3829 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTGAHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxTGAHandler_delete, 1, NULL }, { "wxTGAHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxTGAHandler_constructor, 1, NULL }, *************** *** 3583,3586 **** --- 3844,3863 ---- int s_wxluatag_wxXPMHandler = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxXPMHandler_delete[] = { &s_wxluatag_wxXPMHandler, NULL }; + static int LUACALL wxLua_wxXPMHandler_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxXPMHandler_delete[1] = {{ wxLua_wxXPMHandler_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxXPMHandler_delete }}; + static int LUACALL wxLua_wxXPMHandler_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxXPMHandler * self = (wxXPMHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxXPMHandler); + // 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; + } + static int LUACALL wxLua_wxXPMHandler_constructor(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxXPMHandler_constructor[1] = {{ wxLua_wxXPMHandler_constructor, WXLUAMETHOD_CONSTRUCTOR, 0, 0, s_wxluaargArray_None }}; *************** *** 3593,3598 **** // call constructor returns = new wxXPMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); --- 3870,3875 ---- // call constructor returns = new wxXPMHandler(); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); *************** *** 3606,3609 **** --- 3883,3887 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxXPMHandler_methods[] = { + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxXPMHandler_delete, 1, NULL }, { "wxXPMHandler", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxXPMHandler_constructor, 1, NULL }, Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mdi.cpp 18 Jun 2007 02:56:31 -0000 1.41 --- mdi.cpp 25 Jun 2007 03:19:44 -0000 1.42 *************** *** 212,216 **** static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_SetWindowMenu[1] = {{ wxLua_wxMDIParentFrame_SetWindowMenu, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_SetWindowMenu }}; ! // %win void SetWindowMenu(wxMenu* menu) static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L) { --- 212,216 ---- static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_SetWindowMenu[1] = {{ wxLua_wxMDIParentFrame_SetWindowMenu, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_SetWindowMenu }}; ! // %win void SetWindowMenu(%ungc wxMenu* menu) static int LUACALL wxLua_wxMDIParentFrame_SetWindowMenu(lua_State *L) { *************** *** 218,221 **** --- 218,222 ---- // wxMenu menu wxMenu * menu = (wxMenu *)wxlState.GetUserDataType(2, s_wxluatag_wxMenu); + if (wxlState.IsTrackedObject(menu)) wxlState.RemoveTrackedObject(menu, false); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); *************** *** 2090,2094 **** static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateDocument[1] = {{ wxLua_wxDocTemplate_CreateDocument, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateDocument }}; ! // wxDocument * CreateDocument(const wxString& path, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L) { --- 2091,2095 ---- static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateDocument[1] = {{ wxLua_wxDocTemplate_CreateDocument, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateDocument }}; ! // wxDocument* CreateDocument(const wxString& path, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateDocument(lua_State *L) { *************** *** 2114,2118 **** static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateView[1] = {{ wxLua_wxDocTemplate_CreateView, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateView }}; ! // wxView * CreateView(wxDocument *doc, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L) { --- 2115,2119 ---- static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxDocTemplate_CreateView[1] = {{ wxLua_wxDocTemplate_CreateView, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxDocTemplate_CreateView }}; ! // wxView* CreateView(wxDocument *doc, long flags = 0) static int LUACALL wxLua_wxDocTemplate_CreateView(lua_State *L) { *************** *** 4340,4343 **** --- 4341,4360 ---- #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileHistory_delete[] = { &s_wxluatag_wxFileHistory, NULL }; + static int LUACALL wxLua_wxFileHistory_delete(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileHistory_delete[1] = {{ wxLua_wxFileHistory_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatagArray_wxLua_wxFileHistory_delete }}; + static int LUACALL wxLua_wxFileHistory_delete(lua_State *L) + { + wxLuaState wxlState(L); + wxFileHistory * self = (wxFileHistory *)wxlState.GetUserDataType(1, s_wxluatag_wxFileHistory); + // 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; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxFileHistory_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxFileHistory_constructor(lua_State *L); *************** *** 4357,4362 **** // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); --- 4374,4379 ---- // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); *************** *** 4421,4424 **** --- 4438,4442 ---- #endif // (wxLUA_USE_wxFileHistory && wxUSE_DOC_VIEW_ARCHITECTURE) && (wxLUA_USE_wxMenu && wxUSE_MENUS) + { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxFileHistory_delete, 1, NULL }, { "wxFileHistory", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxFileHistory_constructor, 1, NULL }, Index: picker.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/picker.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** picker.cpp 19 Jun 2007 22:26:47 -0000 1.4 --- picker.cpp 25 Jun 2007 03:19:48 -0000 1.5 *************** *** 343,346 **** --- 343,385 ---- int s_wxluatag_wxColourPickerCtrl = -1; + #if (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxColourPickerCtrl_Create[] = { &s_wxluatag_wxColourPickerCtrl, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxColour, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxColourPickerCtrl_Create(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxColourPickerCtrl_Create[1] = {{ wxLua_wxColourPickerCtrl_Create, WXLUAMETHOD_METHOD, 4, 9, s_wxluatagArray_wxLua_wxColourPickerCtrl_Create }}; + // bool Create(wxWindow *parent, wxWindowID id, const wxColour& col, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxColourPickerCtrl") + static int LUACALL wxLua_wxColourPickerCtrl_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxColourPickerCtrl" + const wxString name = (argCount >= 9 ? wxlState.GetwxStringType(9) : wxString(wxT("wxColourPickerCtrl"))); + // const wxValidator validator = wxDefaultValidator + const wxValidator * validator = (argCount >= 8 ? (const wxValidator *)wxlState.GetUserDataType(8, s_wxluatag_wxValidator) : &wxDefaultValidator); + // long style = wxCLRP_DEFAULT_STYLE + long style = (argCount >= 7 ? (long)wxlua_getnumbertype(L, 7) : wxCLRP_DEFAULT_STYLE); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 6 ? (const wxSize *)wxlState.GetUserDataType(6, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxlState.GetUserDataType(5, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxColour col + const wxColour * col = (const wxColour *)wxlState.GetUserDataType(4, s_wxluatag_wxColour); + // wxWindowID id + wxWindowID id = (wxWindowID)wxlua_getnumbertype(L, 3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxColourPickerCtrl * self = (wxColourPickerCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxColourPickerCtrl); + // call Create + returns = (self->Create(parent, id, *col, *pos, *size, style, *validator, name)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL)) && (wxLUA_USE_wxColourPenBrush) static wxLuaArgTag s_wxluatagArray_wxLua_wxColourPickerCtrl_GetColour[] = { &s_wxluatag_wxColourPickerCtrl, NULL }; *************** *** 517,520 **** --- 556,563 ---- // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxColourPickerCtrl_methods[] = { + #if (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxColourPickerCtrl_Create, 1, NULL }, + #endif // (((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL))) && (wxLUA_USE_wxPointSizeRect) + #if ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxColourPickerCtrl && wxUSE_COLOURPICKERCTRL)) && (wxLUA_USE_wxColourPenBrush) { "GetColour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxColourPickerCtrl_GetColour, 1, NULL }, *************** *** 704,707 **** --- 747,789 ---- int s_wxluatag_wxDatePickerCtrl = -1; + #if (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_Create[] = { &s_wxluatag_wxDatePickerCtrl, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxDateTime, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxDatePickerCtrl_Create(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDatePickerCtrl_Create[1] = {{ wxLua_wxDatePickerCtrl_Create, WXLUAMETHOD_METHOD, 3, 9, s_wxluatagArray_wxLua_wxDatePickerCtrl_Create }}; + // bool Create(wxWindow *parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_DEFAULT | wxDP_SHOWCENTURY, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxDatePickerCtrl") + static int LUACALL wxLua_wxDatePickerCtrl_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxDatePickerCtrl" + const wxString name = (argCount >= 9 ? wxlState.GetwxStringType(9) : wxString(wxT("wxDatePickerCtrl"))); + // const wxValidator validator = wxDefaultValidator + const wxValidator * validator = (argCount >= 8 ? (const wxValidator *)wxlState.GetUserDataType(8, s_wxluatag_wxValidator) : &wxDefaultValidator); + // long style = wxDP_DEFAULT | wxDP_SHOWCENTURY + long style = (argCount >= 7 ? (long)wxlua_getnumbertype(L, 7) : wxDP_DEFAULT | wxDP_SHOWCENTURY); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 6 ? (const wxSize *)wxlState.GetUserDataType(6, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 5 ? (const wxPoint *)wxlState.GetUserDataType(5, s_wxluatag_wxPoint) : &wxDefaultPosition); + // const wxDateTime dt = wxDefaultDateTime + const wxDateTime * dt = (argCount >= 4 ? (const wxDateTime *)wxlState.GetUserDataType(4, s_wxluatag_wxDateTime) : &wxDefaultDateTime); + // wxWindowID id + wxWindowID id = (wxWindowID)wxlua_getnumbertype(L, 3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxDatePickerCtrl * self = (wxDatePickerCtrl *)wxlState.GetUserDataType(1, s_wxluatag_wxDatePickerCtrl); + // call Create + returns = (self->Create(parent, id, *dt, *pos, *size, style, *validator, name)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_GetRange[] = { &s_wxluatag_wxDatePickerCtrl, NULL }; static int LUACALL wxLua_wxDatePickerCtrl_GetRange(lua_State *L); *************** *** 791,799 **** #if (((wxLUA_USE_wxValidator && wxUSE_VALIDATORS) && ((wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && (wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL))) && (wxLUA_USE_wxDateTime && wxUSE_DATETIME)) && (wxLUA_USE_wxPointSizeRect) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxDatePickerCtrl_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxDateTime, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluatag_wxValidator, &s_wxluaarg_String, NULL }; ! static int LUACALL wxLua_wxDatePi... [truncated message content] |