From: John L. <jr...@us...> - 2006-05-05 22:02:49
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20108/wxLua/bindings/wxwidgets Modified Files: html.i override.hpp Log Message: update html.i to 2.6.3 Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** html.i 1 May 2006 19:36:30 -0000 1.6 --- html.i 5 May 2006 22:02:44 -0000 1.7 *************** *** 15,29 **** %include "wx/html/htmlcell.h" %class wxHtmlCell wxHtmlCell() ! virtual bool AdjustPagebreak(int * pagebreak) ! // these two have changed in wxWin 2.5 ! //virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) ! //virtual void DrawInvisible(wxDC& dc, int x, int y) virtual const wxHtmlCell* Find(int condition, void *param = 0) int GetDescent() const ! %property=Descent, read int GetHeight() const - %property=Height, read %wxchkver23 virtual wxString GetId() const virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const --- 15,34 ---- %include "wx/html/htmlcell.h" + %define wxHTML_COND_ISANCHOR + %define wxHTML_COND_ISIMAGEMAP + %define wxHTML_COND_USER + %class wxHtmlCell wxHtmlCell() ! ! // %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) ! // %override wxHtmlCell* Find(int condition, [none, string, or int]) virtual const wxHtmlCell* Find(int condition, void *param = 0) int GetDescent() const ! wxHtmlCell* GetFirstChild() int GetHeight() const %wxchkver23 virtual wxString GetId() const virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const *************** *** 31,49 **** wxHtmlContainerCell* GetParent() const int GetPosX() const - %property=PosX, read int GetPosY() const - %property=PosY, read int GetWidth() const - %property=Width, read virtual void Layout(int w) ! //virtual void OnMouseClick(wxWindow* parent, intx, int y, const wxMouseEvent& event) %wxchkver23 void SetId(const wxString& id) - %wxchkver23 %property=Id, read, write void SetLink(const wxHtmlLinkInfo& link) void SetNext(wxHtmlCell *cell) - %property=Next, read, write void SetParent(wxHtmlContainerCell *p) - %property=Parent, read, write void SetPos(int x, int y) %endclass --- 36,57 ---- wxHtmlContainerCell* GetParent() const int GetPosX() const int GetPosY() const int GetWidth() const virtual void Layout(int w) ! //virtual void OnMouseClick(wxWindow* parent, int x, int y, const wxMouseEvent& event) %wxchkver23 void SetId(const wxString& id) void SetLink(const wxHtmlLinkInfo& link) void SetNext(wxHtmlCell *cell) void SetParent(wxHtmlContainerCell *p) void SetPos(int x, int y) + + %property=Descent, read + %property=Height, read + %wxchkver23 %property=Id, read, write + %property=Next, read, write + %property=Parent, read, write + %property=PosX, read + %property=PosY, read + %property=Width, read %endclass *************** *** 61,72 **** %class %noclassinfo wxHtmlLinkInfo ! wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) const wxMouseEvent * GetEvent() - %property=Event, read const wxHtmlCell * GetHtmlCell() - %property=HtmlCell, read wxString GetHref() - %property=Href, read wxString GetTarget() %property=Target, read %endclass --- 69,82 ---- %class %noclassinfo wxHtmlLinkInfo ! wxHtmlLinkInfo(const wxString& href, const wxString& target = "") ! const wxMouseEvent * GetEvent() const wxHtmlCell * GetHtmlCell() wxString GetHref() wxString GetTarget() + + %property=Event, read + %property=Href, read + %property=HtmlCell, read %property=Target, read %endclass *************** *** 79,98 **** %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) const wxString GetAllParams() const int GetBeginPos() const - %property=BeginPos, read int GetEndPos1() const - %property=EndPos1, read int GetEndPos2() const - %property=EndPos2, read wxString GetName() const - %property=Name, read wxString GetParam(const wxString& par, bool with_commas = false) const bool HasEnding() const bool HasParam(const wxString& par) const //bool IsEnding() const //wxString ScanParam(const wxString& par, const wxString &format, void *value) const ! %wxchkver23 bool GetParamAsColour(const wxString& par, wxColour *clr) const ! %wxchkver23 bool GetParamAsInt(const wxString& par, int *value) const %endclass --- 89,112 ---- %class wxHtmlTag //wxHtmlTag(const wxString& source, int pos, int end_pos, wxHtmlTagsCache* cache) + const wxString GetAllParams() const int GetBeginPos() const int GetEndPos1() const int GetEndPos2() const wxString GetName() const wxString GetParam(const wxString& par, bool with_commas = false) const + // %override [bool, wxColour] wxHtmlTag::GetParamAsColour(const wxString& par) const + bool GetParamAsColour(const wxString& par, wxColour *clr) const + // %override [bool, int value] wxHtmlTag::GetParamAsInt(const wxString& par) const + bool GetParamAsInt(const wxString& par, int *value) const bool HasEnding() const bool HasParam(const wxString& par) const //bool IsEnding() const //wxString ScanParam(const wxString& par, const wxString &format, void *value) const ! ! %property=BeginPos, read ! %property=EndPos1, read ! %property=EndPos2, read ! %property=Name, read %endclass *************** *** 121,137 **** %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) int GetAlignHor() const int GetAlignVer() const ! %wxchkver25 wxHtmlCell* GetFirstChild() ! %wxchkver22&!%wxchkver25|%wxcompat24 wxHtmlCell* GetFirstCell() ! %wxchkver22&!%wxchkver25|%wxcompat24 %property=FirstCell, read int GetIndent(int ind) const int GetIndentUnits(int ind) const void InsertCell(wxHtmlCell *cell) void SetAlign(const wxHtmlTag& tag) ! void SetAlignHor(int align) ! %property=AlignHor, read, write ! void SetAlignVer(int align) ! %property=AlignVer, read, write void SetBackgroundColour(const wxColour& clr) void SetBorder(const wxColour& clr1, const wxColour& clr2) --- 135,148 ---- %class %noclassinfo wxHtmlContainerCell, wxHtmlCell wxHtmlContainerCell(wxHtmlContainerCell *parent) + int GetAlignHor() const int GetAlignVer() const ! wxColour GetBackgroundColour() int GetIndent(int ind) const int GetIndentUnits(int ind) const void InsertCell(wxHtmlCell *cell) void SetAlign(const wxHtmlTag& tag) ! void SetAlignHor(int al) ! void SetAlignVer(int al) void SetBackgroundColour(const wxColour& clr) void SetBorder(const wxColour& clr1, const wxColour& clr2) *************** *** 140,143 **** --- 151,161 ---- void SetWidthFloat(int w, int units) %rename SetWidthFloatFromTag void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0) + + %wxchkver25 wxHtmlCell* GetFirstChild() + %wxchkver22&!%wxchkver25 wxHtmlCell* GetFirstCell() + + %property=AlignHor, read, write + %property=AlignVer, read, write + %wxchkver22&!%wxchkver25 %property=FirstCell, read %endclass *************** *** 151,167 **** %class wxHtmlWindow, wxScrolledWindow ! wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") //static void AddFilter(wxHtmlFilter *filter) %wxchkver23 bool AppendToPage(const wxString& source) wxHtmlContainerCell* GetInternalRepresentation() const - %property=InternalRepresentation, read wxString GetOpenedAnchor() - %property=OpenedAnchor, read wxString GetOpenedPage() - %property=OpenedPage, read wxString GetOpenedPageTitle() - %property=OpenedPageTitle, read wxFrame* GetRelatedFrame() const - %property=RelatedFrame, read %wxchkver23 bool HistoryBack() %wxchkver23 bool HistoryCanBack() --- 169,181 ---- %class wxHtmlWindow, wxScrolledWindow ! wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "wxHtmlWindow") ! //static void AddFilter(wxHtmlFilter *filter) %wxchkver23 bool AppendToPage(const wxString& source) wxHtmlContainerCell* GetInternalRepresentation() const wxString GetOpenedAnchor() wxString GetOpenedPage() wxString GetOpenedPageTitle() wxFrame* GetRelatedFrame() const %wxchkver23 bool HistoryBack() %wxchkver23 bool HistoryCanBack() *************** *** 169,180 **** --- 183,208 ---- %wxchkver23 void HistoryClear() %wxchkver23 bool HistoryForward() + virtual bool LoadFile(const wxFileName& filename) bool LoadPage(const wxString& location) void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString) + void SelectAll() + wxString SelectionToText() + void SelectLine(const wxPoint& pos) + void SelectWord(const wxPoint& pos) void SetBorders(int b) + // %override void SetFonts(wxString normal_face, wxString fixed_face, {lua int table}) void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) bool SetPage(const wxString& source) void SetRelatedFrame(wxFrame* frame, const wxString& format) void SetRelatedStatusBar(int bar) + wxString ToText() void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString) + + %property=InternalRepresentation, read + %property=OpenedAnchor, read + %property=OpenedPage, read + %property=OpenedPageTitle, read + %property=RelatedFrame, read + %endclass *************** *** 182,195 **** // wxHtmlParser %class wxHtmlParser //wxHtmlParser() //void AddTag(const wxHtmlTag& tag) //void AddTagHandler(wxHtmlTagHandler *handler) ! //void AddWord(const wxString &txt) void DoParsing(int begin_pos, int end_pos) %rename DoParsingWhole void DoParsing() virtual void DoneParser() //wxString* GetSource() void InitParser(const wxString& source) %endclass --- 210,237 ---- // wxHtmlParser + //%enum wxHtmlURLType + // wxHTML_URL_PAGE + // wxHTML_URL_IMAGE + // wxHTML_URL_OTHER + //%endenum + %class wxHtmlParser //wxHtmlParser() + //void AddTag(const wxHtmlTag& tag) //void AddTagHandler(wxHtmlTagHandler *handler) ! //void AddWord(const wxString &txt) - not in 2.6? void DoParsing(int begin_pos, int end_pos) %rename DoParsingWhole void DoParsing() virtual void DoneParser() + //virtual wxObject* GetProduct() //wxString* GetSource() void InitParser(const wxString& source) + //virtual wxFSFile* OpenURL(wxHtmlURLType type, const wxString& url) + //wxObject* Parse(const wxString& source) + //void PushTagHandler(wxHtmlTagHandler* handler, wxString tags) + //void PopTagHandler() + //void SetFS(wxFileSystem *fs) + //void StopParsing() %endclass *************** *** 199,202 **** --- 241,245 ---- %class wxHtmlWinParser, wxHtmlParser wxHtmlWinParser(wxHtmlWindow *wnd) + wxHtmlContainerCell* CloseContainer() wxFont* CreateCurrentFont() *************** *** 207,210 **** --- 250,254 ---- wxHtmlContainerCell* GetContainer() const wxDC* GetDC() + //wxEncodingConverter * GetEncodingConverter() const int GetFontBold() const wxString GetFontFace() const *************** *** 213,246 **** int GetFontSize() const int GetFontUnderlined() const const wxHtmlLinkInfo& GetLink() const wxColour GetLinkColor() const wxWindow* GetWindow() - %property=Window, read wxHtmlContainerCell* OpenContainer() void SetActualColor(const wxColour& clr) - %property=ActualColor, read, write void SetAlign(int a) - %property=Align, read, write wxHtmlContainerCell* SetContainer(wxHtmlContainerCell *c) - %property=Container, read, write void SetDC(wxDC *dc, double pixel_scale = 1.0) - %property=DC, read, write void SetFontBold(int x) - %property=FontBold, read, write void SetFontFace(const wxString& face) - %property=FontFace, read, write void SetFontFixed(int x) - %property=FontFixed, read, write void SetFontItalic(int x) - %property=FontItalic, read, write void SetFontSize(int s) - %property=FontSize, read, write void SetFontUnderlined(int x) ! %property=FontUnderlined, read, write void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) void SetLink(const wxHtmlLinkInfo& link) - %property=Link, read, write void SetLinkColor(const wxColour& clr) %property=LinkColor, read, write %endclass --- 257,295 ---- int GetFontSize() const int GetFontUnderlined() const + //wxFontEncoding GetInputEncoding() const const wxHtmlLinkInfo& GetLink() const wxColour GetLinkColor() const + //wxFontEncoding GetOutputEncoding() const wxWindow* GetWindow() wxHtmlContainerCell* OpenContainer() void SetActualColor(const wxColour& clr) void SetAlign(int a) wxHtmlContainerCell* SetContainer(wxHtmlContainerCell *c) void SetDC(wxDC *dc, double pixel_scale = 1.0) void SetFontBold(int x) void SetFontFace(const wxString& face) void SetFontFixed(int x) void SetFontItalic(int x) void SetFontSize(int s) void SetFontUnderlined(int x) ! // %override void SetFonts(wxString normal_face, wxString fixed_face, {lua int table}) void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) void SetLink(const wxHtmlLinkInfo& link) void SetLinkColor(const wxColour& clr) + + %property=Window, read + %property=ActualColor, read, write + %property=Align, read, write + %property=Container, read, write + %property=DC, read, write + %property=FontBold, read, write + %property=FontFace, read, write + %property=FontFixed, read, write + %property=FontItalic, read, write + %property=FontSize, read, write + %property=FontUnderlined, read, write + %property=Link, read, write %property=LinkColor, read, write + %endclass *************** *** 252,260 **** %class %delete %noclassinfo wxHtmlDCRenderer, wxObject wxHtmlDCRenderer() void SetDC(wxDC* dc, double pixel_scale = 1.0) void SetSize(int width, int height) ! void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) int Render(int x, int y, int from = 0, int dont_render = false) int GetTotalHeight() %property=TotalHeight, read %endclass --- 301,312 ---- %class %delete %noclassinfo wxHtmlDCRenderer, wxObject wxHtmlDCRenderer() + void SetDC(wxDC* dc, double pixel_scale = 1.0) + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) 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() + %property=TotalHeight, read %endclass *************** *** 267,279 **** %class %delete %noclassinfo wxHtmlEasyPrinting, wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame* parent_frame = NULL) bool PreviewFile(const wxString& htmlfile) ! bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString) bool PrintFile(const wxString& htmlfile) ! bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString) %wxchkver24&!%wxchkver25 void PrinterSetup() void PageSetup() wxPrintData* GetPrintData() - %property=PrintData, read wxPageSetupDialogData* GetPageSetupData() %property=PageSetupData, read %endclass --- 319,336 ---- %class %delete %noclassinfo wxHtmlEasyPrinting, wxObject wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame* parent_frame = NULL) + bool PreviewFile(const wxString& htmlfile) ! bool PreviewText(const wxString& htmltext, const wxString& basepath = "") bool PrintFile(const wxString& htmlfile) ! bool PrintText(const wxString& htmltext, const wxString& basepath = "") %wxchkver24&!%wxchkver25 void PrinterSetup() void PageSetup() + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) + void SetHeader(const wxString& header, int pg = wxPAGE_ALL) + void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) wxPrintData* GetPrintData() wxPageSetupDialogData* GetPageSetupData() + + %property=PrintData, read %property=PageSetupData, read %endclass *************** *** 286,293 **** %class %noclassinfo wxHtmlPrintout, wxPrintout wxHtmlPrintout(const wxString& title = "Printout") void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) void SetHeader(const wxString& header, int pg = wxPAGE_ALL) void SetHtmlFile(const wxString& htmlfile) ! void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5) %endclass --- 343,352 ---- %class %noclassinfo wxHtmlPrintout, wxPrintout wxHtmlPrintout(const wxString& title = "Printout") + + //void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL) void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) void SetHeader(const wxString& header, int pg = wxPAGE_ALL) void SetHtmlFile(const wxString& htmlfile) ! void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5) %endclass Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** override.hpp 2 May 2006 05:25:01 -0000 1.34 --- override.hpp 5 May 2006 22:02:44 -0000 1.35 *************** *** 2582,2588 **** // ---------------------------------------------------------------------------- ! %override wxLua_wxHtmlWindow_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L) { wxLuaState wxlState(L); --- 2582,2696 ---- // ---------------------------------------------------------------------------- ! %override wxLua_wxHtmlCell_AdjustPagebreak ! // virtual bool AdjustPagebreak(int * pagebreak) ! static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! // int * pagebreak ! int pagebreak = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call AdjustPagebreak ! returns = self->AdjustPagebreak(&pagebreak); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, pagebreak); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_Find ! // virtual const wxHtmlCell* Find(int condition, void *param = 0) ! static int LUACALL wxLua_wxHtmlCell_Find(lua_State *L) ! { ! wxLuaState wxlState(L); ! const wxHtmlCell *returns = NULL; ! // int condition ! int condition = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call Find ! switch(lua_type(L, 3)) ! { ! case LUA_TNIL: ! returns = self->Find(condition, NULL); ! break; ! ! case LUA_TSTRING: ! { ! wxString param = lua2wx(wxlState.GetStringType(3)); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! case LUA_TNUMBER: ! { ! int param = (int)wxlState.GetNumberType(3); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! default: ! wxlState.terror("wxLua: Expected simple type for parameter 3."); ! break; ! } ! ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); ! // return the number of parameters ! return 1; ! } ! %end ! ! %override wxLua_wxHtmlTag_GetParamAsColour ! // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const ! static int LUACALL wxLua_wxHtmlTag_GetParamAsColour(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! wxColour *retColour = new wxColour; ! // const wxString& par ! wxString par = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); ! // call GetParamAsColour ! returns = self->GetParamAsColour(par, retColour); ! // ! // push the result number ! lua_pushboolean(L, returns); ! wxlState.PushUserDataType(s_wxluatag_wxColour, retColour); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlTag_GetParamAsInt ! // bool GetParamAsInt(const wxString& par, int *value) const ! static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! int value; ! // const wxString& par ! wxString par = lua2wx(wxlState.GetStringType(2)); ! // get this ! wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); ! // call GetParamAsInt ! returns = self->GetParamAsInt(par, &value); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, value); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlWinParser_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L) { wxLuaState wxlState(L); *************** *** 2630,2637 **** wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWindow *self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); - // return the number of parameters return 0; --- 2738,2744 ---- wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWinParser *self = (wxHtmlWinParser *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWinParser); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); // return the number of parameters return 0; *************** *** 2639,2645 **** %end ! %override wxLua_wxHtmlWinParser_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWinParser_SetFonts(lua_State *L) { wxLuaState wxlState(L); --- 2746,2752 ---- %end ! %override wxLua_wxHtmlWindow_SetFonts // void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes) ! static int LUACALL wxLua_wxHtmlWindow_SetFonts(lua_State *L) { wxLuaState wxlState(L); *************** *** 2687,2803 **** wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWinParser *self = (wxHtmlWinParser *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWinParser); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); - // return the number of parameters - return 0; - } - %end - - %override wxLua_wxHtmlTag_GetParamAsColour - // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const - static int LUACALL wxLua_wxHtmlTag_GetParamAsColour(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - wxColour *retColour = new wxColour; - // const wxString& par - wxString par = lua2wx(wxlState.GetStringType(2)); - // get this - wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); - // call GetParamAsColour - returns = self->GetParamAsColour(par, retColour); - // - // push the result number - lua_pushboolean(L, returns); - wxlState.PushUserDataType(s_wxluatag_wxColour, retColour); - // return the number of parameters - return 2; - } - %end - %override wxLua_wxHtmlTag_GetParamAsInt - // bool GetParamAsInt(const wxString& par, int *value) const - static int LUACALL wxLua_wxHtmlTag_GetParamAsInt(lua_State *L) - { - wxLuaState wxlState(L); - bool returns; - int value; - // const wxString& par - wxString par = lua2wx(wxlState.GetStringType(2)); - // get this - wxHtmlTag *self = (wxHtmlTag *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlTag); - // call GetParamAsInt - returns = self->GetParamAsInt(par, &value); - // push the result number - lua_pushboolean(L, returns); - // - lua_pushnumber(L, value); // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_AdjustPagebreak ! // virtual bool AdjustPagebreak(int * pagebreak) ! static int LUACALL wxLua_wxHtmlCell_AdjustPagebreak(lua_State *L) ! { ! wxLuaState wxlState(L); ! bool returns; ! // int * pagebreak ! int pagebreak = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call AdjustPagebreak ! returns = self->AdjustPagebreak(&pagebreak); ! // push the result number ! lua_pushboolean(L, returns); ! // ! lua_pushnumber(L, pagebreak); ! // return the number of parameters ! return 2; ! } ! %end ! ! %override wxLua_wxHtmlCell_Find ! // virtual const wxHtmlCell* Find(int condition, void *param = 0) ! static int LUACALL wxLua_wxHtmlCell_Find(lua_State *L) ! { ! wxLuaState wxlState(L); ! const wxHtmlCell *returns = NULL; ! // int condition ! int condition = (int)wxlState.GetNumberType(2); ! // get this ! wxHtmlCell *self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); ! // call Find ! switch(lua_type(L, 3)) ! { ! case LUA_TNIL: ! returns = self->Find(condition, NULL); ! break; ! ! case LUA_TSTRING: ! { ! wxString param = lua2wx(wxlState.GetStringType(3)); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! case LUA_TNUMBER: ! { ! int param = (int)wxlState.GetNumberType(3); ! returns = self->Find(condition, ¶m); ! } ! break; ! ! default: ! wxlState.terror("wxLua: Expected simple type for parameter 3."); ! break; ! } ! ! // push the result datatype ! wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); ! // return the number of parameters ! return 1; } %end --- 2794,2803 ---- wxString normal_face = lua2wx(wxlState.GetStringType(2)); // get this ! wxHtmlWindow *self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); // call SetFonts self->SetFonts(normal_face, fixed_face, sizes); // return the number of parameters ! return 0; } %end |