From: John L. <jr...@us...> - 2006-06-12 03:50:40
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13456/wxLua/bindings/wxwidgets Modified Files: gdi.i html.i override.hpp Log Message: update lua to 5.1.1 update wxLua bindings to changes in wxWidgets CVS HEAD 2.7.0 Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** gdi.i 25 May 2006 22:50:04 -0000 1.25 --- gdi.i 12 Jun 2006 03:50:36 -0000 1.26 *************** *** 376,381 **** virtual bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false) virtual bool EnumerateEncodings( const wxString &font = "" ) ! wxArrayString* GetEncodings() ! wxArrayString* GetFacenames() %win %property=Encodings, read --- 376,384 ---- virtual bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false) virtual bool EnumerateEncodings( const wxString &font = "" ) ! ! %wxchkver27 static wxArrayString GetEncodings() ! %wxchkver27 static wxArrayString GetFacenames() ! !%wxchkver27 wxArrayString* GetEncodings() ! !%wxchkver27 wxArrayString* GetFacenames() %win %property=Encodings, read Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** html.i 17 May 2006 05:02:04 -0000 1.8 --- html.i 12 Jun 2006 03:50:36 -0000 1.9 *************** *** 23,27 **** // %override [bool, int pagebreak] wxHtmlCell::AdjustPagebreak(int pagebreak) ! virtual bool AdjustPagebreak(int pagebreak) // (int* pagebreak) //virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info) //virtual void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info) --- 23,28 ---- // %override [bool, int pagebreak] wxHtmlCell::AdjustPagebreak(int pagebreak) ! !%wxchkver27 virtual bool AdjustPagebreak(int pagebreak) // int* known_pagebreaks, int number_of_pages) ! %wxchkver27 virtual bool AdjustPagebreak(int pagebreak, wxArrayInt& known_pagebreaks) //virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info) //virtual void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info) *************** *** 306,310 **** void SetSize(int width, int height) void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) ! int Render(int x, int y, int from = 0, int dont_render = false) int GetTotalHeight() --- 307,312 ---- void SetSize(int width, int height) void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) ! !%wxchkver27 int Render(int x, int y, int from = 0, int dont_render = false) //, int *known_pagebreaks = NULL, int number_of_pages = 0) ! %wxchkver27 int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0, int dont_render = false, int to = INT_MAX); int GetTotalHeight() Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** override.hpp 29 May 2006 22:31:17 -0000 1.50 --- override.hpp 12 Jun 2006 03:50:36 -0000 1.51 *************** *** 2834,2837 **** --- 2834,2839 ---- %override wxLua_wxHtmlCell_AdjustPagebreak // virtual bool AdjustPagebreak(int * pagebreak) + + #if !wxCHECK_VERSION(2, 7, 0) static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) { *************** *** 2851,2854 **** --- 2853,2878 ---- return 2; } + #else + // virtual bool AdjustPagebreak(int * pagebreak, wxArrayInt& known_pagebreaks) + static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // int * pagebreak + int pagebreak = (int)wxlState.GetNumberType(3); + // wxArrayInt& known_pagebreaks + wxArrayInt* known_pagebreaks = (wxArrayInt *)wxlState.GetUserDataType(2, s_wxluatag_wxArrayInt); + // get this + wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); + // call AdjustPagebreak + returns = self->AdjustPagebreak(&pagebreak, *known_pagebreaks); + // push the result number + lua_pushboolean(L, returns); + // + lua_pushnumber(L, pagebreak); + // return the number of parameters + return 2; + } + #endif %end |