From: John L. <jr...@us...> - 2007-06-14 01:23:45
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14159/wxLua/bindings/wxwidgets Modified Files: appframe.i config.i data.i datetime.i defsutil.i dialogs.i event.i gdi.i help.i html.i menutool.i override.hpp print.i socket.i windows.i wx_datatypes.lua wx_rules.lua wxlua.i xml.i Log Message: Changed the Delete() function from the %delete tag for classes to just delete() to avoid any future name clashes since delete() is never allowed to be a function name in C++. Moved the wxStyledTextCtrl class and it's 1268 defines into the wxstc table. Moved wxLuaObject, wxLuaDebugger (and friends) into the wxlua table and added more functions for inspecting userdata and the bindings. Fix mismatches between the bindings base classes and what they really are. Index: config.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/config.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** config.i 1 Jun 2007 18:19:46 -0000 1.21 --- config.i 14 Jun 2007 01:23:08 -0000 1.22 *************** *** 38,42 **** // No constructor since this is a base class ! // %override wxConfigBase::Delete() - this is a wxLua provided function to // delete the config (or derived class). Created wxConfigs are NOT tracked // in memory since you MUST call wxConfigBase::Set(NULL) before --- 38,42 ---- // No constructor since this is a base class ! // %override wxConfigBase::delete() - this is a wxLua provided function to // delete the config (or derived class). Created wxConfigs are NOT tracked // in memory since you MUST call wxConfigBase::Set(NULL) before *************** *** 44,48 **** // wxConfigBase::Set may need to exist outside of the scope it was created // in and we don't want lua to garbage collect it. ! void Delete() static wxConfigBase* Create() --- 44,48 ---- // wxConfigBase::Set may need to exist outside of the scope it was created // in and we don't want lua to garbage collect it. ! void delete() static wxConfigBase* Create() *************** *** 152,156 **** %class %noclassinfo %encapsulate %delete wxConfigPathChanger ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) --- 152,156 ---- %class %noclassinfo %encapsulate %delete wxConfigPathChanger ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** wx_datatypes.lua 13 Jun 2007 04:15:22 -0000 1.66 --- wx_datatypes.lua 14 Jun 2007 01:23:09 -0000 1.67 *************** *** 295,299 **** }, wxBestHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 295,299 ---- }, wxBestHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 997,1001 **** }, wxExtHelpController = { ! BaseClass = "wxHelpController", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 997,1001 ---- }, wxExtHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(!defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1165,1168 **** --- 1165,1169 ---- }, wxFontData = { + BaseClass = "wxObject", Condition = "wxUSE_FONTDLG && wxLUA_USE_wxFontDialog", DefType = "class", *************** *** 1531,1535 **** }, wxHelpController = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", --- 1532,1536 ---- }, wxHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", *************** *** 1537,1540 **** --- 1538,1548 ---- Name = "wxHelpController", }, + wxHelpControllerBase = { + BaseClass = "wxObject", + Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", + DefType = "class", + IsNumber = false, + Name = "wxHelpControllerBase", + }, wxHelpControllerHelpProvider = { BaseClass = "wxSimpleHelpProvider", *************** *** 1577,1580 **** --- 1585,1589 ---- }, wxHtmlCell = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1604,1608 **** }, wxHtmlHelpController = { ! BaseClass = "wxHelpController", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 1613,1617 ---- }, wxHtmlHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(wxLUA_USE_wxHtmlHelpController && wxUSE_WXHTML_HELP) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 1624,1627 **** --- 1633,1637 ---- }, wxHtmlParser = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 1637,1640 **** --- 1647,1651 ---- }, wxHtmlTag = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxHTML && wxUSE_HTML", DefType = "class", *************** *** 2076,2095 **** Name = "wxLuaHtmlWindow", }, - wxLuaMethod_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaMethod_Type", - }, wxLuaObject = { - BaseClass = "wxObject", DefType = "class", IsNumber = false, Name = "wxLuaObject", }, - wxLuaObject_Type = { - DefType = "enum", - IsNumber = true, - Name = "wxLuaObject_Type", - }, wxLuaPrintout = { BaseClass = "wxPrintout", --- 2087,2095 ---- *************** *** 2099,2108 **** Name = "wxLuaPrintout", }, - wxLuaState = { - BaseClass = "wxObject", - DefType = "class", - IsNumber = false, - Name = "wxLuaState", - }, wxLuaTreeItemData = { BaseClass = "wxTreeItemData", --- 2099,2102 ---- *************** *** 2199,2203 **** }, wxMenuBar = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", --- 2193,2197 ---- }, wxMenuBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxMenu && wxUSE_MENUS", DefType = "class", *************** *** 2523,2527 **** }, wxPreviewCanvas = { ! BaseClass = "wxScrolledWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2517,2521 ---- }, wxPreviewCanvas = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 2530,2534 **** }, wxPreviewControlBar = { ! BaseClass = "wxPanel", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", --- 2524,2528 ---- }, wxPreviewControlBar = { ! BaseClass = "wxWindow", Condition = "wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE", DefType = "class", *************** *** 3005,3009 **** }, wxSplitterEvent = { ! BaseClass = "wxCommandEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", --- 2999,3003 ---- }, wxSplitterEvent = { ! BaseClass = "wxNotifyEvent", Condition = "wxLUA_USE_wxSplitterWindow", DefType = "class", *************** *** 3274,3278 **** }, wxTimer = { ! BaseClass = "wxObject", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", --- 3268,3272 ---- }, wxTimer = { ! BaseClass = "wxEvtHandler", Condition = "wxLUA_USE_wxTimer && wxUSE_TIMER", DefType = "class", *************** *** 3323,3326 **** --- 3317,3321 ---- }, wxToolBarToolBase = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxToolbar", DefType = "class", *************** *** 3517,3521 **** }, wxWinHelpController = { ! BaseClass = "wxHelpController", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", --- 3512,3516 ---- }, wxWinHelpController = { ! BaseClass = "wxHelpControllerBase", Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP)", DefType = "class", *************** *** 3530,3534 **** }, wxWindowCreateEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3525,3529 ---- }, wxWindowCreateEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3543,3547 **** }, wxWindowDestroyEvent = { ! BaseClass = "wxCommandEvent", DefType = "class", IsNumber = false, --- 3538,3542 ---- }, wxWindowDestroyEvent = { ! BaseClass = "wxEvent", DefType = "class", IsNumber = false, *************** *** 3612,3615 **** --- 3607,3611 ---- }, wxXmlDocument = { + BaseClass = "wxObject", Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** html.i 13 Jun 2007 04:15:22 -0000 1.21 --- html.i 14 Jun 2007 01:23:08 -0000 1.22 *************** *** 19,23 **** %define wxHTML_COND_USER ! %class wxHtmlCell wxHtmlCell() --- 19,23 ---- %define wxHTML_COND_USER ! %class wxHtmlCell, wxObject wxHtmlCell() *************** *** 84,88 **** %include "wx/html/htmltag.h" ! %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) --- 84,88 ---- %include "wx/html/htmltag.h" ! %class wxHtmlTag, wxObject //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) *************** *** 129,133 **** %define wxHTML_ALIGN_TOP ! %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) --- 129,133 ---- %define wxHTML_ALIGN_TOP ! %class wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) *************** *** 204,208 **** //%endenum ! %class wxHtmlParser //wxHtmlParser() --- 204,208 ---- //%endenum ! %class wxHtmlParser, wxObject //wxHtmlParser() Index: print.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/print.i,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** print.i 1 Jun 2007 18:19:46 -0000 1.17 --- print.i 14 Jun 2007 01:23:09 -0000 1.18 *************** *** 431,435 **** // wxPreviewCanvas ! %class %noclassinfo wxPreviewCanvas, wxScrolledWindow wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewCanvas") --- 431,435 ---- // wxPreviewCanvas ! %class wxPreviewCanvas, wxWindow wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewCanvas") *************** *** 456,460 **** %define wxID_PREVIEW_GOTO ! %class wxPreviewControlBar, wxPanel wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewControlBar") --- 456,460 ---- %define wxID_PREVIEW_GOTO ! %class wxPreviewControlBar, wxWindow wxPreviewControlBar(wxPrintPreview* preview, long buttons, wxWindow* parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxPreviewControlBar") *************** *** 469,473 **** %if wxLUA_USE_wxLuaPrintout ! %class %noclassinfo wxPrintPreview, wxObject wxPrintPreview(wxLuaPrintout* printout, wxLuaPrintout* printoutForPrinting, wxPrintData* data=NULL) --- 469,473 ---- %if wxLUA_USE_wxLuaPrintout ! %class wxPrintPreview, wxObject wxPrintPreview(wxLuaPrintout* printout, wxLuaPrintout* printoutForPrinting, wxPrintData* data=NULL) Index: help.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/help.i,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** help.i 13 Jun 2007 04:15:22 -0000 1.16 --- help.i 14 Jun 2007 01:23:08 -0000 1.17 *************** *** 83,87 **** //----------------------------------------------------------------------------- ! // wxHelpController and derived help controller classes %if wxLUA_USE_wxHelpController & wxUSE_HELP --- 83,87 ---- //----------------------------------------------------------------------------- ! // wxHelpControllerBase and derived help controller classes %if wxLUA_USE_wxHelpController & wxUSE_HELP *************** *** 96,103 **** %endenum ! // Note this is actually wxHelpControllerBase, wxWidgets #defines it appropriately ! %class %delete wxHelpController, wxObject ! wxHelpController() ! //%wxchkver_2_8 wxHelpController(wxWindow* parentWindow = NULL) wxHTMLHelpController takes different params virtual void Initialize(const wxString& file) --- 96,101 ---- %endenum ! %class %delete wxHelpControllerBase, wxObject ! //wxHelpControllerBase() - base class no constructor virtual void Initialize(const wxString& file) *************** *** 110,114 **** virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos) ! // %override [wxFrame*, wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL] wxHelpController::GetFrameParameters() // C++ Func: virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) virtual wxFrame* GetFrameParameters() --- 108,112 ---- virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos) ! // %override [wxFrame*, wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL] wxHelpControllerBase::GetFrameParameters() // C++ Func: virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) virtual wxFrame* GetFrameParameters() *************** *** 125,132 **** //----------------------------------------------------------------------------- // wxWinHelpController %if %msw ! %class %delete wxWinHelpController, wxHelpController %include "wx/helpwin.h" wxWinHelpController() --- 123,139 ---- //----------------------------------------------------------------------------- + // wxHelpController - wxWidgets #defines it appropriately per platform + + %class %delete wxHelpController, wxHelpControllerBase + wxHelpController() + //%wxchkver_2_8 wxHelpController(wxWindow* parentWindow = NULL) wxHTMLHelpController takes different params + + %endclass + + //----------------------------------------------------------------------------- // wxWinHelpController %if %msw ! %class %delete wxWinHelpController, wxHelpControllerBase %include "wx/helpwin.h" wxWinHelpController() *************** *** 137,141 **** // wxCHMHelpController ! //%class %delete wxCHMHelpController, wxHelpController //%include "wx/msw/helpchm.h" //wxCHMHelpController() --- 144,148 ---- // wxCHMHelpController ! //%class %delete wxCHMHelpController, wxHelpControllerBase //%include "wx/msw/helpchm.h" //wxCHMHelpController() *************** *** 146,150 **** %if %msw ! %class %noclassinfo wxBestHelpController, wxHelpController %endclass %endif //%msw --- 153,162 ---- %if %msw ! ! %include "wx/msw/helpbest.h" ! ! %class wxBestHelpController, wxHelpControllerBase ! wxBestHelpController(wxWindow* parentWindow = NULL, int style = wxHF_DEFAULT_STYLE) ! %endclass %endif //%msw *************** *** 154,158 **** %if !%win ! %class %delete wxExtHelpController, wxHelpController %include "wx/generic/helpext.h" wxExtHelpController() --- 166,170 ---- %if !%win ! %class %delete wxExtHelpController, wxHelpControllerBase %include "wx/generic/helpext.h" wxExtHelpController() *************** *** 239,243 **** %define wxHF_DEFAULT_STYLE ! %class %delete wxHtmlHelpController, wxHelpController wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE) --- 251,255 ---- %define wxHF_DEFAULT_STYLE ! %class %delete wxHtmlHelpController, wxHelpControllerBase wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE) *************** *** 247,251 **** void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpController void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) --- 259,263 ---- void Display(const wxString& x) void Display(const int id) ! //void DisplayContents() - see wxHelpControllerBase void DisplayIndex() bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL) Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** windows.i 13 Jun 2007 04:15:22 -0000 1.39 --- windows.i 14 Jun 2007 01:23:09 -0000 1.40 *************** *** 17,21 **** %class %noclassinfo %encapsulate %delete wxWindowDisabler ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxWindowDisabler(wxWindow *winToSkip = NULL) %endclass --- 17,21 ---- %class %noclassinfo %encapsulate %delete wxWindowDisabler ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxWindowDisabler(wxWindow *winToSkip = NULL) %endclass *************** *** 892,896 **** // wxSplitterEvent ! %class %delete wxSplitterEvent, wxCommandEvent %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING // EVT_SPLITTER_SASH_POS_CHANGING(id, fn) %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED // EVT_SPLITTER_SASH_POS_CHANGED(id, fn) --- 892,896 ---- // wxSplitterEvent ! %class %delete wxSplitterEvent, wxNotifyEvent %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING // EVT_SPLITTER_SASH_POS_CHANGING(id, fn) %define_event wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED // EVT_SPLITTER_SASH_POS_CHANGED(id, fn) Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** gdi.i 13 Jun 2007 04:15:22 -0000 1.51 --- gdi.i 14 Jun 2007 01:23:08 -0000 1.52 *************** *** 1370,1374 **** %include "wx/dcclient.h" ! %class %delete wxPaintDC, wxWindowDC wxPaintDC(wxWindow* window) %endclass --- 1370,1374 ---- %include "wx/dcclient.h" ! %class %delete wxPaintDC, wxWindowDC // base ok as wxWindowDC since only some platforms have wxClientDC as base wxPaintDC(wxWindow* window) %endclass *************** *** 1420,1424 **** %define wxALWAYS_NATIVE_DOUBLE_BUFFER ! %class %delete wxAutoBufferedPaintDC, wxDC // ok to derive from wxDC only wxAutoBufferedPaintDC(wxWindow *window) %endclass --- 1420,1427 ---- %define wxALWAYS_NATIVE_DOUBLE_BUFFER ! // This class is derived from a wxPaintDC if wxALWAYS_NATIVE_DOUBLE_BUFFER else wxBufferedPaintDC ! // In fact in release mode it's only a #define to either ! ! %class %delete wxAutoBufferedPaintDC, wxDC // base ok as wxDC since no need for others wxAutoBufferedPaintDC(wxWindow *window) %endclass *************** *** 1493,1497 **** %class %noclassinfo %encapsulate %delete wxCaretSuspend ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) %endclass --- 1496,1500 ---- %class %noclassinfo %encapsulate %delete wxCaretSuspend ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) %endclass Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** override.hpp 12 Jun 2007 00:08:36 -0000 1.74 --- override.hpp 14 Jun 2007 01:23:08 -0000 1.75 *************** *** 322,328 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxConfigBase_Delete ! // void Destroy() ! static int LUACALL wxLua_wxConfigBase_Delete(lua_State *L) { wxLuaState wxlState(L); --- 322,328 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxConfigBase_delete ! // void delete() ! static int LUACALL wxLua_wxConfigBase_delete(lua_State *L) { wxLuaState wxlState(L); *************** *** 2750,2756 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxHelpController_GetFrameParameters // virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) ! static int LUACALL wxLua_wxHelpController_GetFrameParameters(lua_State *L) { wxLuaState wxlState(L); --- 2750,2756 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxHelpControllerBase_GetFrameParameters // virtual wxFrame* GetFrameParameters(wxSize* size = NULL, wxPoint* pos = NULL, bool *newFrameEachTime = NULL) ! static int LUACALL wxLua_wxHelpControllerBase_GetFrameParameters(lua_State *L) { wxLuaState wxlState(L); *************** *** 2761,2765 **** wxSize *size = new wxSize(); // get this ! wxHelpController *self = (wxHelpController *)wxlState.GetUserDataType(1, s_wxluatag_wxHelpController); // call GetFrameParameters returns = self->GetFrameParameters(size, pos, &newFrameEachTime); --- 2761,2765 ---- wxSize *size = new wxSize(); // get this ! wxHelpControllerBase *self = (wxHelpControllerBase *)wxlState.GetUserDataType(1, s_wxluatag_wxHelpControllerBase); // call GetFrameParameters returns = self->GetFrameParameters(size, pos, &newFrameEachTime); *************** *** 4345,4455 **** // ---------------------------------------------------------------------------- - %override wxLua_function_CompileLuaScript - // %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) - static int LUACALL wxLua_function_CompileLuaScript(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // const wxString fileName - const wxString fileName = wxlState.GetwxStringType(2); - // const wxString luaScript - const wxString luaScript = wxlState.GetwxStringType(1); - wxString errMsg; - int line_num = -1; - wxLuaState wxlState2(true); // create a brand new empty lua state to compile in - returns = wxlState2.CompileString(luaScript, fileName, &errMsg, &line_num); - // push the result number - lua_pushnumber(L, returns); - wxlState.lua_PushString(errMsg); - lua_pushnumber(L, line_num); - return 3; - } - %end - - %override wxLua_function_wxlua_typename - // %function wxString wxlua_getwxluatypename(int wxluaarg_tag) - static int LUACALL wxLua_function_wxlua_typename(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // int wxluaarg_tag - int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); - // call wxlua_getwxluatypename - returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); - // push the result string - wxlState.lua_PushString(returns); - - return 1; - } - %end - - %override wxLua_function_wxlua_type - // %function int wxlua_wxluatype(int wxluaarg_tag) - static int LUACALL wxLua_function_wxlua_type(lua_State *L) - { - wxLuaState wxlState(L); - wxString returns; - // int wxluaarg_tag - int wxluaarg_tag = wxlua_ttag(L, 1); - if (wxluaarg_tag == TLUA_NOTAG) - { - int ltype = lua_type(L, 1); - wxluaarg_tag = wxlua_getwxluatype(ltype); - } - - // push the result number - lua_pushnumber(L, wxluaarg_tag); - - return 1; - } - %end - - %override wxLua_wxLuaObject_constructor - // wxLuaObject(void *object) - static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) - { - wxluabind_removetableforcall(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; - } - %end - - %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; - } - %end - - %override wxLua_wxLuaObject_GetObject - // void *GetObject() const - static int LUACALL wxLua_wxLuaObject_GetObject(lua_State *L) - { - wxLuaState wxlState(L); - // get this - wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call GetObject that push the item onto the stack, or nil - if (self->GetObject()) - return 1; - - return 0; - } - %end - %override wxLua_wxLuaPrintout_constructor // wxLuaPrintout(const wxString& title = "Printout", wxLuaObject *pObject = NULL) --- 4345,4348 ---- Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** datetime.i 11 Jun 2007 03:57:58 -0000 1.28 --- datetime.i 14 Jun 2007 01:23:08 -0000 1.29 *************** *** 347,351 **** %define wxTIMER_ONE_SHOT ! %class wxTimer, wxObject wxTimer(wxEvtHandler *owner, int id = -1) --- 347,351 ---- %define wxTIMER_ONE_SHOT ! %class wxTimer, wxEvtHandler wxTimer(wxEvtHandler *owner, int id = -1) Index: socket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/socket.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** socket.i 13 Jun 2007 04:15:22 -0000 1.15 --- socket.i 14 Jun 2007 01:23:09 -0000 1.16 *************** *** 216,220 **** %endenum ! %class %noclassinfo wxProtocol, wxSocketClient //wxProtocol() virtual base class --- 216,220 ---- %endenum ! %class wxProtocol, wxSocketClient //wxProtocol() virtual base class *************** *** 237,241 **** %include "wx/protocol/http.h" ! %class %delete %noclassinfo wxHTTP, wxProtocol wxHTTP() --- 237,241 ---- %include "wx/protocol/http.h" ! %class %delete wxHTTP, wxProtocol wxHTTP() *************** *** 261,265 **** %endenum ! %class %delete %noclassinfo wxFTP, wxProtocol wxFTP() --- 261,265 ---- %endenum ! %class %delete wxFTP, wxProtocol wxFTP() Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxlua.i,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** wxlua.i 13 Jun 2007 00:08:57 -0000 1.25 --- wxlua.i 14 Jun 2007 01:23:09 -0000 1.26 *************** *** 1,4 **** // ============================================================================ ! // Purpose: wxLua specific wrappers // Author: J Winwood, John Labenski // Created: 14/11/2001 --- 1,4 ---- // ============================================================================ ! // Purpose: wxLua specific wrappers to enhance the wxWidgets bindings // Author: J Winwood, John Labenski // Created: 14/11/2001 *************** *** 8,210 **** // ============================================================================ ! // Compile the luaScript of the given name and return the lua error code, a message ! // and the line number (or -1) of the error. ! // %override [int return, lua_string err_msg, int line_number] CompileLuaScript(const wxString& luaScript, const wxString& fileName) ! %function int CompileLuaScript(const wxString& luaScript, const wxString& fileName) ! ! ! %enum wxLuaMethod_Type // The type of a Lua method ! WXLUAMETHOD_CONSTRUCTOR // constructor ! WXLUAMETHOD_METHOD // class member function ! WXLUAMETHOD_CFUNCTION // global C function (not part of a class) ! WXLUAMETHOD_GETPROP // Get %property funcName, read ! WXLUAMETHOD_SETPROP // Set %property funcName, write ! ! WXLUAMETHOD_STATIC // Class member function is static ! WXLUAMETHOD_OVERLOAD // This is an overload function that will call others ! // and the min/maxargs for it are not valid, ! // but are the min and max of all functions ! ! WXLUAMETHOD_DELETE // This is the delete function that wxLua has generated ! // to delete this class and is not part of the ! // original class. ! ! WXLUAMETHOD_OVERLOAD_BASE // Class method has been checked to see if it is ! // overloaded from the base class. ! // Check WXLUAMETHOD::basemethod and if !NULL ! // this method is an overload from the base class ! %endenum ! ! %define WXLUAARG_None ! %define WXLUAARG_Nil ! %define WXLUAARG_Boolean ! %define WXLUAARG_LightUserData ! %define WXLUAARG_Number ! %define WXLUAARG_String ! %define WXLUAARG_LuaTable ! %define WXLUAARG_LuaFunction ! %define WXLUAARG_UserData ! %define WXLUAARG_LuaThread ! %define WXLUAARG_Integer ! ! // Is this lua_type() (or in lua type()) considered ! %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! ! // %override wxString wxlua_typename(int wxluaarg_tag) ! // C++ Func: wxString wxlua_getwxluatypename(int wxluaarg_tag) ! // Returns the tag name for both the predefined (negative) as well as the ! // binding class tags. (C function only does predefined tags) ! %function wxString wxlua_typename(int wxluaarg_tag) ! ! ! // %override int wxlua_type(void* object) ! // Get the wxlua type (tag) of the object, this is the arg tags number ! %function int wxlua_type(void* object) ! ! //----------------------------------------------------------------------------- ! // wxLuaBinding - This is NOT wrapped, but implemented in wxlbind.cpp ! ! // These items follow the structure below and ALL items are called as if they ! // were table members. ! // Example : wxLuaBinding_wx.GetClassCount ! // Example : print(wxLuaBinding_wx.GetClassArray[1].methods[1].name) ! // Note: Use only '.' and NO () to make it a function call, also check to see ! // if the item exists first (unlike the example above)! ! ! /* ! ! %class wxLuaBinding_XXX - where XXX is the name of the binding ! // No constructor as this is read only ! ! wxString GetBindingName ! wxString GetLuaNamespace ! ! int GetClassCount ! int GetDefineCount ! int GetStringCount ! int GetEventCount ! int GetObjectCount ! int GetFunctionCount ! ! {wxLuaBindClass*} GetClassArray ! {wxLuaBindMethod*} GetFunctionArray ! {name, value} GetDefineArray ! {name, value} GetStringArray ! {name, eventType, class_tag} GetEventArray ! {name, object, class_tag} GetObjectArray ! ! %endclass ! ! %class wxLuaBindClass ! // No constructor as this is read only ! ! wxString name ! {wxLuaBindMethod*} methods ! int methods_n ! wxClassInfo* classInfo ! int class_tag ! wxString baseclassName ! wxLuaBindClass* baseclass ! {name, value} enums ! int enums_n ! ! %endclass ! ! %class wxLuaBindMethod ! // No constructor as this is read only ! ! wxString name ! int type ! {wxLuaBindCFunc*} funcs ! int funcs_n ! wxLuaBindMethod* basemethod ! ! wxLuaBindClass* class // class this is part of (not in struct) ! wxString class_name // class name this is part of (not in struct) ! ! %endclass ! ! %class wxLuaBindCFunc ! // No constructor as this is read only ! ! cfunction func ! int type ! int minargs ! int maxargs ! {int} argtags ! ! wxString class_name // added, not in struct ! ! %endclass ! ! */ ! ! ! //----------------------------------------------------------------------------- ! // wxLuaState ! ! %include "wxlua/include/wxlstate.h" ! ! %class %delete wxLuaState, wxObject ! /* ! wxLuaState(bool create = false) ! wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) ! ! bool Ok() const ! void Destroy() ! bool CloseLuaState(bool force) ! bool IsClosing() const ! wxEventType GetInEventType() const ! void SetEventHandler(wxEvtHandler *evtHandler) ! wxEvtHandler *GetEventHandler() const ! void SetId(wxWindowID id) ! wxWindowID GetId() const ! void SendEvent( wxLuaEvent &event ) const ! ! int RunFile(const wxString &fileName) ! int RunString(const wxString &script, const wxString& name = "") ! bool IsRunning() const ! ! wxString GetLuaTagName(int tag) const ! */ ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLuaObject - Allows Lua data items to be used for client data. ! ! %enum wxLuaObject_Type ! wxLUAOBJECT_NONE ! wxLUAOBJECT_BOOL ! wxLUAOBJECT_INT ! wxLUAOBJECT_STRING ! wxLUAOBJECT_ARRAYINT ! %endenum ! ! %class %delete wxLuaObject, wxObject ! // %override wxLuaObject(any value type) ! // C++ Func: wxLuaObject(const wxLuaState& wxlState, int stack_idx = 1) ! // Wrap the single value passed in with a wxLuaObject ! wxLuaObject() ! ! // %override void wxLuaObject::SetObject(any value type) ! // C++ Func: void SetObject(int stack_idx = 1) ! // Discard the old reference and create a new one for the item passed in ! void SetObject() ! ! // %override [any value type] wxLuaObject::GetObject() ! // C++ Func: bool GetObject() ! // get the object, note C++ returns bool, in lua it "returns" the referenced object ! void GetObject() const ! ! // These are not useful in lua ! //bool *GetBoolPtr(); ! //int *GetIntPtr(); ! //wxString *GetStringPtr(); ! //wxArrayInt *GetArrayPtr(); ! ! int GetAllocationFlags() const ! bool HasAllocationFlag(wxLuaObject_Type flag) ! //int SetAllocationFlag(wxLuaObject_Type flag, bool set) // NOT for use in lua ! %endclass //----------------------------------------------------------------------------- --- 8,12 ---- // ============================================================================ ! %include "wxlua/include/wxlua_bind.h" // for wxLuaObject tag //----------------------------------------------------------------------------- Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** menutool.i 13 Jun 2007 04:15:22 -0000 1.19 --- menutool.i 14 Jun 2007 01:23:08 -0000 1.20 *************** *** 81,85 **** // wxMenuBar ! %class wxMenuBar, wxEvtHandler wxMenuBar(long style = 0) // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) --- 81,85 ---- // wxMenuBar ! %class wxMenuBar, wxWindow wxMenuBar(long style = 0) // void wxMenuBar(int n, wxMenu* menus[], const wxString titles[]) *************** *** 294,298 **** %endenum ! %class %noclassinfo wxToolBarToolBase // no constructors --- 294,298 ---- %endenum ! %class wxToolBarToolBase, wxObject // no constructors Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** defsutil.i 31 May 2007 21:38:39 -0000 1.42 --- defsutil.i 14 Jun 2007 01:23:08 -0000 1.43 *************** *** 610,614 **** %class %noclassinfo %encapsulate %delete wxBusyCursor ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) %endclass --- 610,614 ---- %class %noclassinfo %encapsulate %delete wxBusyCursor ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) %endclass *************** *** 617,624 **** // wxBusyCursorSuspender - we don't wrap this since lua's garbage collector doesn't // automatically collect items when they go out of scope so you would have to ! // Delete this anyway which is just as easy as //%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough // wxBusyCursorSuspender() --- 617,624 ---- // wxBusyCursorSuspender - we don't wrap this since lua's garbage collector doesn't // automatically collect items when they go out of scope so you would have to ! // delete() this anyway which is just as easy as wxBegin/EndBusyCursor //%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough // wxBusyCursorSuspender() *************** *** 635,639 **** %class %delete %noclassinfo wxBusyInfo, wxObject ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) %endclass --- 635,639 ---- %class %delete %noclassinfo wxBusyInfo, wxObject ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) %endclass Index: xml.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/xml.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** xml.i 1 Jun 2007 18:19:46 -0000 1.11 --- xml.i 14 Jun 2007 01:23:09 -0000 1.12 *************** *** 84,88 **** // wxXmlDocument ! %class %delete %noclassinfo wxXmlDocument wxXmlDocument(); wxXmlDocument(const wxString& filename, const wxString& encoding = "UTF-8"); --- 84,88 ---- // wxXmlDocument ! %class %delete wxXmlDocument, wxObject wxXmlDocument(); wxXmlDocument(const wxString& filename, const wxString& encoding = "UTF-8"); Index: dialogs.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/dialogs.i,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** dialogs.i 13 Jun 2007 04:15:22 -0000 1.32 --- dialogs.i 14 Jun 2007 01:23:08 -0000 1.33 *************** *** 279,283 **** %wxchkver_2_8 %define wxDD_DIR_MUST_EXIST ! %class %noclassinfo wxDirDialog, wxDialog wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition) --- 279,283 ---- %wxchkver_2_8 %define wxDD_DIR_MUST_EXIST ! %class wxDirDialog, wxDialog wxDirDialog(wxWindow* parent, const wxString& message = "Choose a directory", const wxString& defaultPath = "", long style = 0, const wxPoint& pos = wxDefaultPosition) *************** *** 386,390 **** %include "wx/cmndata.h" ! %class %delete %noclassinfo wxFontData wxFontData() wxFontData(const wxFontData& data) --- 386,390 ---- %include "wx/cmndata.h" ! %class %delete wxFontData, wxObject wxFontData() wxFontData(const wxFontData& data) Index: event.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/event.i,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** event.i 11 Jun 2007 03:57:59 -0000 1.24 --- event.i 14 Jun 2007 01:23:08 -0000 1.25 *************** *** 82,86 **** %class %delete %noclassinfo %encapsulate wxPropagationDisabler ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) --- 82,86 ---- %class %delete %noclassinfo %encapsulate wxPropagationDisabler ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) *************** *** 93,97 **** %class %noclassinfo %encapsulate %delete wxPropagateOnce ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) --- 93,97 ---- %class %noclassinfo %encapsulate %delete wxPropagateOnce ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) *************** *** 756,760 **** %include "wx/event.h" ! %class wxWindowCreateEvent, wxCommandEvent %define_event wxEVT_CREATE // EVT_WINDOW_CREATE(func) --- 756,760 ---- %include "wx/event.h" ! %class wxWindowCreateEvent, wxEvent %define_event wxEVT_CREATE // EVT_WINDOW_CREATE(func) *************** *** 769,773 **** %include "wx/event.h" ! %class wxWindowDestroyEvent, wxCommandEvent %define_event wxEVT_DESTROY // EVT_WINDOW_DESTROY(func) --- 769,773 ---- %include "wx/event.h" ! %class wxWindowDestroyEvent, wxEvent %define_event wxEVT_DESTROY // EVT_WINDOW_DESTROY(func) Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** data.i 13 Jun 2007 04:15:22 -0000 1.31 --- data.i 14 Jun 2007 01:23:08 -0000 1.32 *************** *** 169,173 **** %include "wx/valgen.h" ! %class %delete %noclassinfo wxGenericValidator, wxValidator // See the validator.wx.lua sample for usage of this class --- 169,173 ---- %include "wx/valgen.h" ! %class %delete wxGenericValidator, wxValidator // See the validator.wx.lua sample for usage of this class *************** *** 210,214 **** %endenum ! %class %noclassinfo wxList, wxObject wxList() --- 210,214 ---- %endenum ! %class wxList, wxObject wxList() Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** appframe.i 13 Jun 2007 04:15:22 -0000 1.37 --- appframe.i 14 Jun 2007 01:23:08 -0000 1.38 *************** *** 130,134 **** %class %noclassinfo %encapsulate %delete wxLogNull ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxLogNull() --- 130,134 ---- %class %noclassinfo %encapsulate %delete wxLogNull ! // NOTE: ALWAYS delete() this when done since lua's gc may not delete it soon enough wxLogNull() Index: wx_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_rules.lua,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wx_rules.lua 31 May 2007 17:18:47 -0000 1.27 --- wx_rules.lua 14 Jun 2007 01:23:09 -0000 1.28 *************** *** 288,292 **** ------------------------------------------------------------------------------- -- Add additional data types here ! -- example: dataTypes["wxArrayInt"] = AllocDataType("wxArrayInt", "class",false) --============================================================================= --- 288,292 ---- ------------------------------------------------------------------------------- -- Add additional data types here ! AllocDataType("wxLuaObject", "class", false) --============================================================================= |