From: John L. <jr...@us...> - 2005-11-29 05:45:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/modules/wxbind/src Modified Files: wxlhtmlwin.cpp wxlprint.cpp Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlprint.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlprint.cpp 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 36,40 **** // This lua tag is defined in wxLuaWrap.cpp ! extern int s_wxLuaPrintout; // ---------------------------------------------------------------------------- --- 36,40 ---- // This lua tag is defined in wxLuaWrap.cpp ! extern int s_wxluatag_wxLuaPrintout; // ---------------------------------------------------------------------------- *************** *** 44,54 **** IMPLEMENT_CLASS(wxLuaPrintout, wxPrintout) ! wxLuaPrintout::wxLuaPrintout(const wxString& title, wxLuaObject *pObject) : ! wxPrintout(title), ! m_pObject(pObject), ! m_minPage(0), ! m_maxPage(0), ! m_pageFrom(0), ! m_pageTo(0) { } --- 44,50 ---- IMPLEMENT_CLASS(wxLuaPrintout, wxPrintout) ! wxLuaPrintout::wxLuaPrintout(const wxString& title, wxLuaObject *pObject) ! :wxPrintout(title), m_pObject(pObject), ! m_minPage(0), m_maxPage(0), m_pageFrom(0), m_pageTo(0) { } *************** *** 64,81 **** void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { ! lua_State *luaState = getDerivedMethod(this, "GetPageInfo"); ! if (luaState != NULL) { ! 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); } else --- 60,77 ---- void wxLuaPrintout::GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo) { ! wxLuaState wxlState(wxLuaState::getDerivedMethod(this, "GetPageInfo")); ! if (!wxlState.Ok()) { ! int nOldTop = lua_gettop(wxlState.GetLuaState()); ! wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout); ! wxlState.LuaCall(1, false); ! *minPage = (int) lua_tonumber(wxlState.GetLuaState(), -4); ! *maxPage = (int) lua_tonumber(wxlState.GetLuaState(), -3); ! *pageFrom = (int) lua_tonumber(wxlState.GetLuaState(), -2); ! *pageTo = (int) lua_tonumber(wxlState.GetLuaState(), -1); ! lua_settop(wxlState.GetLuaState(), nOldTop); } else *************** *** 95,99 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); --- 91,95 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, pageNum); *************** *** 116,120 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); --- 112,116 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, startPage); lua_pushnumber(luaState, endPage); *************** *** 138,142 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); --- 134,138 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 152,156 **** { 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_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 166,170 **** { 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_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 180,184 **** { 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_wxluatag_wxLuaPrintout); LuaCall(luaState, 1, true); lua_settop(luaState, nOldTop); *************** *** 195,199 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaPrintout); lua_pushnumber(luaState, pageNum); --- 191,195 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaPrintout); lua_pushnumber(luaState, pageNum); Index: wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlhtmlwin.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlhtmlwin.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlhtmlwin.cpp 29 Nov 2005 05:45:09 -0000 1.4 *************** *** 33,40 **** // These are the wxLua tags defined in wxbind ! extern int s_wxLuaHtmlWindow; ! extern int s_wxHtmlCell; ! extern int s_wxMouseEvent; ! extern int s_wxHtmlLinkInfo; DEFINE_EVENT_TYPE(wxEVT_HTML_TAG_HANDLER) --- 33,40 ---- // These are the wxLua tags defined in wxbind ! extern int s_wxluatag_wxLuaHtmlWindow; ! extern int s_wxluatag_wxHtmlCell; ! extern int s_wxluatag_wxMouseEvent; ! extern int s_wxluatag_wxHtmlLinkInfo; DEFINE_EVENT_TYPE(wxEVT_HTML_TAG_HANDLER) *************** *** 74,82 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! tpushusertag(luaState, (void *) &event, s_wxMouseEvent); LuaCall(luaState, 5, false); --- 74,82 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxluatag_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); ! tpushusertag(luaState, (void *) &event, s_wxluatag_wxMouseEvent); LuaCall(luaState, 5, false); *************** *** 98,103 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); --- 98,103 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, cell, s_wxluatag_wxHtmlCell); lua_pushnumber(luaState, x); lua_pushnumber(luaState, y); *************** *** 116,121 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); ! tpushusertag(luaState, (void *) &link, s_wxHtmlLinkInfo); LuaCall(luaState, 2, true); --- 116,121 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); ! tpushusertag(luaState, (void *) &link, s_wxluatag_wxHtmlLinkInfo); LuaCall(luaState, 2, true); *************** *** 132,136 **** { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); --- 132,136 ---- { int nOldTop = lua_gettop(luaState); ! tpushusertag(luaState, this, s_wxluatag_wxLuaHtmlWindow); lua_pushstring(luaState, wx2lua(title)); |