From: John L. <jr...@us...> - 2006-05-05 22:02:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20108/wxLua/modules/wxbind/src Modified Files: html.cpp wx_bind.cpp Log Message: update html.i to 2.6.3 Index: html.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/html.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** html.cpp 2 May 2006 05:25:02 -0000 1.13 --- html.cpp 5 May 2006 22:02:44 -0000 1.14 *************** *** 164,167 **** --- 164,182 ---- } + // wxHtmlCell* GetFirstChild() + static int LUACALL wxLua_wxHtmlCell_GetFirstChild(lua_State *L) + { + wxLuaState wxlState(L); + wxHtmlCell *returns; + // get this + wxHtmlCell * self = (wxHtmlCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlCell); + // call GetFirstChild + returns = self->GetFirstChild(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); + + return 1; + } + // int GetHeight() const static int LUACALL wxLua_wxHtmlCell_GetHeight(lua_State *L) *************** *** 367,394 **** { LuaConstructor, "wxHtmlCell", wxLua_wxHtmlCell_constructor, 0, 0, { 0 } }, ! { LuaMethod, "AdjustPagebreak", wxLua_wxHtmlCell_AdjustPagebreak, 1, 1, { &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "Find", wxLua_wxHtmlCell_Find, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetDescent", wxLua_wxHtmlCell_GetDescent, 0, 0, { 0 } }, ! { LuaGetProp, "Descent", wxLua_wxHtmlCell_GetDescent, 0, 0, {0} }, { LuaMethod, "GetHeight", wxLua_wxHtmlCell_GetHeight, 0, 0, { 0 } }, - { LuaGetProp, "Height", wxLua_wxHtmlCell_GetHeight, 0, 0, {0} }, { LuaMethod, "GetLink", wxLua_wxHtmlCell_GetLink, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetNext", wxLua_wxHtmlCell_GetNext, 0, 0, { 0 } }, { LuaMethod, "GetParent", wxLua_wxHtmlCell_GetParent, 0, 0, { 0 } }, { LuaMethod, "GetPosX", wxLua_wxHtmlCell_GetPosX, 0, 0, { 0 } }, - { LuaGetProp, "PosX", wxLua_wxHtmlCell_GetPosX, 0, 0, {0} }, { LuaMethod, "GetPosY", wxLua_wxHtmlCell_GetPosY, 0, 0, { 0 } }, - { LuaGetProp, "PosY", wxLua_wxHtmlCell_GetPosY, 0, 0, {0} }, { LuaMethod, "GetWidth", wxLua_wxHtmlCell_GetWidth, 0, 0, { 0 } }, - { LuaGetProp, "Width", wxLua_wxHtmlCell_GetWidth, 0, 0, {0} }, { LuaMethod, "Layout", wxLua_wxHtmlCell_Layout, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetLink", wxLua_wxHtmlCell_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaMethod, "SetNext", wxLua_wxHtmlCell_SetNext, 1, 1, { &s_wxluatag_wxHtmlCell, 0 } }, { LuaGetProp, "Next", wxLua_wxHtmlCell_GetNext, 0, 0, {0} }, { LuaSetProp, "Next", wxLua_wxHtmlCell_SetNext, 1, 1, {0} }, - { LuaMethod, "SetParent", wxLua_wxHtmlCell_SetParent, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, { LuaGetProp, "Parent", wxLua_wxHtmlCell_GetParent, 0, 0, {0} }, { LuaSetProp, "Parent", wxLua_wxHtmlCell_SetParent, 1, 1, {0} }, ! { LuaMethod, "SetPos", wxLua_wxHtmlCell_SetPos, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlCell", wxLua_wxHtmlCell_destructor, 0, 0, {0} }, }; --- 382,410 ---- { LuaConstructor, "wxHtmlCell", wxLua_wxHtmlCell_constructor, 0, 0, { 0 } }, ! { LuaMethod, "AdjustPagebreak", wxLua_wxHtmlCell_AdjustPagebreak, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "Find", wxLua_wxHtmlCell_Find, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "GetDescent", wxLua_wxHtmlCell_GetDescent, 0, 0, { 0 } }, ! { LuaMethod, "GetFirstChild", wxLua_wxHtmlCell_GetFirstChild, 0, 0, { 0 } }, { LuaMethod, "GetHeight", wxLua_wxHtmlCell_GetHeight, 0, 0, { 0 } }, { LuaMethod, "GetLink", wxLua_wxHtmlCell_GetLink, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetNext", wxLua_wxHtmlCell_GetNext, 0, 0, { 0 } }, { LuaMethod, "GetParent", wxLua_wxHtmlCell_GetParent, 0, 0, { 0 } }, { LuaMethod, "GetPosX", wxLua_wxHtmlCell_GetPosX, 0, 0, { 0 } }, { LuaMethod, "GetPosY", wxLua_wxHtmlCell_GetPosY, 0, 0, { 0 } }, { LuaMethod, "GetWidth", wxLua_wxHtmlCell_GetWidth, 0, 0, { 0 } }, { LuaMethod, "Layout", wxLua_wxHtmlCell_Layout, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetLink", wxLua_wxHtmlCell_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaMethod, "SetNext", wxLua_wxHtmlCell_SetNext, 1, 1, { &s_wxluatag_wxHtmlCell, 0 } }, + { LuaMethod, "SetParent", wxLua_wxHtmlCell_SetParent, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, + { LuaMethod, "SetPos", wxLua_wxHtmlCell_SetPos, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "Descent", wxLua_wxHtmlCell_GetDescent, 0, 0, {0} }, + { LuaGetProp, "Height", wxLua_wxHtmlCell_GetHeight, 0, 0, {0} }, { LuaGetProp, "Next", wxLua_wxHtmlCell_GetNext, 0, 0, {0} }, { LuaSetProp, "Next", wxLua_wxHtmlCell_SetNext, 1, 1, {0} }, { LuaGetProp, "Parent", wxLua_wxHtmlCell_GetParent, 0, 0, {0} }, { LuaSetProp, "Parent", wxLua_wxHtmlCell_SetParent, 1, 1, {0} }, ! { LuaGetProp, "PosX", wxLua_wxHtmlCell_GetPosX, 0, 0, {0} }, ! { LuaGetProp, "PosY", wxLua_wxHtmlCell_GetPosY, 0, 0, {0} }, ! { LuaGetProp, "Width", wxLua_wxHtmlCell_GetWidth, 0, 0, {0} }, { LuaDelete, "wxHtmlCell", wxLua_wxHtmlCell_destructor, 0, 0, {0} }, }; *************** *** 459,463 **** int s_wxluatag_wxHtmlLinkInfo = -1; ! // wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) static int LUACALL wxLua_wxHtmlLinkInfo_constructor(lua_State *L) { --- 475,479 ---- int s_wxluatag_wxHtmlLinkInfo = -1; ! // wxHtmlLinkInfo(const wxString& href, const wxString& target = "") static int LUACALL wxLua_wxHtmlLinkInfo_constructor(lua_State *L) { *************** *** 466,470 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString target = wxEmptyString const wxString target = (argCount >= 2 ? lua2wx(wxlState.GetStringType(2)) : wxString(wxEmptyString)); // const wxString href --- 482,486 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString target = "" const wxString target = (argCount >= 2 ? lua2wx(wxlState.GetStringType(2)) : wxString(wxEmptyString)); // const wxString href *************** *** 551,560 **** { LuaConstructor, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_constructor, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "GetEvent", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, { 0 } }, - { LuaGetProp, "Event", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, {0} }, { LuaMethod, "GetHtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, { 0 } }, - { LuaGetProp, "HtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, {0} }, { LuaMethod, "GetHref", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, { 0 } }, - { LuaGetProp, "Href", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, {0} }, { LuaMethod, "GetTarget", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, { 0 } }, { LuaGetProp, "Target", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, {0} }, { LuaDelete, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_destructor, 0, 0, {0} }, --- 567,576 ---- { LuaConstructor, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_constructor, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "GetEvent", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, { 0 } }, { LuaMethod, "GetHtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, { 0 } }, { LuaMethod, "GetHref", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, { 0 } }, { LuaMethod, "GetTarget", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, { 0 } }, + { LuaGetProp, "Event", wxLua_wxHtmlLinkInfo_GetEvent, 0, 0, {0} }, + { LuaGetProp, "Href", wxLua_wxHtmlLinkInfo_GetHref, 0, 0, {0} }, + { LuaGetProp, "HtmlCell", wxLua_wxHtmlLinkInfo_GetHtmlCell, 0, 0, {0} }, { LuaGetProp, "Target", wxLua_wxHtmlLinkInfo_GetTarget, 0, 0, {0} }, { LuaDelete, "wxHtmlLinkInfo", wxLua_wxHtmlLinkInfo_destructor, 0, 0, {0} }, *************** *** 576,580 **** ! #if ((wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxColourPenBrush) // %override wxLua_wxHtmlTag_GetParamAsColour // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const --- 592,596 ---- ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) // %override wxLua_wxHtmlTag_GetParamAsColour // %alias GetParamAsColor bool GetParamAsColour(const wxString& par, wxColour *clr) const *************** *** 600,628 **** #endif - - #if (wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML) - // %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; - } - - #endif - // const wxString GetAllParams() const static int LUACALL wxLua_wxHtmlTag_GetAllParams(lua_State *L) --- 616,619 ---- *************** *** 721,724 **** --- 712,736 ---- } + // %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; + } + // bool HasEnding() const static int LUACALL wxLua_wxHtmlTag_HasEnding(lua_State *L) *************** *** 765,789 **** static WXLUAMETHOD s_wxHtmlTag_methods[] = { ! #if ((wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxColourPenBrush) { LuaMethod, "GetParamAsColour", wxLua_wxHtmlTag_GetParamAsColour, 2, 2, { &s_wxluaarg_String, &s_wxluatag_wxColour, 0 } }, #endif - - #if (wxCHECK_VERSION(2,3,0)) && (wxLUA_USE_wxHTML) - { LuaMethod, "GetParamAsInt", wxLua_wxHtmlTag_GetParamAsInt, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, - #endif - { LuaMethod, "GetAllParams", wxLua_wxHtmlTag_GetAllParams, 0, 0, { 0 } }, { LuaMethod, "GetBeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, { 0 } }, - { LuaGetProp, "BeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, {0} }, { LuaMethod, "GetEndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, { 0 } }, - { LuaGetProp, "EndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, {0} }, { LuaMethod, "GetEndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, { 0 } }, - { LuaGetProp, "EndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, {0} }, { LuaMethod, "GetName", wxLua_wxHtmlTag_GetName, 0, 0, { 0 } }, - { LuaGetProp, "Name", wxLua_wxHtmlTag_GetName, 0, 0, {0} }, { LuaMethod, "GetParam", wxLua_wxHtmlTag_GetParam, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, { LuaMethod, "HasEnding", wxLua_wxHtmlTag_HasEnding, 0, 0, { 0 } }, { LuaMethod, "HasParam", wxLua_wxHtmlTag_HasParam, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaDelete, "wxHtmlTag", wxLua_wxHtmlTag_destructor, 0, 0, {0} }, }; --- 777,797 ---- static WXLUAMETHOD s_wxHtmlTag_methods[] = { ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) { LuaMethod, "GetParamAsColour", wxLua_wxHtmlTag_GetParamAsColour, 2, 2, { &s_wxluaarg_String, &s_wxluatag_wxColour, 0 } }, #endif { LuaMethod, "GetAllParams", wxLua_wxHtmlTag_GetAllParams, 0, 0, { 0 } }, { LuaMethod, "GetBeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, { 0 } }, { LuaMethod, "GetEndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, { 0 } }, { LuaMethod, "GetEndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, { 0 } }, { LuaMethod, "GetName", wxLua_wxHtmlTag_GetName, 0, 0, { 0 } }, { LuaMethod, "GetParam", wxLua_wxHtmlTag_GetParam, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Boolean, 0 } }, + { LuaMethod, "GetParamAsInt", wxLua_wxHtmlTag_GetParamAsInt, 2, 2, { &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "HasEnding", wxLua_wxHtmlTag_HasEnding, 0, 0, { 0 } }, { LuaMethod, "HasParam", wxLua_wxHtmlTag_HasParam, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaGetProp, "BeginPos", wxLua_wxHtmlTag_GetBeginPos, 0, 0, {0} }, + { LuaGetProp, "EndPos1", wxLua_wxHtmlTag_GetEndPos1, 0, 0, {0} }, + { LuaGetProp, "EndPos2", wxLua_wxHtmlTag_GetEndPos2, 0, 0, {0} }, + { LuaGetProp, "Name", wxLua_wxHtmlTag_GetName, 0, 0, {0} }, { LuaDelete, "wxHtmlTag", wxLua_wxHtmlTag_destructor, 0, 0, {0} }, }; *************** *** 804,808 **** --- 812,853 ---- + #if ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxHTML) + // %wxchkver22&!%wxchkver25 wxHtmlCell* GetFirstCell() + static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L) + { + wxLuaState wxlState(L); + wxHtmlCell *returns; + // get this + wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); + // call GetFirstCell + returns = self->GetFirstCell(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); + + return 1; + } + + #endif + + #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) + // wxColour GetBackgroundColour() + static int LUACALL wxLua_wxHtmlContainerCell_GetBackgroundColour(lua_State *L) + { + wxLuaState wxlState(L); + wxColour *returns; + // get this + wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); + // call GetBackgroundColour + // allocate a new object using the copy constructor + returns = new wxColour(self->GetBackgroundColour()); + // add the new object to the tracked memory list + wxLua_AddToTrackedMemoryList(wxlState, (wxColour *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxColour, returns); + + return 1; + } + // void SetBackgroundColour(const wxColour& clr) static int LUACALL wxLua_wxHtmlContainerCell_SetBackgroundColour(lua_State *L) *************** *** 838,860 **** - #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxHTML)) - // %wxchkver22&!%wxchkver25|%wxcompat24 wxHtmlCell* GetFirstCell() - static int LUACALL wxLua_wxHtmlContainerCell_GetFirstCell(lua_State *L) - { - wxLuaState wxlState(L); - wxHtmlCell *returns; - // get this - wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); - // call GetFirstCell - returns = self->GetFirstCell(); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxHtmlCell, returns); - - return 1; - } - - #endif - - #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) // %wxchkver25 wxHtmlCell* GetFirstChild() --- 883,886 ---- *************** *** 982,1009 **** } ! // void SetAlignHor(int align) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignHor(lua_State *L) { wxLuaState wxlState(L); ! // int align ! int align = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignHor ! self->SetAlignHor(align); return 0; } ! // void SetAlignVer(int align) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignVer(lua_State *L) { wxLuaState wxlState(L); ! // int align ! int align = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignVer ! self->SetAlignVer(align); return 0; --- 1008,1035 ---- } ! // void SetAlignHor(int al) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignHor(lua_State *L) { wxLuaState wxlState(L); ! // int al ! int al = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignHor ! self->SetAlignHor(al); return 0; } ! // void SetAlignVer(int al) static int LUACALL wxLua_wxHtmlContainerCell_SetAlignVer(lua_State *L) { wxLuaState wxlState(L); ! // int al ! int al = (int)wxlState.GetNumberType(2); // get this wxHtmlContainerCell * self = (wxHtmlContainerCell *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlContainerCell); // call SetAlignVer ! self->SetAlignVer(al); return 0; *************** *** 1094,1106 **** static WXLUAMETHOD s_wxHtmlContainerCell_methods[] = { ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) ! { LuaMethod, "SetBackgroundColour", wxLua_wxHtmlContainerCell_SetBackgroundColour, 1, 1, { &s_wxluatag_wxColour, 0 } }, ! { LuaMethod, "SetBorder", wxLua_wxHtmlContainerCell_SetBorder, 2, 2, { &s_wxluatag_wxColour, &s_wxluatag_wxColour, 0 } }, #endif ! #if (wxLUA_USE_wxHTML) && ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxHTML)) ! { LuaMethod, "GetFirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, { 0 } }, ! { LuaGetProp, "FirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, {0} }, #endif --- 1120,1133 ---- static WXLUAMETHOD s_wxHtmlContainerCell_methods[] = { ! #if ((wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0)) && (wxLUA_USE_wxHTML)) && (wxLUA_USE_wxHTML) ! { LuaMethod, "GetFirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, { 0 } }, ! { LuaGetProp, "FirstCell", wxLua_wxHtmlContainerCell_GetFirstCell, 0, 0, {0} }, #endif ! #if (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxHTML) ! { LuaMethod, "GetBackgroundColour", wxLua_wxHtmlContainerCell_GetBackgroundColour, 0, 0, { 0 } }, ! { LuaMethod, "SetBackgroundColour", wxLua_wxHtmlContainerCell_SetBackgroundColour, 1, 1, { &s_wxluatag_wxColour, 0 } }, ! { LuaMethod, "SetBorder", wxLua_wxHtmlContainerCell_SetBorder, 2, 2, { &s_wxluatag_wxColour, &s_wxluatag_wxColour, 0 } }, #endif *************** *** 1118,1130 **** { LuaMethod, "SetAlign", wxLua_wxHtmlContainerCell_SetAlign, 1, 1, { &s_wxluatag_wxHtmlTag, 0 } }, { LuaMethod, "SetAlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaGetProp, "AlignHor", wxLua_wxHtmlContainerCell_GetAlignHor, 0, 0, {0} }, - { LuaSetProp, "AlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, {0} }, { LuaMethod, "SetAlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, { &s_wxluaarg_Number, 0 } }, - { LuaGetProp, "AlignVer", wxLua_wxHtmlContainerCell_GetAlignVer, 0, 0, {0} }, - { LuaSetProp, "AlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, {0} }, { LuaMethod, "SetIndent", wxLua_wxHtmlContainerCell_SetIndent, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetMinHeight", wxLua_wxHtmlContainerCell_SetMinHeight, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloat", wxLua_wxHtmlContainerCell_SetWidthFloat, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloatFromTag", wxLua_wxHtmlContainerCell_SetWidthFloatFromTag, 2, 1, { &s_wxluatag_wxHtmlTag, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlContainerCell", wxLua_wxHtmlContainerCell_destructor, 0, 0, {0} }, }; --- 1145,1157 ---- { LuaMethod, "SetAlign", wxLua_wxHtmlContainerCell_SetAlign, 1, 1, { &s_wxluatag_wxHtmlTag, 0 } }, { LuaMethod, "SetAlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetAlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetIndent", wxLua_wxHtmlContainerCell_SetIndent, 3, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetMinHeight", wxLua_wxHtmlContainerCell_SetMinHeight, 2, 1, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloat", wxLua_wxHtmlContainerCell_SetWidthFloat, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetWidthFloatFromTag", wxLua_wxHtmlContainerCell_SetWidthFloatFromTag, 2, 1, { &s_wxluatag_wxHtmlTag, &s_wxluaarg_Number, 0 } }, + { LuaGetProp, "AlignHor", wxLua_wxHtmlContainerCell_GetAlignHor, 0, 0, {0} }, + { LuaSetProp, "AlignHor", wxLua_wxHtmlContainerCell_SetAlignHor, 1, 1, {0} }, + { LuaGetProp, "AlignVer", wxLua_wxHtmlContainerCell_GetAlignVer, 0, 0, {0} }, + { LuaSetProp, "AlignVer", wxLua_wxHtmlContainerCell_SetAlignVer, 1, 1, {0} }, { LuaDelete, "wxHtmlContainerCell", wxLua_wxHtmlContainerCell_destructor, 0, 0, {0} }, }; *************** *** 1278,1281 **** --- 1305,1329 ---- + #if (wxLUA_USE_wxFileName) && (wxLUA_USE_wxHTML) + // virtual bool LoadFile(const wxFileName& filename) + static int LUACALL wxLua_wxHtmlWindow_LoadFile(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxFileName filename + const wxFileName * filename = (const wxFileName *)wxlState.GetUserDataType(2, s_wxluatag_wxFileName); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call LoadFile + returns = self->LoadFile(*filename); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif + + #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) // wxFrame* GetRelatedFrame() const *************** *** 1314,1318 **** #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) ! // wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "htmlWindow") static int LUACALL wxLua_wxHtmlWindow_constructor(lua_State *L) { --- 1362,1366 ---- #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) ! // wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, const wxString& name = "wxHtmlWindow") static int LUACALL wxLua_wxHtmlWindow_constructor(lua_State *L) { *************** *** 1321,1326 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString name = "htmlWindow" ! const wxString name = (argCount >= 6 ? lua2wx(wxlState.GetStringType(6)) : wxString(wxT("htmlWindow"))); // long style = wxHW_SCROLLBAR_AUTO long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxHW_SCROLLBAR_AUTO); --- 1369,1374 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString name = "wxHtmlWindow" ! const wxString name = (argCount >= 6 ? lua2wx(wxlState.GetStringType(6)) : wxString(wxT("wxHtmlWindow"))); // long style = wxHW_SCROLLBAR_AUTO long style = (argCount >= 5 ? (long)wxlState.GetNumberType(5) : wxHW_SCROLLBAR_AUTO); *************** *** 1344,1347 **** --- 1392,1423 ---- } + // void SelectLine(const wxPoint& pos) + static int LUACALL wxLua_wxHtmlWindow_SelectLine(lua_State *L) + { + wxLuaState wxlState(L); + // const wxPoint pos + const wxPoint * pos = (const wxPoint *)wxlState.GetUserDataType(2, s_wxluatag_wxPoint); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectLine + self->SelectLine(*pos); + + return 0; + } + + // void SelectWord(const wxPoint& pos) + static int LUACALL wxLua_wxHtmlWindow_SelectWord(lua_State *L) + { + wxLuaState wxlState(L); + // const wxPoint pos + const wxPoint * pos = (const wxPoint *)wxlState.GetUserDataType(2, s_wxluatag_wxPoint); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectWord + self->SelectWord(*pos); + + return 0; + } + #endif *************** *** 1423,1426 **** --- 1499,1529 ---- } + // void SelectAll() + static int LUACALL wxLua_wxHtmlWindow_SelectAll(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectAll + self->SelectAll(); + + return 0; + } + + // wxString SelectionToText() + static int LUACALL wxLua_wxHtmlWindow_SelectionToText(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call SelectionToText + returns = self->SelectionToText(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + // void SetBorders(int b) static int LUACALL wxLua_wxHtmlWindow_SetBorders(lua_State *L) *************** *** 1524,1527 **** --- 1627,1645 ---- } + // wxString ToText() + static int LUACALL wxLua_wxHtmlWindow_ToText(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxHtmlWindow * self = (wxHtmlWindow *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlWindow); + // call ToText + returns = self->ToText(); + // push the result string + lua_pushstring(L, wx2lua(returns) ); + + return 1; + } + static int LUACALL wxLua_wxHtmlWindow_destructor(lua_State *) { *************** *** 1552,1559 **** #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) { LuaMethod, "GetRelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, { 0 } }, - { LuaGetProp, "RelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, {0} }, { LuaMethod, "SetRelatedFrame", wxLua_wxHtmlWindow_SetRelatedFrame, 2, 2, { &s_wxluatag_wxFrame, &s_wxluaarg_String, 0 } }, #endif --- 1670,1682 ---- + #if (wxLUA_USE_wxFileName) && (wxLUA_USE_wxHTML) + { LuaMethod, "LoadFile", wxLua_wxHtmlWindow_LoadFile, 1, 1, { &s_wxluatag_wxFileName, 0 } }, + #endif + + #if (wxLUA_USE_wxFrame) && (wxLUA_USE_wxHTML) { LuaMethod, "GetRelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, { 0 } }, { LuaMethod, "SetRelatedFrame", wxLua_wxHtmlWindow_SetRelatedFrame, 2, 2, { &s_wxluatag_wxFrame, &s_wxluaarg_String, 0 } }, + { LuaGetProp, "RelatedFrame", wxLua_wxHtmlWindow_GetRelatedFrame, 0, 0, {0} }, #endif *************** *** 1561,1579 **** #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) { LuaConstructor, "wxHtmlWindow", wxLua_wxHtmlWindow_constructor, 6, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, #endif { LuaMethod, "GetInternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, { 0 } }, - { LuaGetProp, "InternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, {0} }, { LuaMethod, "GetOpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, { 0 } }, - { LuaGetProp, "OpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, {0} }, { LuaMethod, "GetOpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, { 0 } }, - { LuaGetProp, "OpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, {0} }, { LuaMethod, "GetOpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, { 0 } }, - { LuaGetProp, "OpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, {0} }, { LuaMethod, "LoadPage", wxLua_wxHtmlWindow_LoadPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetBorders", wxLua_wxHtmlWindow_SetBorders, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetFonts", wxLua_wxHtmlWindow_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "SetPage", wxLua_wxHtmlWindow_SetPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetRelatedStatusBar", wxLua_wxHtmlWindow_SetRelatedStatusBar, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlWindow", wxLua_wxHtmlWindow_destructor, 0, 0, {0} }, }; --- 1684,1707 ---- #if (wxLUA_USE_wxPointSizeRect) && (wxLUA_USE_wxHTML) { LuaConstructor, "wxHtmlWindow", wxLua_wxHtmlWindow_constructor, 6, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, + { LuaMethod, "SelectLine", wxLua_wxHtmlWindow_SelectLine, 1, 1, { &s_wxluatag_wxPoint, 0 } }, + { LuaMethod, "SelectWord", wxLua_wxHtmlWindow_SelectWord, 1, 1, { &s_wxluatag_wxPoint, 0 } }, #endif { LuaMethod, "GetInternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, { 0 } }, { LuaMethod, "GetOpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, { 0 } }, { LuaMethod, "GetOpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, { 0 } }, { LuaMethod, "GetOpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, { 0 } }, { LuaMethod, "LoadPage", wxLua_wxHtmlWindow_LoadPage, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SelectAll", wxLua_wxHtmlWindow_SelectAll, 0, 0, { 0 } }, + { LuaMethod, "SelectionToText", wxLua_wxHtmlWindow_SelectionToText, 0, 0, { 0 } }, { LuaMethod, "SetBorders", wxLua_wxHtmlWindow_SetBorders, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "SetFonts", wxLua_wxHtmlWindow_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, { LuaMethod, "SetPage", wxLua_wxHtmlWindow_SetPage, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaMethod, "SetRelatedStatusBar", wxLua_wxHtmlWindow_SetRelatedStatusBar, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "ToText", wxLua_wxHtmlWindow_ToText, 0, 0, { 0 } }, + { LuaGetProp, "InternalRepresentation", wxLua_wxHtmlWindow_GetInternalRepresentation, 0, 0, {0} }, + { LuaGetProp, "OpenedAnchor", wxLua_wxHtmlWindow_GetOpenedAnchor, 0, 0, {0} }, + { LuaGetProp, "OpenedPage", wxLua_wxHtmlWindow_GetOpenedPage, 0, 0, {0} }, + { LuaGetProp, "OpenedPageTitle", wxLua_wxHtmlWindow_GetOpenedPageTitle, 0, 0, {0} }, { LuaDelete, "wxHtmlWindow", wxLua_wxHtmlWindow_destructor, 0, 0, {0} }, }; *************** *** 2231,2237 **** { LuaMethod, "GetLinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, { 0 } }, { LuaMethod, "SetActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "ActualColor", wxLua_wxHtmlWinParser_GetActualColor, 0, 0, {0} }, { LuaSetProp, "ActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, {0} }, - { LuaMethod, "SetLinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "LinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, {0} }, { LuaSetProp, "LinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, {0} }, --- 2359,2365 ---- { LuaMethod, "GetLinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, { 0 } }, { LuaMethod, "SetActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, + { LuaMethod, "SetLinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaGetProp, "ActualColor", wxLua_wxHtmlWinParser_GetActualColor, 0, 0, {0} }, { LuaSetProp, "ActualColor", wxLua_wxHtmlWinParser_SetActualColor, 1, 1, {0} }, { LuaGetProp, "LinkColor", wxLua_wxHtmlWinParser_GetLinkColor, 0, 0, {0} }, { LuaSetProp, "LinkColor", wxLua_wxHtmlWinParser_SetLinkColor, 1, 1, {0} }, *************** *** 2265,2296 **** { LuaMethod, "GetLink", wxLua_wxHtmlWinParser_GetLink, 0, 0, { 0 } }, { LuaMethod, "GetWindow", wxLua_wxHtmlWinParser_GetWindow, 0, 0, { 0 } }, - { LuaGetProp, "Window", wxLua_wxHtmlWinParser_GetWindow, 0, 0, {0} }, { LuaMethod, "OpenContainer", wxLua_wxHtmlWinParser_OpenContainer, 0, 0, { 0 } }, { LuaMethod, "SetAlign", wxLua_wxHtmlWinParser_SetAlign, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "Align", wxLua_wxHtmlWinParser_GetAlign, 0, 0, {0} }, { LuaSetProp, "Align", wxLua_wxHtmlWinParser_SetAlign, 1, 1, {0} }, - { LuaMethod, "SetContainer", wxLua_wxHtmlWinParser_SetContainer, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, { LuaGetProp, "Container", wxLua_wxHtmlWinParser_GetContainer, 0, 0, {0} }, { LuaSetProp, "Container", wxLua_wxHtmlWinParser_SetContainer, 1, 1, {0} }, - { LuaMethod, "SetFontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontBold", wxLua_wxHtmlWinParser_GetFontBold, 0, 0, {0} }, { LuaSetProp, "FontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, {0} }, - { LuaMethod, "SetFontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaGetProp, "FontFace", wxLua_wxHtmlWinParser_GetFontFace, 0, 0, {0} }, { LuaSetProp, "FontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, {0} }, - { LuaMethod, "SetFontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontFixed", wxLua_wxHtmlWinParser_GetFontFixed, 0, 0, {0} }, { LuaSetProp, "FontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, {0} }, - { LuaMethod, "SetFontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontItalic", wxLua_wxHtmlWinParser_GetFontItalic, 0, 0, {0} }, { LuaSetProp, "FontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, {0} }, - { LuaMethod, "SetFontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontSize", wxLua_wxHtmlWinParser_GetFontSize, 0, 0, {0} }, { LuaSetProp, "FontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, {0} }, - { LuaMethod, "SetFontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "FontUnderlined", wxLua_wxHtmlWinParser_GetFontUnderlined, 0, 0, {0} }, { LuaSetProp, "FontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, {0} }, - { LuaMethod, "SetFonts", wxLua_wxHtmlWinParser_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, - { LuaMethod, "SetLink", wxLua_wxHtmlWinParser_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, { LuaGetProp, "Link", wxLua_wxHtmlWinParser_GetLink, 0, 0, {0} }, { LuaSetProp, "Link", wxLua_wxHtmlWinParser_SetLink, 1, 1, {0} }, --- 2393,2424 ---- { LuaMethod, "GetLink", wxLua_wxHtmlWinParser_GetLink, 0, 0, { 0 } }, { LuaMethod, "GetWindow", wxLua_wxHtmlWinParser_GetWindow, 0, 0, { 0 } }, { LuaMethod, "OpenContainer", wxLua_wxHtmlWinParser_OpenContainer, 0, 0, { 0 } }, { LuaMethod, "SetAlign", wxLua_wxHtmlWinParser_SetAlign, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetContainer", wxLua_wxHtmlWinParser_SetContainer, 1, 1, { &s_wxluatag_wxHtmlContainerCell, 0 } }, + { LuaMethod, "SetFontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, { &s_wxluaarg_String, 0 } }, + { LuaMethod, "SetFontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, { &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFonts", wxLua_wxHtmlWinParser_SetFonts, 3, 3, { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_LightUserData, 0 } }, + { LuaMethod, "SetLink", wxLua_wxHtmlWinParser_SetLink, 1, 1, { &s_wxluatag_wxHtmlLinkInfo, 0 } }, + { LuaGetProp, "Window", wxLua_wxHtmlWinParser_GetWindow, 0, 0, {0} }, { LuaGetProp, "Align", wxLua_wxHtmlWinParser_GetAlign, 0, 0, {0} }, { LuaSetProp, "Align", wxLua_wxHtmlWinParser_SetAlign, 1, 1, {0} }, { LuaGetProp, "Container", wxLua_wxHtmlWinParser_GetContainer, 0, 0, {0} }, { LuaSetProp, "Container", wxLua_wxHtmlWinParser_SetContainer, 1, 1, {0} }, { LuaGetProp, "FontBold", wxLua_wxHtmlWinParser_GetFontBold, 0, 0, {0} }, { LuaSetProp, "FontBold", wxLua_wxHtmlWinParser_SetFontBold, 1, 1, {0} }, { LuaGetProp, "FontFace", wxLua_wxHtmlWinParser_GetFontFace, 0, 0, {0} }, { LuaSetProp, "FontFace", wxLua_wxHtmlWinParser_SetFontFace, 1, 1, {0} }, { LuaGetProp, "FontFixed", wxLua_wxHtmlWinParser_GetFontFixed, 0, 0, {0} }, { LuaSetProp, "FontFixed", wxLua_wxHtmlWinParser_SetFontFixed, 1, 1, {0} }, { LuaGetProp, "FontItalic", wxLua_wxHtmlWinParser_GetFontItalic, 0, 0, {0} }, { LuaSetProp, "FontItalic", wxLua_wxHtmlWinParser_SetFontItalic, 1, 1, {0} }, { LuaGetProp, "FontSize", wxLua_wxHtmlWinParser_GetFontSize, 0, 0, {0} }, { LuaSetProp, "FontSize", wxLua_wxHtmlWinParser_SetFontSize, 1, 1, {0} }, { LuaGetProp, "FontUnderlined", wxLua_wxHtmlWinParser_GetFontUnderlined, 0, 0, {0} }, { LuaSetProp, "FontUnderlined", wxLua_wxHtmlWinParser_SetFontUnderlined, 1, 1, {0} }, { LuaGetProp, "Link", wxLua_wxHtmlWinParser_GetLink, 0, 0, {0} }, { LuaSetProp, "Link", wxLua_wxHtmlWinParser_SetLink, 1, 1, {0} }, *************** *** 2365,2369 **** } ! // void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) static int LUACALL wxLua_wxHtmlDCRenderer_SetHtmlText(lua_State *L) { --- 2493,2497 ---- } ! // void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) static int LUACALL wxLua_wxHtmlDCRenderer_SetHtmlText(lua_State *L) { *************** *** 2373,2377 **** // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html --- 2501,2505 ---- // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html *************** *** 2577,2581 **** } ! // bool PreviewText(const wxString& htmltext, const wxString& basepath = wxEmptyString) static int LUACALL wxLua_wxHtmlEasyPrinting_PreviewText(lua_State *L) { --- 2705,2709 ---- } ! // bool PreviewText(const wxString& htmltext, const wxString& basepath = "") static int LUACALL wxLua_wxHtmlEasyPrinting_PreviewText(lua_State *L) { *************** *** 2584,2588 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext --- 2712,2716 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext *************** *** 2615,2619 **** } ! // bool PrintText(const wxString& htmltext, const wxString& basepath = wxEmptyString) static int LUACALL wxLua_wxHtmlEasyPrinting_PrintText(lua_State *L) { --- 2743,2747 ---- } ! // bool PrintText(const wxString& htmltext, const wxString& basepath = "") static int LUACALL wxLua_wxHtmlEasyPrinting_PrintText(lua_State *L) { *************** *** 2622,2626 **** // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext --- 2750,2754 ---- // get number of arguments int argCount = lua_gettop(L); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString htmltext *************** *** 2648,2651 **** --- 2776,2815 ---- } + // void SetHeader(const wxString& header, int pg = wxPAGE_ALL) + static int LUACALL wxLua_wxHtmlEasyPrinting_SetHeader(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // int pg = wxPAGE_ALL + int pg = (argCount >= 3 ? (int)wxlState.GetNumberType(3) : wxPAGE_ALL); + // const wxString header + const wxString header = lua2wx(wxlState.GetStringType(2)); + // get this + wxHtmlEasyPrinting * self = (wxHtmlEasyPrinting *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlEasyPrinting); + // call SetHeader + self->SetHeader(header, pg); + + return 0; + } + + // void SetFooter(const wxString& footer, int pg = wxPAGE_ALL) + static int LUACALL wxLua_wxHtmlEasyPrinting_SetFooter(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // int pg = wxPAGE_ALL + int pg = (argCount >= 3 ? (int)wxlState.GetNumberType(3) : wxPAGE_ALL); + // const wxString footer + const wxString footer = lua2wx(wxlState.GetStringType(2)); + // get this + wxHtmlEasyPrinting * self = (wxHtmlEasyPrinting *)wxlState.GetUserDataType(1, s_wxluatag_wxHtmlEasyPrinting); + // call SetFooter + self->SetFooter(footer, pg); + + return 0; + } + static int LUACALL wxLua_wxHtmlEasyPrinting_destructor(lua_State *L) { *************** *** 2692,2697 **** #if (wxLUA_USE_wxPrint) && (wxLUA_USE_wxHTML) { LuaMethod, "GetPrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, { 0 } }, - { LuaGetProp, "PrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, {0} }, { LuaMethod, "GetPageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, { 0 } }, { LuaGetProp, "PageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, {0} }, #endif --- 2856,2861 ---- #if (wxLUA_USE_wxPrint) && (wxLUA_USE_wxHTML) { LuaMethod, "GetPrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, { 0 } }, { LuaMethod, "GetPageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, { 0 } }, + { LuaGetProp, "PrintData", wxLua_wxHtmlEasyPrinting_GetPrintData, 0, 0, {0} }, { LuaGetProp, "PageSetupData", wxLua_wxHtmlEasyPrinting_GetPageSetupData, 0, 0, {0} }, #endif *************** *** 2702,2705 **** --- 2866,2871 ---- { LuaMethod, "PrintText", wxLua_wxHtmlEasyPrinting_PrintText, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_String, 0 } }, { LuaMethod, "PageSetup", wxLua_wxHtmlEasyPrinting_PageSetup, 0, 0, { 0 } }, + { LuaMethod, "SetHeader", wxLua_wxHtmlEasyPrinting_SetHeader, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, + { LuaMethod, "SetFooter", wxLua_wxHtmlEasyPrinting_SetFooter, 2, 1, { &s_wxluaarg_String, &s_wxluaarg_Number, 0 } }, { LuaDelete, "wxHtmlEasyPrinting", wxLua_wxHtmlEasyPrinting_destructor, 0, 0, {0} }, { LuaMethod, "Delete", wxLua_wxHtmlEasyPrinting_Delete, 0, 0, {0} }, *************** *** 2787,2791 **** } ! // void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = true) static int LUACALL wxLua_wxHtmlPrintout_SetHtmlText(lua_State *L) { --- 2953,2957 ---- } ! // void SetHtmlText(const wxString& html, const wxString& basepath = "", bool isdir = true) static int LUACALL wxLua_wxHtmlPrintout_SetHtmlText(lua_State *L) { *************** *** 2795,2799 **** // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = wxEmptyString const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html --- 2961,2965 ---- // bool isdir = true bool isdir = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); ! // const wxString basepath = "" const wxString basepath = (argCount >= 3 ? lua2wx(wxlState.GetStringType(3)) : wxString(wxEmptyString)); // const wxString html Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wx_bind.cpp 4 May 2006 05:07:03 -0000 1.32 --- wx_bind.cpp 5 May 2006 22:02:44 -0000 1.33 *************** *** 995,998 **** --- 995,1001 ---- { "wxHTML_ALIGN_RIGHT", wxHTML_ALIGN_RIGHT }, { "wxHTML_ALIGN_TOP", wxHTML_ALIGN_TOP }, + { "wxHTML_COND_ISANCHOR", wxHTML_COND_ISANCHOR }, + { "wxHTML_COND_ISIMAGEMAP", wxHTML_COND_ISIMAGEMAP }, + { "wxHTML_COND_USER", wxHTML_COND_USER }, { "wxHTML_INDENT_ALL", wxHTML_INDENT_ALL }, { "wxHTML_INDENT_BOTTOM", wxHTML_INDENT_BOTTOM }, |