Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19284/wxLua/modules/wxbind/src Modified Files: appframe.cpp controls.cpp event.cpp gdi.cpp html.cpp menutool.cpp windows.cpp wx_bind.cpp Log Message: Add back the wxTreeCtrl into the stack dialog, on left of listctrl so you get both for easier navigation. Added functions to the wxlua.XXX table to get info about the status of wxLua Use qsort and bsearch to find the class methods ~ %25 faster Make wxLuaDebugData not always create it's ref data so it can !Ok() Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** controls.cpp 14 Jun 2007 23:59:42 -0000 1.65 --- controls.cpp 16 Jun 2007 06:21:43 -0000 1.66 *************** *** 4490,4494 **** #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SortItems[] = { &s_wxluatag_wxListCtrl, &s_wxluaarg_LuaFunction, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxListCtrl_SortItems(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxListCtrl_SortItems[1] = {{ wxLua_wxListCtrl_SortItems, WXLUAMETHOD_METHOD, 3, 3, s_wxluatagArray_wxLua_wxListCtrl_SortItems }}; --- 4490,4494 ---- #endif // (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) && (wxLUA_USE_wxColourPenBrush) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxListCtrl_SortItems[] = { &s_wxluatag_wxListCtrl, &s_wxluaarg_Function, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxListCtrl_SortItems(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxListCtrl_SortItems[1] = {{ wxLua_wxListCtrl_SortItems, WXLUAMETHOD_METHOD, 3, 3, s_wxluatagArray_wxLua_wxListCtrl_SortItems }}; Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** appframe.cpp 14 Jun 2007 23:59:42 -0000 1.53 --- appframe.cpp 16 Jun 2007 06:21:43 -0000 1.54 *************** *** 2395,2399 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxStatusBar_SetFieldsCount[] = { &s_wxluatag_wxStatusBar, &s_wxluaarg_LuaTable, NULL }; static int LUACALL wxLua_wxStatusBar_SetFieldsCount(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxStatusBar_SetFieldsCount[1] = {{ wxLua_wxStatusBar_SetFieldsCount, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxStatusBar_SetFieldsCount }}; --- 2395,2399 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxStatusBar_SetFieldsCount[] = { &s_wxluatag_wxStatusBar, &s_wxluaarg_Table, NULL }; static int LUACALL wxLua_wxStatusBar_SetFieldsCount(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxStatusBar_SetFieldsCount[1] = {{ wxLua_wxStatusBar_SetFieldsCount, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxStatusBar_SetFieldsCount }}; *************** *** 2787,2791 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxAcceleratorTable_constructor[] = { &s_wxluaarg_LuaTable, NULL }; static int LUACALL wxLua_wxAcceleratorTable_constructor(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxAcceleratorTable_constructor[1] = {{ wxLua_wxAcceleratorTable_constructor, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxAcceleratorTable_constructor }}; --- 2787,2791 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxAcceleratorTable_constructor[] = { &s_wxluaarg_Table, NULL }; static int LUACALL wxLua_wxAcceleratorTable_constructor(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxAcceleratorTable_constructor[1] = {{ wxLua_wxAcceleratorTable_constructor, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxAcceleratorTable_constructor }}; Index: event.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/event.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** event.cpp 14 Jun 2007 23:59:43 -0000 1.50 --- event.cpp 16 Jun 2007 06:21:44 -0000 1.51 *************** *** 50,54 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxEvtHandler_Connect[] = { &s_wxluatag_wxEvtHandler, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_LuaFunction, NULL }; static int LUACALL wxLua_wxEvtHandler_Connect(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxEvtHandler_Connect[1] = {{ wxLua_wxEvtHandler_Connect, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxEvtHandler_Connect }}; --- 50,54 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxEvtHandler_Connect[] = { &s_wxluatag_wxEvtHandler, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Function, NULL }; static int LUACALL wxLua_wxEvtHandler_Connect(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxEvtHandler_Connect[1] = {{ wxLua_wxEvtHandler_Connect, WXLUAMETHOD_METHOD, 5, 5, s_wxluatagArray_wxLua_wxEvtHandler_Connect }}; Index: windows.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/windows.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** windows.cpp 14 Jun 2007 23:59:46 -0000 1.60 --- windows.cpp 16 Jun 2007 06:21:45 -0000 1.61 *************** *** 599,602 **** --- 599,634 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxWindow_Create[] = { &s_wxluatag_wxWindow, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxWindow_Create(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxWindow_Create[1] = {{ wxLua_wxWindow_Create, WXLUAMETHOD_METHOD, 3, 7, s_wxluatagArray_wxLua_wxWindow_Create }}; + // bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxWindow") + static int LUACALL wxLua_wxWindow_Create(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // const wxString name = "wxWindow" + const wxString name = (argCount >= 7 ? wxlState.GetwxStringType(7) : wxString(wxT("wxWindow"))); + // long style = 0 + long style = (argCount >= 6 ? (long)wxlua_getnumbertype(L, 6) : 0); + // const wxSize size = wxDefaultSize + const wxSize * size = (argCount >= 5 ? (const wxSize *)wxlState.GetUserDataType(5, s_wxluatag_wxSize) : &wxDefaultSize); + // const wxPoint pos = wxDefaultPosition + const wxPoint * pos = (argCount >= 4 ? (const wxPoint *)wxlState.GetUserDataType(4, s_wxluatag_wxPoint) : &wxDefaultPosition); + // wxWindowID id + wxWindowID id = (wxWindowID)wxlua_getnumbertype(L, 3); + // wxWindow parent + wxWindow * parent = (wxWindow *)wxlState.GetUserDataType(2, s_wxluatag_wxWindow); + // get this + wxWindow * self = (wxWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxWindow); + // call Create + returns = (self->Create(parent, id, *pos, *size, style, name)); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + #endif // wxLUA_USE_wxPointSizeRect *************** *** 4304,4307 **** --- 4336,4343 ---- #endif // (wxLUA_USE_wxPointSizeRect) + #if wxLUA_USE_wxPointSizeRect + { "Create", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_Create, 1, NULL }, + #endif // wxLUA_USE_wxPointSizeRect + { "Destroy", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_Destroy, 1, NULL }, { "DestroyChildren", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxWindow_DestroyChildren, 1, NULL }, Index: menutool.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/menutool.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** menutool.cpp 14 Jun 2007 23:59:45 -0000 1.44 --- menutool.cpp 16 Jun 2007 06:21:45 -0000 1.45 *************** *** 866,870 **** #define wxLua_wxMenu_constructor1 wxLua_wxCreateMenu_constructor ! static wxLuaArgTag s_wxluatagArray_wxLua_wxMenu_constructor1[] = { &s_wxluaarg_LuaTable, &s_wxluaarg_String, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxMenu_constructor1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenu_constructor1[1] = {{ wxLua_wxMenu_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 3, s_wxluatagArray_wxLua_wxMenu_constructor1 }}; --- 866,870 ---- #define wxLua_wxMenu_constructor1 wxLua_wxCreateMenu_constructor ! static wxLuaArgTag s_wxluatagArray_wxLua_wxMenu_constructor1[] = { &s_wxluaarg_Table, &s_wxluaarg_String, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxMenu_constructor1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxMenu_constructor1[1] = {{ wxLua_wxMenu_constructor1, WXLUAMETHOD_CONSTRUCTOR, 1, 3, s_wxluatagArray_wxLua_wxMenu_constructor1 }}; Index: html.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/html.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** html.cpp 14 Jun 2007 23:59:45 -0000 1.47 --- html.cpp 16 Jun 2007 06:21:45 -0000 1.48 *************** *** 1681,1685 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlWindow_SetFonts[] = { &s_wxluatag_wxHtmlWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LuaTable, NULL }; static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlWindow_SetFonts[1] = {{ wxLua_wxHtmlWindow_SetFonts, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxHtmlWindow_SetFonts }}; --- 1681,1685 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlWindow_SetFonts[] = { &s_wxluatag_wxHtmlWindow, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Table, NULL }; static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlWindow_SetFonts[1] = {{ wxLua_wxHtmlWindow_SetFonts, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxHtmlWindow_SetFonts }}; *************** *** 2621,2625 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlWinParser_SetFonts[] = { &s_wxluatag_wxHtmlWinParser, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LuaTable, NULL }; static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlWinParser_SetFonts[1] = {{ wxLua_wxHtmlWinParser_SetFonts, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxHtmlWinParser_SetFonts }}; --- 2621,2625 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxHtmlWinParser_SetFonts[] = { &s_wxluatag_wxHtmlWinParser, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Table, NULL }; static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxHtmlWinParser_SetFonts[1] = {{ wxLua_wxHtmlWinParser_SetFonts, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxHtmlWinParser_SetFonts }}; Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** wx_bind.cpp 14 Jun 2007 23:59:46 -0000 1.106 --- wx_bind.cpp 16 Jun 2007 06:21:45 -0000 1.107 *************** *** 4939,4943 **** #if wxUSE_CHOICEDLG ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxGetMultipleChoices[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LuaTable, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Boolean, &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; // %override wxLua_function_wxGetMultipleChoices // %function size_t wxGetMultipleChoices(wxArrayInt& selections,const wxString& message,const wxString& caption,int n, const wxString *choices,wxWindow *parent = (wxWindow *) NULL,int x = -1, int y = -1, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); --- 4939,4943 ---- #if wxUSE_CHOICEDLG ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxGetMultipleChoices[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Table, &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Boolean, &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; // %override wxLua_function_wxGetMultipleChoices // %function size_t wxGetMultipleChoices(wxArrayInt& selections,const wxString& message,const wxString& caption,int n, const wxString *choices,wxWindow *parent = (wxWindow *) NULL,int x = -1, int y = -1, bool centre = true, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** gdi.cpp 14 Jun 2007 23:59:44 -0000 1.70 --- gdi.cpp 16 Jun 2007 06:21:45 -0000 1.71 *************** *** 8227,8231 **** #define wxLua_wxBitmap_constructor5 wxLua_wxBitmapFromXPMData_constructor ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBitmap_constructor5[] = { &s_wxluaarg_LuaTable, NULL }; static int LUACALL wxLua_wxBitmap_constructor5(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxBitmap_constructor5[1] = {{ wxLua_wxBitmap_constructor5, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxBitmap_constructor5 }}; --- 8227,8231 ---- #define wxLua_wxBitmap_constructor5 wxLua_wxBitmapFromXPMData_constructor ! static wxLuaArgTag s_wxluatagArray_wxLua_wxBitmap_constructor5[] = { &s_wxluaarg_Table, NULL }; static int LUACALL wxLua_wxBitmap_constructor5(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxBitmap_constructor5[1] = {{ wxLua_wxBitmap_constructor5, WXLUAMETHOD_CONSTRUCTOR, 1, 1, s_wxluatagArray_wxLua_wxBitmap_constructor5 }}; *************** *** 13361,13365 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvas_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluaarg_LuaTable, &s_wxluatag_wxPalette, NULL }; static int LUACALL wxLua_wxGLCanvas_constructor(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxGLCanvas_constructor[1] = {{ wxLua_wxGLCanvas_constructor, WXLUAMETHOD_CONSTRUCTOR, 2, 8, s_wxluatagArray_wxLua_wxGLCanvas_constructor }}; --- 13361,13365 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGLCanvas_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, &s_wxluaarg_Table, &s_wxluatag_wxPalette, NULL }; static int LUACALL wxLua_wxGLCanvas_constructor(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxGLCanvas_constructor[1] = {{ wxLua_wxGLCanvas_constructor, WXLUAMETHOD_CONSTRUCTOR, 2, 8, s_wxluatagArray_wxLua_wxGLCanvas_constructor }}; |