From: John L. <jr...@us...> - 2005-11-25 02:43:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25355/wxLua/modules/wxbind/src Modified Files: luasetup.h wxlhtmlwin.cpp wxlprint.cpp Log Message: started to break up internal.cpp into wxlstate, wxlcallb... rename library.h/cpp to wxlhandl since it only contains wxLuaHandler remove wxLuaApp code, it doesn't exist anymore compiles and runs in linux Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxlprint.cpp 18 Jun 2005 20:53:41 -0000 1.1 --- wxlprint.cpp 25 Nov 2005 02:43:01 -0000 1.2 *************** *** 24,31 **** #include "wx/datetime.h" ! #include "wxlua/include/callback.h" #include "wxlua/include/internal.h" #include "wxbind/include/wxlprint.h" // forward reference class wxLuaObject; --- 24,34 ---- #include "wx/datetime.h" ! #include "wxlua/include/wxlcallb.h" #include "wxlua/include/internal.h" + #include "luasetup.h" #include "wxbind/include/wxlprint.h" + #if wxLUA_USE_wxLuaPrintout + // forward reference class wxLuaObject; *************** *** 59,63 **** void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) ! { lua_State *luaState = getDerivedMethod(this, "GetPageInfo"); if (luaState != NULL) --- 62,66 ---- void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) ! { lua_State *luaState = getDerivedMethod(this, "GetPageInfo"); if (luaState != NULL) *************** *** 65,76 **** int nOldTop = lua_gettop(luaState); tpushusertag(luaState, this, s_wxLuaPrintout); ! LuaCall(luaState, 1, false); ! *minPage = (int) lua_tonumber(luaState, -4); *maxPage = (int) lua_tonumber(luaState, -3); *pageFrom = (int) lua_tonumber(luaState, -2); *pageTo = (int) lua_tonumber(luaState, -1); ! lua_settop(luaState, nOldTop); } --- 68,79 ---- int nOldTop = lua_gettop(luaState); tpushusertag(luaState, this, s_wxLuaPrintout); ! LuaCall(luaState, 1, false); ! *minPage = (int) lua_tonumber(luaState, -4); *maxPage = (int) lua_tonumber(luaState, -3); *pageFrom = (int) lua_tonumber(luaState, -2); *pageTo = (int) lua_tonumber(luaState, -1); ! lua_settop(luaState, nOldTop); } *************** *** 93,99 **** tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); ! LuaCall(luaState, 2, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_settop(luaState, nOldTop); --- 96,102 ---- tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); ! LuaCall(luaState, 2, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_settop(luaState, nOldTop); *************** *** 107,111 **** { bool fResult = true; ! lua_State *luaState = getDerivedMethod(this, "OnBeginDocument"); if (luaState != NULL) --- 110,114 ---- { bool fResult = true; ! lua_State *luaState = getDerivedMethod(this, "OnBeginDocument"); if (luaState != NULL) *************** *** 115,121 **** lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); ! LuaCall(luaState, 3, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_pop(luaState, 1); --- 118,124 ---- lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); ! LuaCall(luaState, 3, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_pop(luaState, 1); *************** *** 123,127 **** } else ! fResult = wxPrintout::OnBeginDocument(startPage, endPage); return fResult; --- 126,130 ---- } else ! fResult = wxPrintout::OnBeginDocument(startPage, endPage); return fResult; *************** *** 134,138 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 137,141 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 148,152 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 151,155 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 162,166 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 165,169 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 176,180 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 179,183 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 193,199 **** tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); ! LuaCall(luaState, 2, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_settop(luaState, nOldTop); --- 196,202 ---- tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); ! LuaCall(luaState, 2, false); ! fResult = (lua_toboolean(luaState, -1) != false); lua_settop(luaState, nOldTop); *************** *** 201,202 **** --- 204,207 ---- return fResult; } + + #endif // wxLUA_USE_wxLuaPrintout Index: luasetup.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/luasetup.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luasetup.h 18 Jun 2005 21:07:54 -0000 1.1 --- luasetup.h 25 Nov 2005 02:43:01 -0000 1.2 *************** *** 62,66 **** #define wxLUA_USE_wxListBox 1 #define wxLUA_USE_wxListCtrl 1 - #define wxLUA_USE_wxLuaApp 1 #define wxLUA_USE_wxLuaDebugServer 1 #define wxLUA_USE_wxLuaHtmlWindow 1 --- 62,65 ---- Index: wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlhtmlwin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxlhtmlwin.cpp 18 Jun 2005 20:53:41 -0000 1.1 --- wxlhtmlwin.cpp 25 Nov 2005 02:43:01 -0000 1.2 *************** *** 24,32 **** #include "wx/datetime.h" ! #include "wxbind/include/wxlhtmlwin.h" ! #include "wxlua/include/callback.h" #include "wxlua/include/internal.h" ! // These are the wxLua tags defined in wxLuaWrap.cpp extern int s_wxLuaHtmlWindow; extern int s_wxHtmlCell; --- 24,35 ---- #include "wx/datetime.h" ! #include "wxlua/include/wxlcallb.h" #include "wxlua/include/internal.h" + #include "luasetup.h" + #include "wxbind/include/wxlhtmlwin.h" ! #if wxLUA_USE_wxHTML ! ! // These are the wxLua tags defined in wxbind extern int s_wxLuaHtmlWindow; extern int s_wxHtmlCell; *************** *** 53,61 **** } ! wxLuaHtmlWindow::wxLuaHtmlWindow(wxWindow *parent, ! wxWindowID id, ! const wxPoint& pos, ! const wxSize& size, ! long style, const wxString& name) : wxHtmlWindow(parent, id, pos, size, style, name) --- 56,64 ---- } ! wxLuaHtmlWindow::wxLuaHtmlWindow(wxWindow *parent, ! wxWindowID id, ! const wxPoint& pos, ! const wxSize& size, ! long style, const wxString& name) : wxHtmlWindow(parent, id, pos, size, style, name) *************** *** 75,84 **** lua_pushnumber(luaState, y); tpushusertag(luaState, (void *) &event, s_wxMouseEvent); ! LuaCall(luaState, 5, false); ! fResult = (lua_tonumber(luaState, -1) != 0); lua_settop(luaState, nOldTop); ! if (fResult) wxHtmlWindow::OnCellClicked(cell, x, y, event); --- 78,87 ---- lua_pushnumber(luaState, y); tpushusertag(luaState, (void *) &event, s_wxMouseEvent); ! LuaCall(luaState, 5, false); ! fResult = (lua_tonumber(luaState, -1) != 0); lua_settop(luaState, nOldTop); ! if (fResult) wxHtmlWindow::OnCellClicked(cell, x, y, event); *************** *** 98,102 **** lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! LuaCall(luaState, 4, true); lua_settop(luaState, nOldTop); --- 101,105 ---- lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! LuaCall(luaState, 4, true); lua_settop(luaState, nOldTop); *************** *** 114,118 **** tpushusertag(luaState, this, s_wxLuaHtmlWindow); tpushusertag(luaState, (void *) &link, s_wxHtmlLinkInfo); ! LuaCall(luaState, 2, true); lua_settop(luaState, nOldTop); --- 117,121 ---- tpushusertag(luaState, this, s_wxLuaHtmlWindow); tpushusertag(luaState, (void *) &link, s_wxHtmlLinkInfo); ! LuaCall(luaState, 2, true); lua_settop(luaState, nOldTop); *************** *** 130,134 **** tpushusertag(luaState, this, s_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); ! LuaCall(luaState, 2, true); lua_settop(luaState, nOldTop); --- 133,137 ---- tpushusertag(luaState, this, s_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); ! LuaCall(luaState, 2, true); lua_settop(luaState, nOldTop); *************** *** 148,152 **** { } ! wxString GetSupportedTags() { --- 151,155 ---- { } ! wxString GetSupportedTags() { *************** *** 158,165 **** wxLuaHtmlWinTagEvent htmlEvent(wxEVT_HTML_TAG_HANDLER); htmlEvent.SetTagInfo(&tag, m_WParser); ! if (wxTheApp->ProcessEvent(htmlEvent)) return htmlEvent.GetParseInnerCalled(); ! return FALSE; } --- 161,168 ---- wxLuaHtmlWinTagEvent htmlEvent(wxEVT_HTML_TAG_HANDLER); htmlEvent.SetTagInfo(&tag, m_WParser); ! if (wxTheApp->ProcessEvent(htmlEvent)) return htmlEvent.GetParseInnerCalled(); ! return FALSE; } *************** *** 196,200 **** m_fParseInnerCalled(false) { ! SetEventType(eventType); } --- 199,203 ---- m_fParseInnerCalled(false) { ! SetEventType(eventType); } *************** *** 203,207 **** } ! void wxLuaHtmlWinTagEvent::SetTagInfo(const wxHtmlTag *pHtmlTag, wxHtmlWinParser *pParser) { --- 206,210 ---- } ! void wxLuaHtmlWinTagEvent::SetTagInfo(const wxHtmlTag *pHtmlTag, wxHtmlWinParser *pParser) { *************** *** 241,242 **** --- 244,247 ---- m_fParseInnerCalled = fParseInnerCalled; } + + #endif //wxLUA_USE_wxHTML |