From: John L. <jr...@us...> - 2006-05-14 17:45:10
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21439/wxLua/modules/wxlua/src Modified Files: wxlcallb.cpp Log Message: init all image handlers in luamodule to make things easy simplify wxLuaSmartXXX by adding operator type*() so it can be used as is fix lua callback to clear the correct wxluastate and some formatting add destroy handler list to things shown in the stacktree and show items for them Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxlcallb.cpp 2 May 2006 05:25:06 -0000 1.16 --- wxlcallb.cpp 14 May 2006 17:45:05 -0000 1.17 *************** *** 34,45 **** IMPLEMENT_ABSTRACT_CLASS(wxLuaCallback, wxEvtHandler) ! wxLuaCallback::wxLuaCallback( const wxLuaState& state, ! int theRoutine, ! wxWindowID id, ! wxEventType eventType, wxEvtHandler *pEvtHandler ) ! : m_wxlState(state), ! m_pHandler(pEvtHandler), ! m_id(id), m_eventType(eventType) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); --- 34,43 ---- IMPLEMENT_ABSTRACT_CLASS(wxLuaCallback, wxEvtHandler) ! wxLuaCallback::wxLuaCallback( const wxLuaState& state, int theRoutine, ! wxWindowID id, wxEventType eventType, wxEvtHandler *pEvtHandler ) ! : wxEvtHandler(), m_wxlState(state), ! m_pHandler(pEvtHandler), m_id(id), ! m_eventType(eventType) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); *************** *** 47,52 **** m_routine = m_wxlState.tinsert(theRoutine); ! pEvtHandler->Connect( id, ! eventType, (wxObjectEventFunction)&wxLuaCallback::EventHandler, this); --- 45,49 ---- m_routine = m_wxlState.tinsert(theRoutine); ! pEvtHandler->Connect( id, eventType, (wxObjectEventFunction)&wxLuaCallback::EventHandler, this); *************** *** 71,75 **** wxLuaCallback *theCallback = (wxLuaCallback *) event.m_callbackUserData; ! wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaCallback in user data")); if (!theCallback || !theCallback->GetwxLuaState().Ok()) return; --- 68,72 ---- wxLuaCallback *theCallback = (wxLuaCallback *) event.m_callbackUserData; ! wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaCallback in wxEvent user data")); if (!theCallback || !theCallback->GetwxLuaState().Ok()) return; *************** *** 83,87 **** wxlState.RemoveTrackedWindow((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it ! wxlState.RemoveTrackedEventHandler(this); // Disconnect all callbacks associated with this window's evthandler --- 80,84 ---- wxlState.RemoveTrackedWindow((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it ! wxlState.RemoveTrackedEventHandler(theCallback); // Disconnect all callbacks associated with this window's evthandler *************** *** 157,164 **** wxLuaDestroyCallback::wxLuaDestroyCallback(const wxLuaState& state, ! wxWindowID id, ! wxEvtHandler *pHandler, int iTag) ! : m_wxlState(state), m_pHandler(pHandler), m_id(id) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); --- 154,161 ---- wxLuaDestroyCallback::wxLuaDestroyCallback(const wxLuaState& state, ! wxWindowID id, wxEvtHandler *pHandler, int iTag) ! : wxEvtHandler(), m_wxlState(state), ! m_pHandler(pHandler), m_id(id) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); *************** *** 195,200 **** // connect the event handler ! pHandler->Connect(id, ! wxEVT_DESTROY, (wxObjectEventFunction)&wxLuaDestroyCallback::EventHandler, this); --- 192,196 ---- // connect the event handler ! pHandler->Connect(id, wxEVT_DESTROY, (wxObjectEventFunction)&wxLuaDestroyCallback::EventHandler, this); |