You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2007-05-23 20:17:31
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxluasocket/src Modified Files: Makefile dservice.cpp Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 19 May 2007 02:05:47 -0000 1.12 --- Makefile 23 May 2007 20:17:25 -0000 1.13 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** dservice.cpp 21 May 2007 01:08:00 -0000 1.33 --- dservice.cpp 23 May 2007 20:17:25 -0000 1.34 *************** *** 15,16 **** --- 15,26 ---- // wxWidgets Socket Sample + #include "wx/wxprec.h" + + #ifdef __BORLANDC__ + #pragma hdrstop + #endif + + #ifndef WX_PRECOMP + #include "wx/wx.h" + #endif + |
From: John L. <jr...@us...> - 2007-05-23 20:17:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxluadebug/src Modified Files: Makefile splttree.cpp Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 19 May 2007 02:05:47 -0000 1.8 --- Makefile 23 May 2007 20:17:24 -0000 1.9 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) Index: splttree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/splttree.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** splttree.cpp 22 May 2007 03:27:54 -0000 1.16 --- splttree.cpp 23 May 2007 20:17:25 -0000 1.17 *************** *** 12,13 **** --- 12,23 ---- // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// + + #include "wx/wxprec.h" + + #ifdef __BORLANDC__ + #pragma hdrstop + #endif + + #ifndef WX_PRECOMP + #include "wx/wx.h" + #endif |
From: John L. <jr...@us...> - 2007-05-23 20:17:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxlua/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile 19 May 2007 02:05:46 -0000 1.11 --- Makefile 23 May 2007 20:17:24 -0000 1.12 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxluadebug/include Modified Files: staktree.h Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** staktree.h 23 May 2007 02:48:31 -0000 1.19 --- staktree.h 23 May 2007 20:17:24 -0000 1.20 *************** *** 11,14 **** --- 11,17 ---- #define _WX_LUA_STACKTREE_H_ + #include "wx/dialog.h" + #include "wx/listctrl.h" + #include "wxluadebug/include/wxluadebugdefs.h" #include "wxluadebug/include/wxldebug.h" |
From: John L. <jr...@us...> - 2007-05-23 20:17:28
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/apps/wxluacan/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile 19 May 2007 02:05:45 -0000 1.10 --- Makefile 23 May 2007 20:17:24 -0000 1.11 *************** *** 33,37 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 33,37 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxluafreeze/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/apps/wxluafreeze/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluafreeze/src/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile 19 May 2007 02:05:45 -0000 1.4 --- Makefile 23 May 2007 20:17:24 -0000 1.5 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxbindstc/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 19 May 2007 02:05:46 -0000 1.8 --- Makefile 23 May 2007 20:17:24 -0000 1.9 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/apps/wxlua/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/Makefile,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile 19 May 2007 02:05:45 -0000 1.20 --- Makefile 23 May 2007 20:17:23 -0000 1.21 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/modules/luamodule/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/luamodule/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/luamodule/src/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 19 May 2007 02:05:45 -0000 1.3 --- Makefile 23 May 2007 20:17:24 -0000 1.4 *************** *** 31,35 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 31,35 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/modules/wxbind/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 19 May 2007 02:05:46 -0000 1.12 --- Makefile 23 May 2007 20:17:24 -0000 1.13 *************** *** 35,39 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 35,39 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 20:17:27
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16138/wxLua/apps/wxluaedit/src Modified Files: Makefile Log Message: Update Makefiles for AMD64, add -fPIC Add temp junk to empty files for nmake.exe, these files will be removed Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Makefile 19 May 2007 02:05:45 -0000 1.12 --- Makefile 23 May 2007 20:17:24 -0000 1.13 *************** *** 32,36 **** # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) --- 32,36 ---- # ---------------------------------------------------------------------------- ! CXXFLAGS = $(WXCXXFLAGS) -MMD -g -Wall -fPIC LDLIBS = $(WXLDLIBS) CXX = $(WXCXX) |
From: John L. <jr...@us...> - 2007-05-23 02:48:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5256/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp wxldebug.cpp Log Message: Make the stack dialog listctrl a little nicer with bold fonts clean up variable names Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** wxldebug.cpp 23 Mar 2007 04:27:24 -0000 1.29 --- wxldebug.cpp 23 May 2007 02:48:31 -0000 1.30 *************** *** 32,42 **** const wxString &itemValue, const wxString &itemSource, ! int nReference, ! int nIndex, ! bool fExpanded) :m_itemName(itemName), m_itemType(itemType), m_itemValue(itemValue), m_itemSource(itemSource), ! m_nReference(nReference), m_nIndex(nIndex), ! m_fExpanded(fExpanded) { } --- 32,42 ---- const wxString &itemValue, const wxString &itemSource, ! int lua_ref, ! int idx, ! bool expanded) :m_itemName(itemName), m_itemType(itemType), m_itemValue(itemValue), m_itemSource(itemSource), ! m_lua_ref(lua_ref), m_index(idx), ! m_expanded(expanded) { } *************** *** 45,50 **** :m_itemName(dataItem.m_itemName), m_itemType(dataItem.m_itemType), m_itemValue(dataItem.m_itemValue), m_itemSource(dataItem.m_itemSource), ! m_nReference(dataItem.m_nReference), m_nIndex(dataItem.m_nIndex), ! m_fExpanded(dataItem.m_fExpanded) { } --- 45,50 ---- :m_itemName(dataItem.m_itemName), m_itemType(dataItem.m_itemType), m_itemValue(dataItem.m_itemValue), m_itemSource(dataItem.m_itemSource), ! m_lua_ref(dataItem.m_lua_ref), m_index(dataItem.m_index), ! m_expanded(dataItem.m_expanded) { } *************** *** 236,240 **** wxlState.GetGlobals(); int nRef = wxlState.tinsert(-1); ! Add(new wxLuaDebugDataItem(wxT("Globals"), wxT(""), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } --- 236,240 ---- wxlState.GetGlobals(); int nRef = wxlState.tinsert(-1); ! Add(new wxLuaDebugDataItem(wxT("Globals"), wxT("Table"), wxT(""), wxT(""), nRef, 0)); references.Add(nRef); } *************** *** 291,294 **** --- 291,296 ---- type = wxT("None"); value = wxEmptyString; + break; + case LUA_TNIL: type = wxT("Nil"); *************** *** 381,396 **** const void *pItem = lua_topointer(L, index); ! if (nTag != TLUA_NOTAG) ! { ! if (nItems == 0) ! return wxString::Format(wxT("%p (tag %d)"), pItem, nTag); ! return wxString::Format(wxT("%p (approx %d items) (tag %d)"), pItem, nItems, nTag); ! } ! if (nItems == 0) ! return wxString::Format(wxT("%p"), pItem); ! return wxString::Format(wxT("%p (approx %d items)"), pItem, nItems); } --- 383,395 ---- const void *pItem = lua_topointer(L, index); ! wxString s = wxString::Format(wxT("%p"), pItem); ! if (nItems > 0) ! s += wxString::Format(wxT(" (approx %d items)"), nItems); ! if (nTag != TLUA_NOTAG) ! s += wxString::Format(wxT(" (tag %d)"), nTag); ! return s; } *************** *** 400,418 **** wxLuaState wxlState(wxlState_); // unconst wxLuaState lua_State* L = wxlState.GetLuaState(); if (full) { int nTag = wxlState.ttag(index); - wxString pTagName; if (nTag != TLUA_NOTAG) ! pTagName = wxlState.GetLuaTagName(nTag); ! ! if (!pTagName.IsEmpty()) ! return wxString::Format(wxT("%p (%s)"), lua_touserdata(L, index), pTagName.c_str()); ! return wxString::Format(wxT("%p (%d)"), lua_touserdata(L, index), nTag); } ! return wxString::Format(wxT("%p"), lua_touserdata(L, index)); } --- 399,420 ---- wxLuaState wxlState(wxlState_); // unconst wxLuaState lua_State* L = wxlState.GetLuaState(); + + wxString s = wxString::Format(wxT("%p"), lua_touserdata(L, index)); + if (full) { int nTag = wxlState.ttag(index); if (nTag != TLUA_NOTAG) ! { ! s += wxString::Format(wxT(" (tag %d)"), nTag); ! wxString pTagName = wxlState.GetLuaTagName(nTag); ! if (!pTagName.IsEmpty()) ! s += wxString::Format(wxT(" '%s'"), pTagName.c_str()); ! } } ! return s; } Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** staktree.cpp 22 May 2007 03:27:54 -0000 1.39 --- staktree.cpp 23 May 2007 02:48:31 -0000 1.40 *************** *** 35,39 **** BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) ! EVT_COMBOBOX( ID_WXLUA_STACKDIALOG_COMBO, wxLuaStackDialog::OnSelectStack) EVT_LIST_ITEM_ACTIVATED( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemActivated) EVT_LIST_DELETE_ITEM( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemDeleted) --- 35,39 ---- BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) ! EVT_COMBOBOX( ID_WXLUA_STACKDIALOG_COMBO, wxLuaStackDialog::OnSelectStack) EVT_LIST_ITEM_ACTIVATED( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemActivated) EVT_LIST_DELETE_ITEM( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemDeleted) *************** *** 73,78 **** wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES|wxLC_VRULES ); ! m_listCtrl->InsertColumn(0, wxT("Name"), wxLIST_FORMAT_LEFT, -1); ! m_listCtrl->InsertColumn(1, wxT("Type"), wxLIST_FORMAT_LEFT, -1); m_listCtrl->InsertColumn(2, wxT("Value"), wxLIST_FORMAT_LEFT, -1); --- 73,78 ---- wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES|wxLC_VRULES ); ! m_listCtrl->InsertColumn(0, wxT("Name"), wxLIST_FORMAT_LEFT, -1); ! m_listCtrl->InsertColumn(1, wxT("Type"), wxLIST_FORMAT_LEFT, -1); m_listCtrl->InsertColumn(2, wxT("Value"), wxLIST_FORMAT_LEFT, -1); *************** *** 82,88 **** m_imageList = new wxImageList(16, 16, true); ! m_imageList->Add(wxArtProvider::GetIcon(wxART_FOLDER, wxART_TOOLBAR, wxSize(16,16))); ! m_imageList->Add(wxArtProvider::GetIcon(wxART_NEW_DIR, wxART_TOOLBAR, wxSize(16,16))); ! m_imageList->Add(wxArtProvider::GetIcon(wxART_NORMAL_FILE, wxART_TOOLBAR, wxSize(16,16))); m_listCtrl->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); --- 82,101 ---- m_imageList = new wxImageList(16, 16, true); ! ! m_imageList->Add(wxArtProvider::GetIcon(wxART_NORMAL_FILE, wxART_TOOLBAR, wxSize(16,16))); // unknown ! m_imageList->Add(wxArtProvider::GetIcon(wxART_FOLDER, wxART_TOOLBAR, wxSize(16,16))); // table ! m_imageList->Add(wxArtProvider::GetIcon(wxART_NEW_DIR, wxART_TOOLBAR, wxSize(16,16))); // open table ! ! wxBitmap bmp(wxArtProvider::GetIcon(wxART_NORMAL_FILE, wxART_TOOLBAR, wxSize(16,16))); ! m_imageList->Add(CreateBmpString(bmp, wxT("0"))); // nil ! m_imageList->Add(CreateBmpString(bmp, wxT("T"))); // bool ! m_imageList->Add(CreateBmpString(bmp, wxT("1"))); // number ! m_imageList->Add(CreateBmpString(bmp, wxT("a"))); // string ! m_imageList->Add(CreateBmpString(bmp, wxT("C"))); // C function ! m_imageList->Add(CreateBmpString(bmp, wxT("f"))); // Lua function ! m_imageList->Add(CreateBmpString(bmp, wxT("u"))); // user data ! m_imageList->Add(CreateBmpString(bmp, wxT("u"))); // light user data ! m_imageList->Add(CreateBmpString(bmp, wxT("t"))); // thread ! m_listCtrl->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); *************** *** 118,121 **** --- 131,219 ---- } + wxBitmap wxLuaStackDialog::CreateBmpString(const wxBitmap& bmp_, const wxString& s) + { + wxBitmap bmp(bmp_); // unconst it + int bmp_w = bmp.GetWidth(); + int bmp_h = bmp.GetHeight(); + + wxMemoryDC dc; + dc.SelectObject(bmp); + + wxCoord w = 0, h = 0; + for (int n = 14; n > 3; n--) + { + wxFont f(n, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); + dc.GetTextExtent(s, &w, &h, NULL, NULL, &f); + + if ((w < bmp_w) && (h < bmp_h)) + { + dc.SetFont(f); + break; + } + } + + dc.DrawText(s, (bmp_w-w)/2, (bmp_h-h)/2); + + dc.SelectObject(wxNullBitmap); + + return bmp; + } + + int wxLuaStackDialog::SetupListItem(const wxLuaDebugDataItem *dbgItem, wxListItem& lItem) + { + wxCHECK_MSG(dbgItem, IMG_UNKNOWN, wxT("Invalid wxLuaDebugDataItem")); + + wxString t(dbgItem->GetType()); + int n, img = IMG_UNKNOWN; + + wxChar* strTypes[IMG_THREAD+1] = { + wxT(""), // unknown + wxT("Table"), + wxT(""), // table open + wxT("Nil"), + wxT("Boolean"), + wxT("Number"), + wxT("String"), + wxT("C Function"), + wxT("Lua Function"), + wxT("User Data"), + wxT("Light User Data"), + wxT("Thread") + }; + + for (n = 0; n < IMG_THREAD+1; n++) + { + if (t == strTypes[n]) + { + img = n; + break; + } + } + + // now fix up the images for special cases + if (dbgItem->GetExpanded()) + img = IMG_TABLE_OPEN; + else if (t == wxT("wxLuaData")) // our internal data structs + img = IMG_TABLE; + + lItem.SetImage(img); + + // Adjust the fonts to highlight some types + wxFont f(m_listCtrl->GetFont()); + + if ((img == IMG_TABLE) || (img == IMG_TABLE_OPEN)) + { + f.SetWeight(wxFONTWEIGHT_BOLD); + lItem.SetFont(f); + } + else if (img == IMG_STRING) + { + f.SetStyle(wxFONTSTYLE_ITALIC); + lItem.SetFont(f); + } + + return img; + } + void wxLuaStackDialog::EnumerateStack() { *************** *** 176,183 **** m_listCtrl->DeleteAllItems(); ! long rootItem = m_listCtrl->InsertItem(0, _("Locals"), 0); if (debugData.GetCount() > 0u) ! FillTableEntry(rootItem, debugData); // If at global scope, process globals --- 274,285 ---- m_listCtrl->DeleteAllItems(); ! // Add the locals, fake a debug item to get it setup right ! wxLuaDebugDataItem* localItem = new wxLuaDebugDataItem(_("Locals"), wxT("Table"), wxString::Format(wxT("Count %d"), (int)debugData.GetCount()), wxT(""), 0, 0); ! wxLuaDebugData dataArr; // this deletes the items ! dataArr.Add(localItem); ! FillTableEntry(m_listCtrl->GetItemCount(), dataArr); if (debugData.GetCount() > 0u) ! FillTableEntry(m_listCtrl->GetItemCount()-1, debugData); // If at global scope, process globals *************** *** 202,207 **** if (lc_item_ < m_listCtrl->GetItemCount()) { ! wxString levelText(m_listCtrl->GetItemText(lc_item_).BeforeLast(wxT(' '))); ! levelStr = levelText + wxT("--> "); } else --- 304,312 ---- if (lc_item_ < m_listCtrl->GetItemCount()) { ! wxString levelText(m_listCtrl->GetItemText(lc_item_).BeforeLast(wxT('>'))); ! if (levelText.Length() > 0) ! levelStr = levelText + wxT(">--> "); ! else ! levelStr = levelText + wxT("--> "); } else *************** *** 219,226 **** info.SetText(levelStr + item->GetName()); info.SetData(new wxLuaDebugDataItem(*item)); ! if (item->GetReference() != LUA_NOREF) ! info.SetImage(0); ! else ! info.SetImage(2); lc_item = m_listCtrl->InsertItem(info); --- 324,328 ---- info.SetText(levelStr + item->GetName()); info.SetData(new wxLuaDebugDataItem(*item)); ! SetupListItem(item, info); lc_item = m_listCtrl->InsertItem(info); *************** *** 244,251 **** // note: don't have spaces here since we use them to mark expanded levels ! wxLuaDebugDataItem* trackedItem = new wxLuaDebugDataItem(_("Tracked_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), trackedCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* callbackItem = new wxLuaDebugDataItem(_("Event_Callback_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), callbackCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* windowItem = new wxLuaDebugDataItem(_("Top_Level_wxWindow_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), windowCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* destroyItem = new wxLuaDebugDataItem(_("wxWindow_Destroy_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), destroyCount), wxT(""), 1, 0); wxLuaDebugData dataArr; // this deletes the items --- 346,353 ---- // note: don't have spaces here since we use them to mark expanded levels ! wxLuaDebugDataItem* trackedItem = new wxLuaDebugDataItem(_("Tracked User Data"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), trackedCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* callbackItem = new wxLuaDebugDataItem(_("wxEvent Callbacks"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), callbackCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* windowItem = new wxLuaDebugDataItem(_("Top Level wxWindows"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), windowCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* destroyItem = new wxLuaDebugDataItem(_("wxWindow Destroy List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), destroyCount), wxT(""), 1, 0); wxLuaDebugData dataArr; // this deletes the items *************** *** 296,300 **** // only expand items once ! if ((pDebugDataItem != NULL) && !pDebugDataItem->IsExpanded()) { // Check and block linked tables already shown --- 398,402 ---- // only expand items once ! if ((pDebugDataItem != NULL) && !pDebugDataItem->GetExpanded()) { // Check and block linked tables already shown *************** *** 307,311 **** { wxLuaDebugDataItem *itm = (wxLuaDebugDataItem *)m_listCtrl->GetItemData(n); ! if (itm && (itm != pDebugDataItem) && (itm->GetValue() == val) && itm->IsExpanded()) { wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), --- 409,413 ---- { wxLuaDebugDataItem *itm = (wxLuaDebugDataItem *)m_listCtrl->GetItemData(n); ! if (itm && (itm != pDebugDataItem) && (itm->GetValue() == val) && itm->GetExpanded()) { wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), *************** *** 323,330 **** int nRef = pDebugDataItem->GetReference(); if (m_wxlState.Ok() && ! ((pDebugDataItem->GetName() == _("Tracked_List")) || ! (pDebugDataItem->GetName() == _("Event_Callback_List")) || ! (pDebugDataItem->GetName() == _("Top_Level_wxWindow_List")) || ! (pDebugDataItem->GetName() == _("wxWindow_Destroy_List")))) { wxLuaState wxlState(m_wxlState); --- 425,432 ---- int nRef = pDebugDataItem->GetReference(); if (m_wxlState.Ok() && ! ((pDebugDataItem->GetName() == _("Tracked User Data")) || ! (pDebugDataItem->GetName() == _("wxEvent Callbacks")) || ! (pDebugDataItem->GetName() == _("Top Level wxWindows")) || ! (pDebugDataItem->GetName() == _("wxWindow Destroy List")))) { wxLuaState wxlState(m_wxlState); *************** *** 333,337 **** wxArrayInt counts; ! if (pDebugDataItem->GetName() == _("Tracked_List")) { wxLongToLongHashMap::iterator it; --- 435,439 ---- wxArrayInt counts; ! if (pDebugDataItem->GetName() == _("Tracked User Data")) { wxLongToLongHashMap::iterator it; *************** *** 358,362 **** } } ! else if (pDebugDataItem->GetName() == _("Event_Callback_List")) { wxList::compatibility_iterator node = wxlState.GetTrackedCallbackList()->GetFirst(); --- 460,464 ---- } } ! else if (pDebugDataItem->GetName() == _("wxEvent Callbacks")) { wxList::compatibility_iterator node = wxlState.GetTrackedCallbackList()->GetFirst(); *************** *** 391,395 **** } } ! else if (pDebugDataItem->GetName() == _("Top_Level_wxWindow_List")) { wxWindowList::compatibility_iterator node = wxlState.GetLuaStateData()->m_windowList.GetFirst(); --- 493,497 ---- } } ! else if (pDebugDataItem->GetName() == _("Top Level wxWindows")) { wxWindowList::compatibility_iterator node = wxlState.GetLuaStateData()->m_windowList.GetFirst(); *************** *** 414,418 **** } } ! else if (pDebugDataItem->GetName() == _("wxWindow_Destroy_List")) { wxList::compatibility_iterator node = wxlState.GetTrackedWinDestroyCallbackList()->GetFirst(); --- 516,520 ---- } } ! else if (pDebugDataItem->GetName() == _("wxWindow Destroy List")) { wxList::compatibility_iterator node = wxlState.GetTrackedWinDestroyCallbackList()->GetFirst(); *************** *** 436,440 **** pDebugDataItem->SetExpanded(true); ! m_listCtrl->SetItemImage(lc_item, 1); wxLuaDebugData dataArr; --- 538,542 ---- pDebugDataItem->SetExpanded(true); ! m_listCtrl->SetItemImage(lc_item, IMG_TABLE_OPEN); wxLuaDebugData dataArr; *************** *** 442,446 **** for (n = 0; n < count; n++) { ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT("wxLuaData"), wxString::Format(wxT("%d"), counts[n]), wxT(""), LUA_NOREF, pDebugDataItem->GetIndex() + 1); dataArr.Add(item); } --- 544,548 ---- for (n = 0; n < count; n++) { ! wxLuaDebugDataItem *item = new wxLuaDebugDataItem(names[n], wxT(""), wxString::Format(wxT("Count %d"), counts[n]), wxT(""), LUA_NOREF, pDebugDataItem->GetIndex() + 1); dataArr.Add(item); } *************** *** 451,455 **** { pDebugDataItem->SetExpanded(true); ! m_listCtrl->SetItemImage(lc_item, 1); int nIndex = pDebugDataItem->GetIndex() + 1; --- 553,557 ---- { pDebugDataItem->SetExpanded(true); ! m_listCtrl->SetItemImage(lc_item, IMG_TABLE_OPEN); int nIndex = pDebugDataItem->GetIndex() + 1; *************** *** 466,469 **** --- 568,572 ---- { wxLuaDebugDataItem* wxlDItem = (wxLuaDebugDataItem*)m_listCtrl->GetItemData(i); + m_listCtrl->SetItemData(i, 0); // null it so we won't try to delete it again if (wxlDItem != NULL) delete wxlDItem; |
From: John L. <jr...@us...> - 2007-05-23 02:48:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5256/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp wxldtarg.cpp wxlsock.cpp Log Message: Make the stack dialog listctrl a little nicer with bold fonts clean up variable names Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxldtarg.cpp 19 May 2007 17:14:13 -0000 1.35 --- wxldtarg.cpp 23 May 2007 02:48:31 -0000 1.36 *************** *** 44,50 **** wxLuaDebugTarget::wxLuaDebugTarget(const wxLuaState& wxlState, const wxString &serverName, ! int portNumber) : m_wxlState(wxlState), ! m_portNumber(portNumber), m_serverName(serverName), m_debugCondition(m_debugMutex), --- 44,50 ---- wxLuaDebugTarget::wxLuaDebugTarget(const wxLuaState& wxlState, const wxString &serverName, ! int port_number) : m_wxlState(wxlState), ! m_port_number(port_number), m_serverName(serverName), m_debugCondition(m_debugMutex), *************** *** 172,176 **** bool fThreadRunning = false; ! if (m_clientSocket.Connect(m_serverName, m_portNumber)) { m_fConnected = true; --- 172,176 ---- bool fThreadRunning = false; ! if (m_clientSocket.Connect(m_serverName, m_port_number)) { m_fConnected = true; Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxldserv.cpp 22 May 2007 03:27:54 -0000 1.40 --- wxldserv.cpp 23 May 2007 02:48:31 -0000 1.41 *************** *** 49,58 **** wxLuaDebuggerEvent::wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event) :wxEvent(event), ! m_lineNumber(event.m_lineNumber), m_fileName(event.m_fileName), m_strMessage(event.m_strMessage), ! m_fHasMessage(event.m_fHasMessage), ! m_nReference(event.m_nReference), ! m_fEnabledFlag(event.m_fEnabledFlag) { SetDebugData(event.GetReference(), event.GetDebugData().Copy()); --- 49,58 ---- wxLuaDebuggerEvent::wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event) :wxEvent(event), ! m_line_number(event.m_line_number), m_fileName(event.m_fileName), m_strMessage(event.m_strMessage), ! m_has_message(event.m_has_message), ! m_lua_ref(event.m_lua_ref), ! m_enabled_flag(event.m_enabled_flag) { SetDebugData(event.GetReference(), event.GetDebugData().Copy()); *************** *** 61,72 **** wxLuaDebuggerEvent::wxLuaDebuggerEvent(wxEventType eventType, wxObject* eventObject, ! int lineNumber, ! const wxString &file, bool enabledFlag) :wxEvent(0, eventType), ! m_lineNumber(lineNumber), m_fileName(file), ! m_fHasMessage(false), ! m_nReference(-1), ! m_fEnabledFlag(enabledFlag) { SetEventObject(eventObject); --- 61,72 ---- wxLuaDebuggerEvent::wxLuaDebuggerEvent(wxEventType eventType, wxObject* eventObject, ! int line_number, ! const wxString &file, bool enabled_flag) :wxEvent(0, eventType), ! m_line_number(line_number), m_fileName(file), ! m_has_message(false), ! m_lua_ref(-1), ! m_enabled_flag(enabled_flag) { SetEventObject(eventObject); *************** *** 76,85 **** { m_strMessage = message; ! m_fHasMessage = true; } void wxLuaDebuggerEvent::SetDebugData(long nReference, const wxLuaDebugData& debugData) { ! m_nReference = nReference; m_debugData = debugData; } --- 76,85 ---- { m_strMessage = message; ! m_has_message = true; } void wxLuaDebuggerEvent::SetDebugData(long nReference, const wxLuaDebugData& debugData) { ! m_lua_ref = nReference; m_debugData = debugData; } *************** *** 703,707 **** m_serverSocket(NULL), m_acceptedSocket(NULL), m_pThread(NULL), ! m_fShutdown(false) { } --- 703,707 ---- m_serverSocket(NULL), m_acceptedSocket(NULL), m_pThread(NULL), ! m_shutdown(false) { } *************** *** 716,720 **** wxCHECK_MSG(m_serverSocket == NULL, false, wxT("Debugger server socket already created")); ! m_fShutdown = false; m_serverSocket = new wxLuaCSocket(); m_serverSocket->m_name = wxString::Format(wxT("wxLuaDebuggerCServer::m_serverSocket (%ld)"), (long)wxGetProcessId()); --- 716,720 ---- wxCHECK_MSG(m_serverSocket == NULL, false, wxT("Debugger server socket already created")); ! m_shutdown = false; m_serverSocket = new wxLuaCSocket(); m_serverSocket->m_name = wxString::Format(wxT("wxLuaDebuggerCServer::m_serverSocket (%ld)"), (long)wxGetProcessId()); *************** *** 724,728 **** wxCHECK_MSG(m_pThread == NULL, false, wxT("Debugger server thread already created")); ! if (!m_fShutdown) { m_pThread = new wxLuaDebuggerCServer::LuaThread(this); --- 724,728 ---- wxCHECK_MSG(m_pThread == NULL, false, wxT("Debugger server thread already created")); ! if (!m_shutdown) { m_pThread = new wxLuaDebuggerCServer::LuaThread(this); *************** *** 741,745 **** delete m_serverSocket; m_serverSocket = NULL; ! m_fShutdown = true; } --- 741,745 ---- delete m_serverSocket; m_serverSocket = NULL; ! m_shutdown = true; } *************** *** 752,756 **** wxCHECK_MSG(m_pThread, false, wxT("Debugger server thread not running")); ! if (!m_fShutdown) return wxLuaDebuggerBase::StartClient(); --- 752,756 ---- wxCHECK_MSG(m_pThread, false, wxT("Debugger server thread not running")); ! if (!m_shutdown) return wxLuaDebuggerBase::StartClient(); *************** *** 763,767 **** // Set the shutdown flag ! m_fShutdown = true; // close the session socket, but first NULL it so we won't try to use it --- 763,767 ---- // Set the shutdown flag ! m_shutdown = true; // close the session socket, but first NULL it so we won't try to use it *************** *** 793,797 **** // close the server socket by connecting to the socket, thus // completing the 'accept'. If a client has not connected, this ! // code will satisfy the accept the m_fShutdown flag will be set // so the thread will not loop and instead will just destroy the // session socket object and return. --- 793,797 ---- // close the server socket by connecting to the socket, thus // completing the 'accept'. If a client has not connected, this ! // code will satisfy the accept the m_shutdown flag will be set // so the thread will not loop and instead will just destroy the // session socket object and return. *************** *** 851,855 **** // Enter the debug loop ! while (!m_pThread->TestDestroy() && !m_fShutdown && m_acceptedSocket) { debug_event = wxLUASOCKET_DEBUGGEE_EVENT_EXIT; --- 851,855 ---- // Enter the debug loop ! while (!m_pThread->TestDestroy() && !m_shutdown && m_acceptedSocket) { debug_event = wxLUASOCKET_DEBUGGEE_EVENT_EXIT; *************** *** 860,864 **** if ((m_acceptedSocket == NULL) || !m_acceptedSocket->ReadCmd(debug_event)) { ! m_fShutdown = true; break; } --- 860,864 ---- if ((m_acceptedSocket == NULL) || !m_acceptedSocket->ReadCmd(debug_event)) { ! m_shutdown = true; break; } *************** *** 871,875 **** if (debug_event == wxLUASOCKET_DEBUGGEE_EVENT_EXIT) { ! m_fShutdown = true; break; } --- 871,875 ---- if (debug_event == wxLUASOCKET_DEBUGGEE_EVENT_EXIT) { ! m_shutdown = true; break; } Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxlsock.cpp 21 May 2007 01:08:00 -0000 1.26 --- wxlsock.cpp 23 May 2007 02:48:31 -0000 1.27 *************** *** 245,249 **** // [wxInt32 debug data item count] then for each item // [wxInt32 item data length] ! // [{wxInt32 GetReference}{wxInt32 GetIndex}{wxInt32 IsExpanded} // {char GetName \0}{char GetType \0}{char GetValue \0}{char GetSource \0}] --- 245,249 ---- // [wxInt32 debug data item count] then for each item // [wxInt32 item data length] ! // [{wxInt32 GetReference}{wxInt32 GetIndex}{wxInt32 GetExpanded} // {char GetName \0}{char GetType \0}{char GetValue \0}{char GetSource \0}] *************** *** 284,288 **** pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = (wxInt32)(item->IsExpanded() ? 1 : 0); pMemory += sizeof(wxInt32); --- 284,288 ---- pMemory += sizeof(wxInt32); ! *(wxInt32 *) pMemory = (wxInt32)(item->GetExpanded() ? 1 : 0); pMemory += sizeof(wxInt32); |
From: John L. <jr...@us...> - 2007-05-23 02:48:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5256/wxLua/modules/wxluadebug/include Modified Files: staktree.h wxldebug.h Log Message: Make the stack dialog listctrl a little nicer with bold fonts clean up variable names Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** staktree.h 22 May 2007 03:27:54 -0000 1.18 --- staktree.h 23 May 2007 02:48:31 -0000 1.19 *************** *** 53,56 **** --- 53,77 ---- const wxSize& size = wxDefaultSize); + // Icon indexes for image list used in the listctrl + enum + { + IMG_UNKNOWN, + IMG_TABLE, + IMG_TABLE_OPEN, + IMG_NIL, + IMG_BOOL, + IMG_NUMBER, + IMG_STRING, + IMG_CFUNCTION, + IMG_LUAFUNCTION, + IMG_USERDATA, + IMG_LIGHTUSERDATA, + IMG_THREAD + }; + + // Draw the string centered in the bitmap + virtual wxBitmap CreateBmpString(const wxBitmap& bmp, const wxString& s); + virtual int SetupListItem(const wxLuaDebugDataItem *dbgItem, wxListItem& lItem); + // Override these functions if you need to provide an alternate way to get // the wxLuaDebugData. See wxluasocket lib and wxLuaDebuggerStackDialog *************** *** 63,70 **** // the first stack item. void FillStackCombobox(const wxLuaDebugData& debugData); ! // Clear the treectrl and add debug data into tree root. If at the top of // the stack, enumerate the global stack data. void FillStackEntry(int nEntry, const wxLuaDebugData& debugData); ! // Fill a treectrl item with children from the debug data void FillTableEntry(long lc_item, const wxLuaDebugData& debugData); --- 84,91 ---- // the first stack item. void FillStackCombobox(const wxLuaDebugData& debugData); ! // Clear the listctrl and add debug data into tree root. If at the top of // the stack, enumerate the global stack data. void FillStackEntry(int nEntry, const wxLuaDebugData& debugData); ! // Fill a listctrl item with children from the debug data void FillTableEntry(long lc_item, const wxLuaDebugData& debugData); *************** *** 77,81 **** void OnSelectStack(wxCommandEvent &event); void SelectStack(int stack_sel); ! // Handle and expand a treectrl item void OnItemDeleted(wxListEvent &event); void OnAllItemsDeleted(wxListEvent &event); --- 98,102 ---- void OnSelectStack(wxCommandEvent &event); void SelectStack(int stack_sel); ! // Handle and expand a listctrl item void OnItemDeleted(wxListEvent &event); void OnAllItemsDeleted(wxListEvent &event); *************** *** 87,98 **** wxListCtrl *m_listCtrl; wxComboBox *m_stackComboBox; // display stack entries ! int m_stack_sel; // current stack selection (see m_stackComboBox) ! wxArrayInt m_stackEntries; // stack entry references (see m_stackComboBox) wxLuaState m_wxlState; // lua_State to show stack for ! wxArrayInt m_luaReferences; // references in m_wxlState.tinsert ! wxImageList *m_imageList; // image list for treectrl private: --- 108,120 ---- wxListCtrl *m_listCtrl; + wxComboBox *m_stackComboBox; // display stack entries ! int m_stack_sel; // current stack selection ! wxArrayInt m_stackEntries; // stack entry references wxLuaState m_wxlState; // lua_State to show stack for ! wxArrayInt m_luaReferences; // references from m_wxlState.tinsert ! wxImageList *m_imageList; // image list for listctrl private: Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxldebug.h 19 Mar 2007 21:56:11 -0000 1.32 --- wxldebug.h 23 May 2007 02:48:31 -0000 1.33 *************** *** 30,36 **** const wxString &itemValue, const wxString &itemSource, ! int nReference, ! int nIndex = 0, ! bool fExpanded = false); wxString GetName() const { return m_itemName; } --- 30,36 ---- const wxString &itemValue, const wxString &itemSource, ! int lua_ref, ! int idx = 0, ! bool expanded = false); wxString GetName() const { return m_itemName; } *************** *** 38,46 **** wxString GetValue() const { return m_itemValue; } wxString GetSource() const { return m_itemSource; } ! int GetReference() const { return m_nReference; } ! int GetIndex() const { return m_nIndex; } ! bool IsExpanded() const { return m_fExpanded; } ! void SetExpanded(bool fExpanded) { m_fExpanded = fExpanded; } // Get a human readable string for debugging --- 38,46 ---- wxString GetValue() const { return m_itemValue; } wxString GetSource() const { return m_itemSource; } ! int GetReference() const { return m_lua_ref; } // ttag reference ! int GetIndex() const { return m_index; } ! bool GetExpanded() const { return m_expanded; } // expanded in stack dialog ! void SetExpanded(bool expanded) { m_expanded = expanded; } // Get a human readable string for debugging *************** *** 48,52 **** { return wxString::Format(wxT("Name: '%s' Type: '%s' Value: '%s' Ref: %d Idx: %d Expanded: %d HasSrc: %d"), ! m_itemName.c_str(), m_itemType.c_str(), m_itemValue.c_str(), m_nReference, m_nIndex, (int)m_fExpanded, (int)!m_itemSource.IsEmpty()); } --- 48,52 ---- { return wxString::Format(wxT("Name: '%s' Type: '%s' Value: '%s' Ref: %d Idx: %d Expanded: %d HasSrc: %d"), ! m_itemName.c_str(), m_itemType.c_str(), m_itemValue.c_str(), m_lua_ref, m_index, (int)m_expanded, (int)!m_itemSource.IsEmpty()); } *************** *** 56,62 **** wxString m_itemValue; wxString m_itemSource; ! int m_nReference; ! int m_nIndex; ! bool m_fExpanded; }; --- 56,62 ---- wxString m_itemValue; wxString m_itemSource; ! int m_lua_ref; ! int m_index; ! bool m_expanded; }; |
From: John L. <jr...@us...> - 2007-05-23 02:48:35
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5256/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h wxldtarg.h Log Message: Make the stack dialog listctrl a little nicer with bold fonts clean up variable names Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wxldserv.h 22 May 2007 03:27:54 -0000 1.33 --- wxldserv.h 23 May 2007 02:48:31 -0000 1.34 *************** *** 319,323 **** wxLuaSocket *m_acceptedSocket; wxLuaDebuggerCServer::LuaThread *m_pThread; ! bool m_fShutdown; private: --- 319,323 ---- wxLuaSocket *m_acceptedSocket; wxLuaDebuggerCServer::LuaThread *m_pThread; ! bool m_shutdown; private: *************** *** 390,411 **** void SetDebugData(long nReference, const wxLuaDebugData& pDebugData = wxLuaDebugData()); ! int GetLineNumber() const { return m_lineNumber;} wxString GetFileName() const { return m_fileName; } wxString GetMessage() const { return m_strMessage; } // check HasMessage ! bool HasMessage() const { return m_fHasMessage; } ! long GetReference() const { return m_nReference; } // lua reference wxLuaDebugData GetDebugData() const { return m_debugData; } ! bool GetEnabledFlag() const { return m_fEnabledFlag; } protected: virtual wxEvent* Clone() const { return new wxLuaDebuggerEvent(*this); } ! int m_lineNumber; wxString m_fileName; wxString m_strMessage; ! bool m_fHasMessage; ! long m_nReference; wxLuaDebugData m_debugData; ! bool m_fEnabledFlag; private: --- 390,411 ---- void SetDebugData(long nReference, const wxLuaDebugData& pDebugData = wxLuaDebugData()); ! int GetLineNumber() const { return m_line_number;} wxString GetFileName() const { return m_fileName; } wxString GetMessage() const { return m_strMessage; } // check HasMessage ! bool HasMessage() const { return m_has_message; } ! long GetReference() const { return m_lua_ref; } // lua reference wxLuaDebugData GetDebugData() const { return m_debugData; } ! bool GetEnabledFlag() const { return m_enabled_flag; } protected: virtual wxEvent* Clone() const { return new wxLuaDebuggerEvent(*this); } ! int m_line_number; wxString m_fileName; wxString m_strMessage; ! bool m_has_message; ! long m_lua_ref; wxLuaDebugData m_debugData; ! bool m_enabled_flag; private: Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxldtarg.h 19 May 2007 02:05:47 -0000 1.22 --- wxldtarg.h 23 May 2007 02:48:31 -0000 1.23 *************** *** 63,67 **** wxLuaState m_wxlState; ! int m_portNumber; wxString m_serverName; wxSortedArrayString m_breakPointList; --- 63,67 ---- wxLuaState m_wxlState; ! int m_port_number; wxString m_serverName; wxSortedArrayString m_breakPointList; |
From: John L. <jr...@us...> - 2007-05-22 03:27:59
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8900/wxLua/modules/wxluadebug/include Modified Files: splttree.h staktree.h Log Message: Changed wxLuaStackDialog to use a wxListCtrl instead of a hacked wxTreeCtrl that tries to be a wxListCtrl. Works better. Removed all code in splttree.h/cpp before removing it completely. Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** staktree.h 26 Feb 2007 05:17:29 -0000 1.17 --- staktree.h 22 May 2007 03:27:54 -0000 1.18 *************** *** 12,20 **** #include "wxluadebug/include/wxluadebugdefs.h" - #include "wxluadebug/include/splttree.h" #include "wxluadebug/include/wxldebug.h" - class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDataWindow; - class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; --- 12,17 ---- *************** *** 26,35 **** { ID_WXLUA_STACKDIALOG_COMBO = 2000, ! ID_WXLUA_STACKDIALOG_SCRWIN, ! ID_WXLUA_STACKDIALOG_SPLITWIN, ! ID_WXLUA_STACKDIALOG_STACKTREE, ! ID_WXLUA_STACKDIALOG_VALUE_SPLITWIN, ! ID_WXLUA_STACKDIALOG_VALUE_WIN1, ! ID_WXLUA_STACKDIALOG_VALUE_WIN2 }; --- 23,27 ---- { ID_WXLUA_STACKDIALOG_COMBO = 2000, ! ID_WXLUA_STACKDIALOG_LISTCTRL }; *************** *** 65,70 **** virtual void EnumerateStack(); virtual void EnumerateStackEntry(int nEntry); ! virtual void EnumerateTable(int nRef, int nEntry, const wxTreeItemId& treeId); ! virtual void EnumerateGlobalData(const wxTreeItemId& treeId); // Fill the combobox with the stack entries in the debug data and select --- 57,62 ---- virtual void EnumerateStack(); virtual void EnumerateStackEntry(int nEntry); ! virtual void EnumerateTable(int nRef, int nEntry, long lc_item); ! virtual void EnumerateGlobalData(long lc_item); // Fill the combobox with the stack entries in the debug data and select *************** *** 75,81 **** void FillStackEntry(int nEntry, const wxLuaDebugData& debugData); // Fill a treectrl item with children from the debug data ! void FillTableEntry(wxTreeItemId treeId, const wxLuaDebugData& debugData); ! void GetDerivedAndTrackedItems(wxRemotelyScrolledTreeCtrl *treeControl, const wxTreeItemId& rootItem); // Handle and set the stack from the stack combobox selection --- 67,76 ---- void FillStackEntry(int nEntry, const wxLuaDebugData& debugData); // Fill a treectrl item with children from the debug data ! void FillTableEntry(long lc_item, const wxLuaDebugData& debugData); ! // Add info from the wxLuaState (must be valid) about items the wxLuaState tracks. ! void GetDerivedAndTrackedItems(); ! ! // implementation // Handle and set the stack from the stack combobox selection *************** *** 83,97 **** void SelectStack(int stack_sel); // Handle and expand a treectrl item ! void OnItemExpanding(wxTreeEvent &event); ! void ItemExpanding(const wxTreeItemId &itemId); protected: ! wxRemotelyScrolledTreeCtrl *m_treeControl; ! wxThinSplitterWindow *m_treeSplitter; ! wxThinSplitterWindow *m_valueSplitter; ! wxSplitterScrolledWindow *m_scrolledWindow; ! wxLuaStackDataWindow *m_firstValueWindow; ! wxLuaStackDataWindow *m_secondValueWindow; wxComboBox *m_stackComboBox; // display stack entries int m_stack_sel; // current stack selection (see m_stackComboBox) --- 78,90 ---- void SelectStack(int stack_sel); // Handle and expand a treectrl item ! void OnItemDeleted(wxListEvent &event); ! void OnAllItemsDeleted(wxListEvent &event); ! void OnItemActivated(wxListEvent &event); ! void ItemExpanding(long lc_item); protected: ! void DeleteAllListItemData(); + wxListCtrl *m_listCtrl; wxComboBox *m_stackComboBox; // display stack entries int m_stack_sel; // current stack selection (see m_stackComboBox) *************** *** 110,133 **** }; - // ---------------------------------------------------------------------------- - // wxLuaStackDataWindow - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDataWindow : public wxTreeCompanionWindow - { - public: - wxLuaStackDataWindow( wxWindow *parent, wxWindowID id = wxID_ANY, - const wxPoint &pos = wxDefaultPosition, - const wxSize &sz = wxDefaultSize, - long style = 0, bool first_window = true); - - // Overrides - virtual void DrawItem(wxDC &dc, wxTreeItemId id, const wxRect &rect); - - private: - bool m_first_window; - int m_text_height; - DECLARE_ABSTRACT_CLASS(wxLuaStackDataWindow) - }; - #endif //_WX_LUA_STACKTREE_H_ --- 103,105 ---- Index: splttree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/splttree.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** splttree.h 12 Dec 2006 01:23:40 -0000 1.10 --- splttree.h 22 May 2007 03:27:54 -0000 1.11 *************** *** 12,243 **** // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// - - #ifndef _WX_SPLITTREE_H_ - #define _WX_SPLITTREE_H_ - - #include "wxluadebug/include/wxluadebugdefs.h" - #include "wx/treectrl.h" - #include "wx/splitter.h" - #include "wx/scrolwin.h" - - class WXDLLIMPEXP_WXLUADEBUG wxRemotelyScrolledTreeCtrl; - class WXDLLIMPEXP_WXLUADEBUG wxThinSplitterWindow; - class WXDLLIMPEXP_WXLUADEBUG wxSplitterScrolledWindow; - - - /* If set to 1, then wxGenericTreeCtrl will be used instead of wxTreeCtrl */ - #define USE_GENERIC_TREECTRL 0 - - - - /* - * wxRemotelyScrolledTreeCtrl - * - * This tree control disables its vertical scrollbar and catches scroll - * events passed by a scrolled window higher in the hierarchy. - * It also updates the scrolled window vertical scrollbar as appropriate. - */ - - class WXDLLIMPEXP_WXLUADEBUG wxRemotelyScrolledTreeCtrl : public wxTreeCtrl - { - public: - wxRemotelyScrolledTreeCtrl(wxWindow* parent, - wxWindowID id, - const wxPoint &pt = wxDefaultPosition, - const wxSize &sz = wxDefaultSize, - long style = wxTR_HAS_BUTTONS); - virtual ~wxRemotelyScrolledTreeCtrl(); - - //// Events - void OnSize(wxSizeEvent& event); - void OnExpand(wxTreeEvent& event); - void OnScroll(wxScrollWinEvent& event); - void OnPaint(wxPaintEvent& event); - void OnSelChanged(wxTreeEvent& event); - - //// Overrides - // Override this in case we're using the generic tree control. - // Calls to this should disable the vertical scrollbar. - - // Number of pixels per user unit (0 or -1 for no scrollbar) - // Length of virtual canvas in user units - // Length of page in user units - virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, - int noUnitsX, int noUnitsY, - int xPos = 0, int yPos = 0, - bool noRefresh = false ); - - virtual void DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const; - virtual void DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const; - - // In case we're using the generic tree control. - // Get the view start - virtual void GetViewStart(int *x, int *y) const; - - // In case we're using the generic tree control. - virtual void PrepareDC(wxDC& dc); - - // In case we're using the generic tree control. - virtual int GetScrollPos(int orient) const; - - //// Helpers - void HideVScrollbar(); - - // Calculate the tree overall size so we can set the scrollbar - // correctly - void CalcTreeSize(wxRect& rect); - void CalcTreeSize(const wxTreeItemId& id, wxRect& rect); - - // Adjust the containing wxScrolledWindow's scrollbars appropriately - void AdjustRemoteScrollbars(); - - // Find the scrolled window that contains this control - wxScrolledWindow* GetScrolledWindow() const; - - // Scroll to the given line (in scroll units where each unit is - // the height of an item) - void ScrollToLine(int posHoriz, int posVert); - - void DeleteAllItems(); - - //// Accessors - - // The companion window is one which will get notified when certain - // events happen such as node expansion - void SetCompanionWindows(wxWindow* firstCompanion, - wxWindow* secondCompanion = NULL) - { - m_firstCompanionWindow = firstCompanion; - m_secondCompanionWindow = secondCompanion; - } - - wxWindow* GetFirstCompanionWindow() const - { - return m_firstCompanionWindow; - } - - wxWindow* GetSecondCompanionWindow() const - { - return m_secondCompanionWindow; - } - - protected: - wxWindow *m_firstCompanionWindow; - wxWindow *m_secondCompanionWindow; - bool m_drawRowLines; - wxTreeItemId &m_lastTreeItemId; - - private: - DECLARE_ABSTRACT_CLASS(wxRemotelyScrolledTreeCtrl) - DECLARE_EVENT_TABLE() - }; - - /* - * wxTreeCompanionWindow - * - * A window displaying values associated with tree control items. - */ - - class WXDLLIMPEXP_WXLUADEBUG wxTreeCompanionWindow: public wxWindow - { - public: - wxTreeCompanionWindow(wxWindow* parent, - wxWindowID id = wxID_ANY, - const wxPoint& pos = wxDefaultPosition, - const wxSize& sz = wxDefaultSize, - long style = 0); - - virtual ~wxTreeCompanionWindow(); - - //// Overrides - virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect); - - //// Events - void OnPaint(wxPaintEvent& event); - void OnScroll(wxScrollWinEvent& event); - void OnExpand(wxTreeEvent& event); - void OnSelChanged(wxTreeEvent& event); - - //// Accessors - wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const - { - return m_treeControl; - } - - void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeControl) - { - m_treeControl = treeControl; - } - - //// Data members - protected: - wxRemotelyScrolledTreeCtrl *m_treeControl; - - private: - DECLARE_ABSTRACT_CLASS(wxTreeCompanionWindow) - DECLARE_EVENT_TABLE() - }; - - - /* - * wxThinSplitterWindow - * - * Implements a splitter with a less obvious sash - * than the usual one. - */ - - class WXDLLIMPEXP_WXLUADEBUG wxThinSplitterWindow : public wxSplitterWindow - { - public: - wxThinSplitterWindow(wxWindow* parent, - wxWindowID id = wxID_ANY, - const wxPoint& pos = wxDefaultPosition, - const wxSize& sz = wxDefaultSize, - long style = wxSP_3D | wxCLIP_CHILDREN); - - //// Overrides - - void SizeWindows(); - // Tests for x, y over sash. Overriding this allows us to increase - // the tolerance. - bool SashHitTest(int x, int y, int tolerance = 2); - void DrawSash(wxDC& dc); - - //// Events - - void OnSize(wxSizeEvent& event); - - protected: - DECLARE_ABSTRACT_CLASS(wxThinSplitterWindow) - DECLARE_EVENT_TABLE() - }; - - /* - * wxSplitterScrolledWindow - * - * This scrolled window is aware of the fact that one of its - * children is a splitter window. It passes on its scroll events - * (after some processing) to both splitter children for them - * scroll appropriately. - */ - - class WXDLLIMPEXP_WXLUADEBUG wxSplitterScrolledWindow: public wxScrolledWindow - { - public: - wxSplitterScrolledWindow(wxWindow* parent, - wxWindowID id = wxID_ANY, - const wxPoint &pos = wxDefaultPosition, - const wxSize &sz = wxDefaultSize, - long style = 0); - - //// Events - - void OnScroll(wxScrollWinEvent& event); - void OnSize(wxSizeEvent& event); - - private: - DECLARE_ABSTRACT_CLASS(wxSplitterScrolledWindow) - DECLARE_EVENT_TABLE() - }; - - #endif // _SPLITTREE_H_ --- 12,13 ---- |
From: John L. <jr...@us...> - 2007-05-22 03:27:59
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8900/wxLua/modules/wxluadebug/src Modified Files: splttree.cpp staktree.cpp Log Message: Changed wxLuaStackDialog to use a wxListCtrl instead of a hacked wxTreeCtrl that tries to be a wxListCtrl. Works better. Removed all code in splttree.h/cpp before removing it completely. Index: splttree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/splttree.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** splttree.cpp 12 Dec 2006 01:23:40 -0000 1.15 --- splttree.cpp 22 May 2007 03:27:54 -0000 1.16 *************** *** 12,841 **** // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// - - // ============================================================================ - // declarations - // ============================================================================ - - // ---------------------------------------------------------------------------- - // headers - // ---------------------------------------------------------------------------- - - // For compilers that support precompilation, includes "wx/wx.h". - #include "wx/wxprec.h" - - #ifdef __BORLANDC__ - #pragma hdrstop - #endif - - // for all others, include the necessary headers (this file is usually all you - // need because it includes almost all "standard" wxWidgets headers) - #ifndef WX_PRECOMP - #include "wx/wx.h" - #endif - - #ifdef __WXMSW__ - #include <windows.h> - #include "wx/msw/winundef.h" - #endif // __WXMSW__ - - #include "wxluadebug/include/splttree.h" - #include <math.h> - - static wxTreeItemId defaultTreeItemId; - - /* - * wxRemotelyScrolledTreeCtrl - */ - - #if USE_GENERIC_TREECTRL - IMPLEMENT_ABSTRACT_CLASS(wxRemotelyScrolledTreeCtrl, wxGenericTreeCtrl) - #else - IMPLEMENT_ABSTRACT_CLASS(wxRemotelyScrolledTreeCtrl, wxTreeCtrl) - #endif - - #if USE_GENERIC_TREECTRL - BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxGenericTreeCtrl) - #else - BEGIN_EVENT_TABLE(wxRemotelyScrolledTreeCtrl, wxTreeCtrl) - #endif - EVT_SIZE(wxRemotelyScrolledTreeCtrl::OnSize) - EVT_PAINT(wxRemotelyScrolledTreeCtrl::OnPaint) - EVT_TREE_ITEM_EXPANDED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand) - EVT_TREE_ITEM_COLLAPSED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnExpand) - EVT_SCROLLWIN(wxRemotelyScrolledTreeCtrl::OnScroll) - EVT_TREE_SEL_CHANGED(wxID_ANY, wxRemotelyScrolledTreeCtrl::OnSelChanged) - END_EVENT_TABLE() - - wxRemotelyScrolledTreeCtrl::wxRemotelyScrolledTreeCtrl(wxWindow *parent, - wxWindowID id, - const wxPoint& pt, - const wxSize& sz, - long style) - : wxTreeCtrl(parent, id, pt, sz, style & ~wxTR_ROW_LINES), - m_lastTreeItemId(defaultTreeItemId) - { - m_firstCompanionWindow = NULL; - m_secondCompanionWindow = NULL; - - // We draw the row lines ourself so they match what's done - // by the companion window. That is why the flag is turned - // off above, so wxGenericTreeCtrl doesn't draw them in a - // different colour. - m_drawRowLines = (style & wxTR_ROW_LINES) != 0; - } - - wxRemotelyScrolledTreeCtrl::~wxRemotelyScrolledTreeCtrl() - { - } - - void wxRemotelyScrolledTreeCtrl::HideVScrollbar() - { - #if defined(__WXMSW__) - #if USE_GENERIC_TREECTRL - if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - #endif - { - ::ShowScrollBar((HWND) GetHWND(), SB_VERT, false); - } - #if USE_GENERIC_TREECTRL - else - { - // Implicit in overriding SetScrollbars - } - #endif - #endif - } - - // Number of pixels per user unit (0 or -1 for no scrollbar) - // Length of virtual canvas in user units - // Length of page in user units - void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, - int pixelsPerUnitY, - int noUnitsX, - int noUnitsY, - int xPos, - int yPos, - bool noRefresh) - { - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - { - wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ true); - - wxScrolledWindow* scrolledWindow = GetScrolledWindow(); - if (scrolledWindow) - { - scrolledWindow->SetScrollbars(0, pixelsPerUnitY, 0, noUnitsY, 0, yPos, noRefresh); - scrolledWindow->AdjustScrollbars(); // FIXME - this is for the broken wxWindow's wxScrolledWindow - } - } - #else - # ifdef UNREFERENCED_PARAMETER - UNREFERENCED_PARAMETER(pixelsPerUnitX); - UNREFERENCED_PARAMETER(pixelsPerUnitY); - UNREFERENCED_PARAMETER(noUnitsX); - UNREFERENCED_PARAMETER(noUnitsY); - UNREFERENCED_PARAMETER(xPos); - UNREFERENCED_PARAMETER(yPos); - UNREFERENCED_PARAMETER(noRefresh); - # endif - #endif - } - - // In case we're using the generic tree control. - int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const - { - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - wxScrolledWindow* scrolledWindow = GetScrolledWindow(); - - if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - { - wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - - if (orient == wxHORIZONTAL) - return win->wxGenericTreeCtrl::GetScrollPos(orient); - else - return scrolledWindow->GetScrollPos(orient); - } - #else - # ifdef UNREFERENCED_PARAMETER - UNREFERENCED_PARAMETER(orient); - # endif - #endif - return 0; - } - - void wxRemotelyScrolledTreeCtrl::DoCalcScrolledPosition(int x, int y, int *xx, int *yy) const - { - // wxTreeCtrl is not a scrolled window in MSW so don't do anything - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - int vx = 0, vy = 0; - GetViewStart(&vx, &vy); - - int pixelsPerUnitX = 0, pixelsPerUnitY = 0; - GetScrollPixelsPerUnit(&pixelsPerUnitX, &pixelsPerUnitY); - - if (xx) *xx = x - vx*pixelsPerUnitX; - if (yy) *yy = y - vy*pixelsPerUnitY; - #else - if (xx) *xx = x; - if (yy) *yy = y; - #endif - } - void wxRemotelyScrolledTreeCtrl::DoCalcUnscrolledPosition(int x, int y, int *xx, int *yy) const - { - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - int vx = 0, vy = 0; - GetViewStart(&vx, &vy); - - int pixelsPerUnitX = 0, pixelsPerUnitY = 0; - GetScrollPixelsPerUnit(&pixelsPerUnitX, &pixelsPerUnitY); - - if (xx) *xx = x + vx*pixelsPerUnitX; - if (yy) *yy = y + vy*pixelsPerUnitY; - #else - if (xx) *xx = x; - if (yy) *yy = y; - #endif - } - - - // In case we're using the generic tree control. - // Get the view start - void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const - { - wxScrolledWindow* scrolledWindow = GetScrolledWindow(); - - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - { - wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - int x1 = 0, y1 = 0, x2 = 0, y2 = 0; - win->wxGenericTreeCtrl::GetViewStart(& x1, & y1); - * x = x1; * y = y1; - if (!scrolledWindow) - return; - - scrolledWindow->GetViewStart(& x2, & y2); - * y = y2; - } - else - #endif - { - // x is wrong since the horizontal scrollbar is controlled by the - // tree control, but we probably don't need it. - scrolledWindow->GetViewStart(x, y); - } - } - - // In case we're using the generic tree control. - void wxRemotelyScrolledTreeCtrl::PrepareDC( - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - wxDC& dc - #else - wxDC& WXUNUSED(dc) - #endif - ) - { - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - { - wxScrolledWindow* scrolledWindow = GetScrolledWindow(); - - wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - - int startX, startY; - GetViewStart(& startX, & startY); - - int xppu1, yppu1, xppu2, yppu2; - win->wxGenericTreeCtrl::GetScrollPixelsPerUnit(& xppu1, & yppu1); - scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2); - - dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 ); - // dc.SetUserScale( win->GetScaleX(), win->GetScaleY() ); - } - #endif - } - - // Scroll to the given line (in scroll units where each unit is - // the height of an item) - void wxRemotelyScrolledTreeCtrl::ScrollToLine(int WXUNUSED(posHoriz), int posVert) - { - #ifdef __WXMSW__ - #if USE_GENERIC_TREECTRL - if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - #endif // USE_GENERIC_TREECTRL - { - UINT sbCode = SB_THUMBPOSITION; - HWND vertScrollBar = 0; - #if !wxCHECK_VERSION(2,5,0) - MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXHWND) vertScrollBar); - #else // wxCHECK_VERSION(2,5,0) - MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXLPARAM) vertScrollBar); - #endif // wxCHECK_VERSION(2,5,0) - } - #if USE_GENERIC_TREECTRL - else - #endif // USE_GENERIC_TREECTRL - #endif // __WXMSW__ - - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - { - wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - win->Refresh(); - } - #endif - } - - void wxRemotelyScrolledTreeCtrl::OnSize(wxSizeEvent& event) - { - HideVScrollbar(); - AdjustRemoteScrollbars(); - if (m_firstCompanionWindow) - m_firstCompanionWindow->Refresh(true); - if (m_secondCompanionWindow) - m_secondCompanionWindow->Refresh(true); - event.Skip(); - } - - void wxRemotelyScrolledTreeCtrl::OnExpand(wxTreeEvent& event) - { - AdjustRemoteScrollbars(); - event.Skip(); - - // If we don't have this, we get some bits of lines still remaining - if (event.GetEventType() == wxEVT_COMMAND_TREE_ITEM_COLLAPSED) - Refresh(); - - // Pass on the event - if (m_secondCompanionWindow) - m_secondCompanionWindow->GetEventHandler()->ProcessEvent(event); - if (m_firstCompanionWindow) - m_firstCompanionWindow->GetEventHandler()->ProcessEvent(event); - } - - void wxRemotelyScrolledTreeCtrl::OnSelChanged(wxTreeEvent& event) - { - const wxTreeItemId &itemId = GetFirstVisibleItem(); - if (m_lastTreeItemId != itemId) - { - AdjustRemoteScrollbars(); - event.Skip(); - - Refresh(); - - // Pass on the event - if (m_secondCompanionWindow) - m_secondCompanionWindow->GetEventHandler()->ProcessEvent(event); - if (m_firstCompanionWindow) - m_firstCompanionWindow->GetEventHandler()->ProcessEvent(event); - - m_lastTreeItemId = itemId; - } - else - event.Skip(); - } - - void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event) - { - wxPaintDC dc(this); - - wxTreeCtrl::OnPaint(event); - - if (! m_drawRowLines) - return; - - // Reset the device origin since it may have been set - dc.SetDeviceOrigin(0, 0); - - wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID); - dc.SetPen(pen); - dc.SetBrush(*wxTRANSPARENT_BRUSH); - - wxSize clientSize = GetClientSize(); - wxRect itemRect; - int cy = 0; - wxTreeItemId h, lastH; - for(h = GetFirstVisibleItem(); h && IsVisible(h); h = GetNextVisible(h)) - { - if (GetBoundingRect(h, itemRect)) - { - cy = itemRect.GetTop(); - dc.DrawLine(0, cy, clientSize.x, cy); - lastH = h; - } - } - - if (lastH.IsOk() && GetBoundingRect(lastH, itemRect)) - { - cy = itemRect.GetBottom(); - dc.DrawLine(0, cy, clientSize.x, cy); - } - } - - - // Adjust the containing wxScrolledWindow's scrollbars appropriately - void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars() - { - #if USE_GENERIC_TREECTRL || !defined(__WXMSW__) - if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) - { - // This is for the generic tree control. - // It calls SetScrollbars which has been overridden - // to adjust the parent scrolled window vertical - // scrollbar. - ((wxGenericTreeCtrl*) this)->AdjustMyScrollbars(); - return; - } - else - #endif // USE_GENERIC_TREECTRL || !defined(__WXMSW__) - { - // This is for the wxMSW tree control - wxScrolledWindow* scrolledWindow = GetScrolledWindow(); - if (scrolledWindow) - { - wxRect itemRect; - if (GetBoundingRect(GetFirstVisibleItem(), itemRect)) // newer method - //if (GetBoundingRect(GetRootItem(), itemRect)) - { - // Actually, the real height seems to be 1 less than reported - // (e.g. 16 instead of 16) - int itemHeight = itemRect.GetHeight() - 1; - - int w, h; - GetClientSize(&w, &h); - - wxRect rect(0, 0, 0, 0); - CalcTreeSize(rect); - - double f = ((double) (rect.GetHeight()) / (double) itemHeight) ; - int treeViewHeight = (int) ceil(f); - - int scrollPixelsPerLine = itemHeight; - int scrollPos = - (itemRect.y / itemHeight); - - scrolledWindow->SetScrollbars(0, scrollPixelsPerLine, 0, treeViewHeight - 1, 0, scrollPos); - - // Ensure that when a scrollbar becomes hidden or visible, - // the contained window sizes are right. - // Problem: this is called too early (?) - wxSizeEvent event(scrolledWindow->GetSize(), scrolledWindow->GetId()); - scrolledWindow->GetEventHandler()->ProcessEvent(event); - } - } - } - } - - void wxRemotelyScrolledTreeCtrl::DeleteAllItems() - { - wxTreeCtrl::DeleteAllItems(); - if (m_firstCompanionWindow) - m_firstCompanionWindow->Refresh(true); - if (m_secondCompanionWindow) - m_secondCompanionWindow->Refresh(true); - } - - // Calculate the area that contains both rectangles - static wxRect CombineRectangles(const wxRect& rect1, const wxRect& rect2) - { - wxRect rect; - - int right1 = rect1.GetRight(); - int bottom1 = rect1.GetBottom(); - int right2 = rect2.GetRight(); - int bottom2 = rect2.GetBottom(); - - wxPoint topLeft = wxPoint(wxMin(rect1.x, rect2.x), wxMin(rect1.y, rect2.y)); - wxPoint bottomRight = wxPoint(wxMax(right1, right2), wxMax(bottom1, bottom2)); - - rect.x = topLeft.x; rect.y = topLeft.y; - rect.SetRight(bottomRight.x); - rect.SetBottom(bottomRight.y); - - return rect; - } - - // Calculate the tree overall size so we can set the scrollbar - // correctly - void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect) - { - CalcTreeSize(GetRootItem(), rect); - } - - void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, wxRect& rect) - { - // More efficient implementation would be to find the last item (but how?) - // Q: is the bounding rect relative to the top of the virtual tree workspace - // or the top of the window? How would we convert? - wxRect itemSize; - if (GetBoundingRect(id, itemSize)) - { - rect = CombineRectangles(rect, itemSize); - } - - wxTreeItemIdValue cookie; - wxTreeItemId childId = GetFirstChild(id, cookie); - - #if wxCHECK_VERSION(2,7,0) - while (childId != wxTreeItemId((void*)0)) - #else //!wxCHECK_VERSION(2,7,0) - while (childId != wxTreeItemId((long)0)) - #endif //wxCHECK_VERSION(2,7,0) - { - CalcTreeSize(childId, rect); - childId = GetNextChild(childId, cookie); - } - } - - // Find the scrolled window that contains this control - wxScrolledWindow* wxRemotelyScrolledTreeCtrl::GetScrolledWindow() const - { - wxWindow* parent = wxWindow::GetParent(); - while (parent) - { - if (parent->IsKindOf(CLASSINFO(wxScrolledWindow))) - return (wxScrolledWindow*) parent; - parent = parent->GetParent(); - } - return NULL; - } - - void wxRemotelyScrolledTreeCtrl::OnScroll(wxScrollWinEvent& event) - { - int orient = event.GetOrientation(); - if (orient == wxHORIZONTAL) - { - event.Skip(); - return; - } - - wxScrolledWindow* scrollWin = GetScrolledWindow(); - if (!scrollWin) - return; - - int x, y; - scrollWin->GetViewStart(& x, & y); - - ScrollToLine(-1, y); - - // Pass on the event - if (m_secondCompanionWindow) - m_secondCompanionWindow->GetEventHandler()->ProcessEvent(event); - if (m_firstCompanionWindow) - m_firstCompanionWindow->GetEventHandler()->ProcessEvent(event); - } - - /* - * wxTreeCompanionWindow - * - * A window displaying values associated with tree control items. - */ - - IMPLEMENT_ABSTRACT_CLASS(wxTreeCompanionWindow, wxWindow) - - BEGIN_EVENT_TABLE(wxTreeCompanionWindow, wxWindow) - EVT_PAINT(wxTreeCompanionWindow::OnPaint) - EVT_SCROLLWIN(wxTreeCompanionWindow::OnScroll) - EVT_TREE_ITEM_EXPANDED(-1, wxTreeCompanionWindow::OnExpand) - EVT_TREE_ITEM_COLLAPSED(-1, wxTreeCompanionWindow::OnExpand) - EVT_TREE_SEL_CHANGED(-1, wxTreeCompanionWindow::OnSelChanged) - END_EVENT_TABLE() - - wxTreeCompanionWindow::wxTreeCompanionWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos, - const wxSize& sz, - long style): - wxWindow(parent, id, pos, sz, style) - { - m_treeControl = NULL; - } - - wxTreeCompanionWindow::~wxTreeCompanionWindow() - { - } - - void wxTreeCompanionWindow::DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect) - { - if (m_treeControl) - { - wxString text = m_treeControl->GetItemText(id); - - dc.SetTextForeground(*wxBLACK); - dc.SetBackgroundMode(wxTRANSPARENT); - - int textW, textH; - dc.GetTextExtent(text, &textW, &textH); - - int x = 5; - int y = rect.GetY() + wxMax(0, (rect.GetHeight() - textH) / 2); - - dc.DrawText(text, x, y); - } - } - - void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) - { - if (m_treeControl == NULL) - return; - - wxMemoryDC tempDC; - wxSize clientSize = GetClientSize(); - - wxBitmap tempBitmap(clientSize.x, clientSize.y); - - tempDC.SelectObject(tempBitmap); - - tempDC.Clear(); - - #if wxCHECK_VERSION(2,6,0) - wxPen pen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID); - wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - #else //!wxCHECK_VERSION(2,6,0) - wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID); - wxFont font(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); - #endif //wxCHECK_VERSION(2,6,0) - - tempDC.SetPen(pen); - tempDC.SetBrush(*wxTRANSPARENT_BRUSH); - tempDC.SetFont(font); - - wxRect itemRect; - int cy = 0; - wxTreeItemId h, lastH; - for(h = m_treeControl->GetFirstVisibleItem(); - h && m_treeControl->IsVisible(h); - h = m_treeControl->GetNextVisible(h)) - { - if (m_treeControl->GetBoundingRect(h, itemRect)) - { - cy = itemRect.GetTop(); - wxRect drawItemRect(0, cy, clientSize.x, itemRect.GetHeight()); - - lastH = h; - - // Draw the actual item - DrawItem(tempDC, h, drawItemRect); - tempDC.DrawLine(0, cy, clientSize.x, cy); - } - } - - if (lastH.IsOk() && m_treeControl->GetBoundingRect(lastH, itemRect)) - { - cy = itemRect.GetBottom(); - tempDC.DrawLine(0, cy, clientSize.x, cy); - } - - wxPaintDC dc(this); - dc.Blit(0, 0, clientSize.x, clientSize.y, &tempDC, 0, 0); - tempDC.SelectObject(wxNullBitmap); - } - - void wxTreeCompanionWindow::OnScroll(wxScrollWinEvent& event) - { - int orient = event.GetOrientation(); - if (orient == wxHORIZONTAL) - { - event.Skip(); - return; - } - - if (!m_treeControl) - return; - - // TODO: scroll the window physically instead of just refreshing. - Refresh(true); - } - - void wxTreeCompanionWindow::OnExpand(wxTreeEvent& WXUNUSED(event)) - { - // TODO: something more optimized than simply refresh the whole - // window when the tree is expanded/collapsed. Tricky. - Refresh(); - } - - void wxTreeCompanionWindow::OnSelChanged(wxTreeEvent& WXUNUSED(event)) - { - Refresh(); - } - - /* - * wxThinSplitterWindow - */ - - IMPLEMENT_ABSTRACT_CLASS(wxThinSplitterWindow, wxSplitterWindow) - - BEGIN_EVENT_TABLE(wxThinSplitterWindow, wxSplitterWindow) - EVT_SIZE(wxThinSplitterWindow::OnSize) - END_EVENT_TABLE() - - wxThinSplitterWindow::wxThinSplitterWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos, - const wxSize& sz, - long style): - wxSplitterWindow(parent, id, pos, sz, style) - { - } - - void wxThinSplitterWindow::SizeWindows() - { - // The client size may have changed inbetween - // the sizing of the first window and the sizing of - // the second. So repeat SizeWindows. - wxSplitterWindow::SizeWindows(); - wxSplitterWindow::SizeWindows(); - } - - // Tests for x, y over sash - bool wxThinSplitterWindow::SashHitTest(int x, int y, int WXUNUSED(tolerance)) - { - return wxSplitterWindow::SashHitTest(x, y, 4); - } - - void wxThinSplitterWindow::DrawSash(wxDC& dc) - { - if ( m_sashPosition == 0 || !m_windowTwo) - return; - if (GetWindowStyle() & wxSP_NOSASH) - return; - - int w, h; - GetClientSize(&w, &h); - - wxColour faceColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); - wxPen facePen(faceColour, 1, wxSOLID); - wxBrush faceBrush(faceColour, wxSOLID); - - if ( m_splitMode == wxSPLIT_VERTICAL ) - { - dc.SetPen(facePen); - dc.SetBrush(faceBrush); - int h1 = h-1; - int y1 = 0; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER ) - h1 += 1; // Not sure why this is necessary... - if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER) - { - y1 = 2; h1 -= 3; - } - dc.DrawRectangle(m_sashPosition, y1, 3, h1); // 3 == m_sashSize now gone in wxWidgets >= 2.5 - } - else - { - dc.SetPen(facePen); - dc.SetBrush(faceBrush); - int w1 = w-1; - int x1 = 0; - if ( (GetWindowStyleFlag() & wxSP_BORDER) != wxSP_BORDER && (GetWindowStyleFlag() & wxSP_3DBORDER) != wxSP_3DBORDER ) - w1 ++; - if ( (GetWindowStyleFlag() & wxSP_3DBORDER) == wxSP_3DBORDER) - { - x1 = 2; w1 -= 3; - } - dc.DrawRectangle(x1, m_sashPosition, w1, 3); - } - - dc.SetPen(wxNullPen); - dc.SetBrush(wxNullBrush); - } - - void wxThinSplitterWindow::OnSize(wxSizeEvent& event) - { - wxSplitterWindow::OnSize(event); - } - - /* - * wxSplitterScrolledWindow - */ - - IMPLEMENT_ABSTRACT_CLASS(wxSplitterScrolledWindow, wxScrolledWindow) - - BEGIN_EVENT_TABLE(wxSplitterScrolledWindow, wxScrolledWindow) - EVT_SCROLLWIN(wxSplitterScrolledWindow::OnScroll) - EVT_SIZE(wxSplitterScrolledWindow::OnSize) - END_EVENT_TABLE() - - wxSplitterScrolledWindow::wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id, - const wxPoint& pos, - const wxSize& sz, - long style): - wxScrolledWindow(parent, id, pos, sz, style) - { - } - - void wxSplitterScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event)) - { - wxSize sz = GetClientSize(); - if (GetChildren().GetFirst()) - { - ((wxWindow*) GetChildren().GetFirst()->GetData())->SetSize(0, 0, sz.x, sz.y); - } - } - - void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event) - { - // Ensure that events being propagated back up the window hierarchy - // don't cause an infinite loop - static bool inOnScroll = false; - if (inOnScroll) - { - event.Skip(); - return; - } - inOnScroll = true; - - int orient = event.GetOrientation(); - - int nScrollInc = CalcScrollInc(event); - if (nScrollInc == 0) - { - inOnScroll = false; - return; - } - - if (orient == wxHORIZONTAL) - { - inOnScroll = false; - event.Skip(); - return; - } - else - { - int newPos = m_yScrollPosition + nScrollInc; - SetScrollPos(wxVERTICAL, newPos, true ); - } - - if (orient == wxHORIZONTAL) - { - m_xScrollPosition += nScrollInc; - } - else - { - m_yScrollPosition += nScrollInc; - } - - // Find targets in splitter window and send the event to them - wxWindowListNode* node = GetChildren().GetFirst(); - while (node) - { - wxWindow* child = (wxWindow*) node->GetData(); - if (child->IsKindOf(CLASSINFO(wxSplitterWindow))) - { - wxSplitterWindow* splitter = (wxSplitterWindow*) child; - if (splitter->GetWindow1()) - splitter->GetWindow1()->ProcessEvent(event); - if (splitter->GetWindow2()) - splitter->GetWindow2()->ProcessEvent(event); - break; - } - node = node->GetNext(); - } - - #if defined(__WXMAC_CLASSIC__) && !(wxCHECK_VERSION(2,5,3)) - m_targetWindow->MacUpdateImmediately() ; - #else // this should be OK for all modern versions of wx: - m_targetWindow->Update(); - #endif - - inOnScroll = false; - } --- 12,13 ---- Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** staktree.cpp 21 May 2007 01:07:59 -0000 1.38 --- staktree.cpp 22 May 2007 03:27:54 -0000 1.39 *************** *** 36,51 **** BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) EVT_COMBOBOX( ID_WXLUA_STACKDIALOG_COMBO, wxLuaStackDialog::OnSelectStack) ! EVT_TREE_ITEM_EXPANDING(ID_WXLUA_STACKDIALOG_STACKTREE, wxLuaStackDialog::OnItemExpanding) END_EVENT_TABLE() void wxLuaStackDialog::Init() { ! m_treeControl = NULL; ! m_treeSplitter = NULL; ! m_valueSplitter = NULL; ! m_scrolledWindow = NULL; ! m_firstValueWindow = NULL; ! m_secondValueWindow = NULL; ! m_stackComboBox = NULL; m_stack_sel = -1; --- 36,47 ---- BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) EVT_COMBOBOX( ID_WXLUA_STACKDIALOG_COMBO, wxLuaStackDialog::OnSelectStack) ! EVT_LIST_ITEM_ACTIVATED( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemActivated) ! EVT_LIST_DELETE_ITEM( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnItemDeleted) ! EVT_LIST_DELETE_ALL_ITEMS( ID_WXLUA_STACKDIALOG_LISTCTRL, wxLuaStackDialog::OnAllItemsDeleted) END_EVENT_TABLE() void wxLuaStackDialog::Init() { ! m_listCtrl = NULL; m_stackComboBox = NULL; m_stack_sel = -1; *************** *** 73,126 **** wxCB_DROPDOWN | wxCB_READONLY); ! m_scrolledWindow = new wxSplitterScrolledWindow(panel, ! ID_WXLUA_STACKDIALOG_SCRWIN, ! wxDefaultPosition, wxSize(400, 350), ! wxNO_BORDER | wxCLIP_CHILDREN | wxVSCROLL); ! m_treeSplitter = new wxThinSplitterWindow(m_scrolledWindow, ! ID_WXLUA_STACKDIALOG_SPLITWIN, ! wxDefaultPosition, wxDefaultSize, ! wxSP_3DBORDER | wxCLIP_CHILDREN); ! m_treeSplitter->SetSashSize(2); - m_treeControl = new wxRemotelyScrolledTreeCtrl(m_treeSplitter, - ID_WXLUA_STACKDIALOG_STACKTREE, - wxDefaultPosition, wxDefaultSize, - wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxNO_BORDER | wxTR_ROW_LINES); // | wxTR_HIDE_ROOT ); m_imageList = new wxImageList(16, 16, true); m_imageList->Add(wxArtProvider::GetIcon(wxART_FOLDER, wxART_TOOLBAR, wxSize(16,16))); m_imageList->Add(wxArtProvider::GetIcon(wxART_NORMAL_FILE, wxART_TOOLBAR, wxSize(16,16))); ! m_treeControl->SetImageList(m_imageList); ! ! m_valueSplitter = new wxThinSplitterWindow(m_treeSplitter, ! ID_WXLUA_STACKDIALOG_VALUE_SPLITWIN, ! wxDefaultPosition, wxDefaultSize, ! wxSP_NOBORDER | wxCLIP_CHILDREN); ! m_valueSplitter->SetSashSize(2); ! ! m_firstValueWindow = new wxLuaStackDataWindow(m_valueSplitter, ! ID_WXLUA_STACKDIALOG_VALUE_WIN1, ! wxDefaultPosition, wxDefaultSize, ! wxNO_BORDER); ! m_secondValueWindow = new wxLuaStackDataWindow(m_valueSplitter, ! ID_WXLUA_STACKDIALOG_VALUE_WIN2, ! wxDefaultPosition, wxDefaultSize, ! wxNO_BORDER, false); ! ! m_treeSplitter->SplitVertically(m_treeControl, m_valueSplitter); ! m_treeSplitter->SetSashPosition(200); ! m_treeSplitter->SetMinimumPaneSize(10); ! ! m_valueSplitter->SplitVertically(m_firstValueWindow, m_secondValueWindow); ! m_valueSplitter->SetSashPosition(125); ! m_valueSplitter->SetMinimumPaneSize(10); ! ! m_scrolledWindow->SetTargetWindow(m_treeControl); ! m_scrolledWindow->EnableScrolling(false, false); ! ! // Let the two controls know about each other ! m_firstValueWindow->SetTreeCtrl(m_treeControl); ! m_secondValueWindow->SetTreeCtrl(m_treeControl); ! m_treeControl->SetCompanionWindows(m_firstValueWindow, m_secondValueWindow); // set the frame icon --- 69,89 ---- wxCB_DROPDOWN | wxCB_READONLY); ! m_listCtrl = new wxListCtrl( panel, ID_WXLUA_STACKDIALOG_LISTCTRL, ! wxDefaultPosition, wxDefaultSize, ! wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES|wxLC_VRULES ); ! m_listCtrl->InsertColumn(0, wxT("Name"), wxLIST_FORMAT_LEFT, -1); ! m_listCtrl->InsertColumn(1, wxT("Type"), wxLIST_FORMAT_LEFT, -1); ! m_listCtrl->InsertColumn(2, wxT("Value"), wxLIST_FORMAT_LEFT, -1); ! ! m_listCtrl->SetColumnWidth(0, 250); ! m_listCtrl->SetColumnWidth(1, 100); ! m_listCtrl->SetColumnWidth(2, 100); m_imageList = new wxImageList(16, 16, true); m_imageList->Add(wxArtProvider::GetIcon(wxART_FOLDER, wxART_TOOLBAR, wxSize(16,16))); + m_imageList->Add(wxArtProvider::GetIcon(wxART_NEW_DIR, wxART_TOOLBAR, wxSize(16,16))); m_imageList->Add(wxArtProvider::GetIcon(wxART_NORMAL_FILE, wxART_TOOLBAR, wxSize(16,16))); ! m_listCtrl->SetImageList(m_imageList, wxIMAGE_LIST_SMALL); // set the frame icon *************** *** 130,134 **** wxBoxSizer* rootSizer = new wxBoxSizer(wxVERTICAL); rootSizer->Add(m_stackComboBox, 0, wxEXPAND|wxBOTTOM, 4); ! rootSizer->Add(m_scrolledWindow, 1, wxEXPAND); rootSizer->SetMinSize(450, 400); panel->SetSizer(rootSizer); --- 93,97 ---- wxBoxSizer* rootSizer = new wxBoxSizer(wxVERTICAL); rootSizer->Add(m_stackComboBox, 0, wxEXPAND|wxBOTTOM, 4); ! rootSizer->Add(m_listCtrl, 1, wxEXPAND); rootSizer->SetMinSize(450, 400); panel->SetSizer(rootSizer); *************** *** 142,146 **** wxLuaStackDialog::~wxLuaStackDialog() { ! if (m_treeControl) m_treeControl->SetImageList(NULL); delete m_imageList; --- 105,111 ---- wxLuaStackDialog::~wxLuaStackDialog() { ! DeleteAllListItemData(); ! ! if (m_listCtrl) m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_SMALL); delete m_imageList; *************** *** 169,173 **** FillStackEntry(nEntry, debugData); } ! void wxLuaStackDialog::EnumerateTable(int nRef, int nEntry, const wxTreeItemId& treeId) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); --- 134,138 ---- FillStackEntry(nEntry, debugData); } ! void wxLuaStackDialog::EnumerateTable(int nRef, int nEntry, long lc_item) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); *************** *** 175,181 **** wxLuaDebugData debugData; debugData.EnumerateTable(m_wxlState, nRef, nEntry, m_luaReferences); ! FillTableEntry(treeId, debugData); } ! void wxLuaStackDialog::EnumerateGlobalData(const wxTreeItemId& treeId) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); --- 140,146 ---- wxLuaDebugData debugData; debugData.EnumerateTable(m_wxlState, nRef, nEntry, m_luaReferences); ! FillTableEntry(lc_item, debugData); } ! void wxLuaStackDialog::EnumerateGlobalData(long lc_item) { wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); *************** *** 183,187 **** wxLuaDebugData debugData; debugData.EnumerateTable(m_wxlState, -1, -1, m_luaReferences); // Get global table ! FillTableEntry(treeId, debugData); } --- 148,152 ---- wxLuaDebugData debugData; debugData.EnumerateTable(m_wxlState, -1, -1, m_luaReferences); // Get global table ! FillTableEntry(lc_item, debugData); } *************** *** 208,214 **** void wxLuaStackDialog::FillStackEntry(int WXUNUSED(nEntry), const wxLuaDebugData& debugData) { ! m_treeControl->DeleteAllItems(); ! wxTreeItemId rootItem = m_treeControl->AddRoot(_("Locals"), -1, -1); ! m_treeControl->AdjustRemoteScrollbars(); if (debugData.GetCount() > 0u) --- 173,180 ---- void wxLuaStackDialog::FillStackEntry(int WXUNUSED(nEntry), const wxLuaDebugData& debugData) { ! DeleteAllListItemData(); ! m_listCtrl->DeleteAllItems(); ! ! long rootItem = m_listCtrl->InsertItem(0, _("Locals"), 0); if (debugData.GetCount() > 0u) *************** *** 217,257 **** // If at global scope, process globals if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) ! { ! EnumerateGlobalData(rootItem); ! ! if (m_wxlState.Ok()) ! GetDerivedAndTrackedItems(m_treeControl, rootItem); ! } ! m_treeControl->Expand(rootItem); //not if wxTR_HIDE_ROOT } ! void wxLuaStackDialog::FillTableEntry(wxTreeItemId treeId, const wxLuaDebugData& debugData) { if (debugData.GetCount() == 0) ! m_treeControl->SetItemHasChildren(treeId, false); else { size_t n, count = debugData.GetCount(); for (n = 0; n < count; ++n) { const wxLuaDebugDataItem *item = debugData.Item(n); ! int nOffset = (item->GetReference() != LUA_NOREF) ? 0 : 1; ! wxTreeItemId treeNode = m_treeControl->AppendItem(treeId, ! item->GetName(), ! nOffset, ! nOffset, ! new wxLuaDebugDataItem(*item)); if (item->GetReference() != LUA_NOREF) ! m_treeControl->SetItemHasChildren(treeNode); } } - - //if (treeId != m_treeControl->GetRootItem()) not if wxTR_HIDE_ROOT - m_treeControl->Expand(treeId); } ! void wxLuaStackDialog::GetDerivedAndTrackedItems(wxRemotelyScrolledTreeCtrl *treeControl, const wxTreeItemId& rootItem) { wxLuaState wxlState(m_wxlState); --- 183,237 ---- // If at global scope, process globals if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) ! EnumerateGlobalData(m_listCtrl->GetItemCount()); ! if (m_wxlState.Ok()) ! GetDerivedAndTrackedItems(); } ! void wxLuaStackDialog::FillTableEntry(long lc_item_, const wxLuaDebugData& debugData) { + wxCHECK_RET(lc_item_ <= m_listCtrl->GetItemCount(), wxT("Attempting to add list item past end")); + if (debugData.GetCount() == 0) ! return; //m_treeControl->SetItemHasChildren(treeId, false); else { + wxString levelStr; + + // If less than the count we're expanding a item, else adding a new root + if (lc_item_ < m_listCtrl->GetItemCount()) + { + wxString levelText(m_listCtrl->GetItemText(lc_item_).BeforeLast(wxT(' '))); + levelStr = levelText + wxT("--> "); + } + else + lc_item_--; + size_t n, count = debugData.GetCount(); + long lc_item = lc_item_; for (n = 0; n < count; ++n) { const wxLuaDebugDataItem *item = debugData.Item(n); ! //wxPrintf(wxT("FillTableEntry %ld %ld n %d %ld '%s'\n"), lc_item_, lc_item, n, (long)item, item->GetName().c_str()); ! wxListItem info; ! info.SetId(lc_item+1); ! info.SetText(levelStr + item->GetName()); ! info.SetData(new wxLuaDebugDataItem(*item)); if (item->GetReference() != LUA_NOREF) ! info.SetImage(0); ! else ! info.SetImage(2); ! ! lc_item = m_listCtrl->InsertItem(info); ! info.SetId(lc_item); ! ! m_listCtrl->SetItem(lc_item, 1, item->GetType()); ! m_listCtrl->SetItem(lc_item, 2, item->GetValue()); } } } ! void wxLuaStackDialog::GetDerivedAndTrackedItems() { wxLuaState wxlState(m_wxlState); *************** *** 263,280 **** int destroyCount = wxlState.GetTrackedWinDestroyCallbackList()->GetCount(); ! wxLuaDebugDataItem* trackedItem = new wxLuaDebugDataItem(_("Tracked List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), trackedCount), wxT(""), LUA_NOREF, 0); ! wxLuaDebugDataItem* callbackItem = new wxLuaDebugDataItem(_("Event Callback List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), callbackCount), wxT(""), LUA_NOREF, 0); ! wxLuaDebugDataItem* windowItem = new wxLuaDebugDataItem(_("wxWindow List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), windowCount), wxT(""), LUA_NOREF, 0); ! wxLuaDebugDataItem* destroyItem = new wxLuaDebugDataItem(_("wxWindow Destroy Callback List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), destroyCount), wxT(""), LUA_NOREF, 0); ! wxTreeItemId treeNode; ! treeNode = treeControl->AppendItem(rootItem, wxT("Tracked List"), 1, 1, trackedItem); ! if (trackedCount > 0) m_treeControl->SetItemHasChildren(treeNode); ! treeNode = treeControl->AppendItem(rootItem, wxT("Event Callback List"), 1, 1, callbackItem); ! if (callbackCount > 0) m_treeControl->SetItemHasChildren(treeNode); ! treeNode = treeControl->AppendItem(rootItem, wxT("wxWindow List"), 1, 1, windowItem); ! if (windowCount > 0) m_treeControl->SetItemHasChildren(treeNode); ! treeNode = treeControl->AppendItem(rootItem, wxT("wxWindow Destroy List"), 1, 1, destroyItem); } --- 243,271 ---- int destroyCount = wxlState.GetTrackedWinDestroyCallbackList()->GetCount(); ! // note: don't have spaces here since we use them to mark expanded levels ! wxLuaDebugDataItem* trackedItem = new wxLuaDebugDataItem(_("Tracked_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), trackedCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* callbackItem = new wxLuaDebugDataItem(_("Event_Callback_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), callbackCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* windowItem = new wxLuaDebugDataItem(_("Top_Level_wxWindow_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), windowCount), wxT(""), 1, 0); ! wxLuaDebugDataItem* destroyItem = new wxLuaDebugDataItem(_("wxWindow_Destroy_List"), wxT("wxLuaData"), wxString::Format(wxT("Count %d"), destroyCount), wxT(""), 1, 0); ! wxLuaDebugData dataArr; // this deletes the items ! dataArr.Add(trackedItem); ! dataArr.Add(callbackItem); ! dataArr.Add(windowItem); ! dataArr.Add(destroyItem); ! FillTableEntry(m_listCtrl->GetItemCount(), dataArr); ! } ! ! void wxLuaStackDialog::OnItemDeleted(wxListEvent &event) ! { ! wxLuaDebugDataItem* wxlDItem = (wxLuaDebugDataItem*)event.GetData(); ! if (wxlDItem != NULL) ! delete wxlDItem; ! } ! void wxLuaStackDialog::OnAllItemsDeleted(wxListEvent &event) ! { ! DeleteAllListItemData(); ! event.Skip(); } *************** *** 293,321 **** } ! void wxLuaStackDialog::OnItemExpanding(wxTreeEvent &event) { ! ItemExpanding(event.GetItem()); } ! void wxLuaStackDialog::ItemExpanding(const wxTreeItemId &itemNode) { ! if (itemNode) { ! wxLuaDebugDataItem *pDebugDataItem = (wxLuaDebugDataItem *)m_treeControl->GetItemData(itemNode); if ((pDebugDataItem != NULL) && !pDebugDataItem->IsExpanded()) { ! pDebugDataItem->SetExpanded(true); ! ! int nRef = pDebugDataItem->GetReference(); ! if (nRef != LUA_NOREF) { ! int nIndex = pDebugDataItem->GetIndex() + 1; ! EnumerateTable(nRef, nIndex, itemNode); } ! else if (m_wxlState.Ok() && ! ((pDebugDataItem->GetName() == _("Tracked List")) || ! (pDebugDataItem->GetName() == _("Event Callback List")) || ! (pDebugDataItem->GetName() == _("wxWindow List")))) { wxLuaState wxlState(m_wxlState); --- 284,330 ---- } ! void wxLuaStackDialog::OnItemActivated(wxListEvent &event) { ! ItemExpanding(event.GetIndex()); //.GetIndex()); } ! void wxLuaStackDialog::ItemExpanding(long lc_item) { ! if (1) { ! wxLuaDebugDataItem *pDebugDataItem = (wxLuaDebugDataItem *)m_listCtrl->GetItemData(lc_item); ! ! // only expand items once if ((pDebugDataItem != NULL) && !pDebugDataItem->IsExpanded()) { ! // Check and block linked tables already shown ! if (pDebugDataItem->GetType() == wxT("Table")) { ! wxString val = pDebugDataItem->GetValue(); ! int n, count = m_listCtrl->GetItemCount(); ! for (n = 0; n < count; n++) ! { ! wxLuaDebugDataItem *itm = (wxLuaDebugDataItem *)m_listCtrl->GetItemData(n); ! if (itm && (itm != pDebugDataItem) && (itm->GetValue() == val) && itm->IsExpanded()) ! { ! wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), ! wxT("wxLua Stack"), ! wxOK | wxCENTRE, this); ! ! m_listCtrl->SetItemState(n, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); ! m_listCtrl->SetItemState(n, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); ! m_listCtrl->EnsureVisible(n); ! return; ! } ! } } ! ! int nRef = pDebugDataItem->GetReference(); ! if (m_wxlState.Ok() && ! ((pDebugDataItem->GetName() == _("Tracked_List")) || ! (pDebugDataItem->GetName() == _("Event_Callback_List")) || ! (pDebugDataItem->GetName() == _("Top_Level_wxWindow_List")) || ! (pDebugDataItem->GetName() == _("wxWindow_Destroy_List")))) { wxLuaState wxlState(m_wxlState); *************** *** 324,328 **** wxArrayInt counts; ! if (pDebugDataItem->GetName() == _("Tracked List")) { wxLongToLongHashMap::iterator it; --- 333,337 ---- wxArrayInt counts; ! if (pDebugDataItem->GetName() == _("Tracked_List")) { wxLongToLongHashMap::iterator it; *************** *** 349,353 **** } } ! else if (pDebugDataItem->GetName() == _("Event Callback List")) { wxList::compatibility_iterator node = wxlState.GetTrackedCallbackList()->GetFirst(); --- 358,362 ---- } } ! else if (pDebugDataItem->GetName() == _("Event_Callback_List")) { wxList::compatibility_iterator node = wxlState.GetTrackedCallbackList()->GetFirst(); *************** *** 382,386 **** } } ! else { wxWindowList::compatibility_iterator node = wxlState.GetLuaStateData()->m_windowList.GetFirst(); --- 391,395 ---- } } ! else if (pDebugDataItem->GetName() == _("Top_Level_wxWindow_List")) { wxWindowList::compatibility_iterator node = wxlState.GetLuaStateData()->m_windowList.GetFirst(); *************** *** 405,408 **** --- 414,440 ---- } } + else if (pDebugDataItem->GetName() == _("wxWindow_Destroy_List")) + { + wxList::compatibility_iterator node = wxlState.GetTrackedWinDestroyCallbackList()->GetFirst(); + while (node) + { + wxLuaWinDestroyCallback *pCallback = (wxLuaWinDestroyCallback *) node->GetData(); + wxCHECK_RET(pCallback, wxT("Invalid wxLuaWinDestroyCallback")); + + wxString name(wxT("Unknown Tracked Window Type")); + + wxObject* obj = (wxObject*)pCallback->GetEvtHandler(); + if (obj && obj->GetClassInfo() && obj->GetClassInfo()->GetClassName()) + name = obj->GetClassInfo()->GetClassName(); + + names.Add(name); + counts.Add(1); + + node = node->GetNext(); + } + } + + pDebugDataItem->SetExpanded(true); + m_listCtrl->SetItemImage(lc_item, 1); wxLuaDebugData dataArr; *************** *** 414,418 **** } ! FillTableEntry(itemNode, dataArr); } } --- 446,458 ---- } ! FillTableEntry(lc_item, dataArr); ! } ! else if (nRef != LUA_NOREF) ! { ! pDebugDataItem->SetExpanded(true); ! m_listCtrl->SetItemImage(lc_item, 1); ! ! int nIndex = pDebugDataItem->GetIndex() + 1; ! EnumerateTable(nRef, nIndex, lc_item); } } *************** *** 420,462 **** } ! // ---------------------------------------------------------------------------- ! // wxLuaStackDataWindow ! // ---------------------------------------------------------------------------- ! IMPLEMENT_ABSTRACT_CLASS(wxLuaStackDataWindow, wxTreeCompanionWindow) ! ! wxLuaStackDataWindow::wxLuaStackDataWindow(wxWindow *parent, wxWindowID id, ! const wxPoint &pos, const wxSize &sz, ! long style, bool first_window) ! :wxTreeCompanionWindow(parent, id, pos, sz, style), m_first_window(first_window) ! { ! m_text_height = 0; ! SetBackgroundColour(*wxWHITE); ! } ! ! void wxLuaStackDataWindow::DrawItem(wxDC &dc, wxTreeItemId id, const wxRect &rect) { ! if (!m_treeControl) return; ! ! wxLuaDebugDataItem *itemData = (wxLuaDebugDataItem *)m_treeControl->GetItemData(id); ! ! if (itemData != NULL) { ! dc.SetTextForeground(*wxBLACK); ! dc.SetBackgroundMode(wxTRANSPARENT); ! ! wxString txt(m_first_window ? itemData->GetType() : itemData->GetValue()); ! ! if (m_text_height == 0) ! { ! int text_width = 0; ! dc.GetTextExtent(wxT("1234ABCDEabcdejZ"), &text_width, &m_text_height); ! } ! ! int x = 5; ! int y = (rect.GetHeight() - m_text_height) / 2; // try to center it, else pin to top ! ! y = rect.GetY() + wxMax(0, y); ! ! dc.DrawText(txt, x, y); } } --- 460,471 ---- } ! void wxLuaStackDialog::DeleteAllListItemData() { ! int i, count = m_listCtrl->GetItemCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugDataItem* wxlDItem = (wxLuaDebugDataItem*)m_listCtrl->GetItemData(i); ! if (wxlDItem != NULL) ! delete wxlDItem; } } |
From: John L. <jr...@us...> - 2007-05-22 03:27:58
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8900/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h Log Message: Changed wxLuaStackDialog to use a wxListCtrl instead of a hacked wxTreeCtrl that tries to be a wxListCtrl. Works better. Removed all code in splttree.h/cpp before removing it completely. Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxldserv.h 21 May 2007 01:08:00 -0000 1.32 --- wxldserv.h 22 May 2007 03:27:54 -0000 1.33 *************** *** 111,116 **** virtual void EnumerateStack(); virtual void EnumerateStackEntry(int nEntry); ! virtual void EnumerateTable(int nRef, int nEntry, const wxTreeItemId& treeId); ! virtual void EnumerateGlobalData(const wxTreeItemId& treeId); protected: --- 111,116 ---- virtual void EnumerateStack(); virtual void EnumerateStackEntry(int nEntry); ! virtual void EnumerateTable(int nRef, int nEntry, long lc_item); ! virtual void EnumerateGlobalData(long lc_item); protected: |
From: John L. <jr...@us...> - 2007-05-22 03:27:58
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8900/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp Log Message: Changed wxLuaStackDialog to use a wxListCtrl instead of a hacked wxTreeCtrl that tries to be a wxListCtrl. Works better. Removed all code in splttree.h/cpp before removing it completely. Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wxldserv.cpp 21 May 2007 01:08:00 -0000 1.39 --- wxldserv.cpp 22 May 2007 03:27:54 -0000 1.40 *************** *** 121,136 **** } ! void wxLuaDebuggerStackDialog::EnumerateTable(int nRef, int nEntry, const wxTreeItemId& treeId) { wxCHECK_RET(m_luaDebugger, wxT("Invalid wxLuaDebuggerServer")); wxBeginBusyCursor(); // ended in wxLuaDebuggerBase::OnDebugXXX ! m_luaDebugger->EnumerateTable(nRef, nEntry, (long)treeId.m_pItem); } ! void wxLuaDebuggerStackDialog::EnumerateGlobalData(const wxTreeItemId& treeId) { wxCHECK_RET(m_luaDebugger, wxT("Invalid wxLuaDebuggerServer")); wxBeginBusyCursor(); // ended in wxLuaDebuggerBase::OnDebugXXX ! m_luaDebugger->EnumerateTable(-1, -1, (long)treeId.m_pItem); } --- 121,136 ---- } ! void wxLuaDebuggerStackDialog::EnumerateTable(int nRef, int nEntry, long lc_item) { wxCHECK_RET(m_luaDebugger, wxT("Invalid wxLuaDebuggerServer")); wxBeginBusyCursor(); // ended in wxLuaDebuggerBase::OnDebugXXX ! m_luaDebugger->EnumerateTable(nRef, nEntry, lc_item); } ! void wxLuaDebuggerStackDialog::EnumerateGlobalData(long lc_item) { wxCHECK_RET(m_luaDebugger, wxT("Invalid wxLuaDebuggerServer")); wxBeginBusyCursor(); // ended in wxLuaDebuggerBase::OnDebugXXX ! m_luaDebugger->EnumerateTable(-1, -1, lc_item); } *************** *** 632,636 **** { if (GetStackDialog() != NULL) ! GetStackDialog()->FillTableEntry(wxTreeItemId((wxTreeItemIdValue)event.GetReference()), event.GetDebugData()); else event.Skip(); --- 632,636 ---- { if (GetStackDialog() != NULL) ! GetStackDialog()->FillTableEntry(event.GetReference(), event.GetDebugData()); else event.Skip(); |
From: John L. <jr...@us...> - 2007-05-22 03:27:57
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8900/wxLua/docs Modified Files: changelog.txt Log Message: Changed wxLuaStackDialog to use a wxListCtrl instead of a hacked wxTreeCtrl that tries to be a wxListCtrl. Works better. Removed all code in splttree.h/cpp before removing it completely. Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** changelog.txt 21 May 2007 01:07:59 -0000 1.29 --- changelog.txt 22 May 2007 03:27:54 -0000 1.30 *************** *** 20,23 **** --- 20,25 ---- - Put derived functions into the LUA_REGISTRYINDEX instead of the wxLuaState's m_pDerivedList. + - Change the wxLuaStackDialog to use a wxListCtrl instead of a hacked + wxTreeCtrl that tries to act like a listctrl. Cleaner, faster, and smaller. version 2.8.0.0 (released 24/12/2006) |
From: John L. <jr...@us...> - 2007-05-21 01:08:33
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14147/wxLua/docs Modified Files: changelog.txt wxlua.html Log Message: Remove all code in dservice as it wasn't used Removed m_pDerivedList and put derived lua functions into the lua registry index A little more cleanup in the socket and editor.wx.lua code. Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxlua.html 3 May 2007 21:05:34 -0000 1.17 --- wxlua.html 21 May 2007 01:07:59 -0000 1.18 *************** *** 1,8 **** <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html><head> ! <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> ! <meta content="John Labenski" name="author"></head> ! <body><h2><u>wxLua Documentation</u></h2> <a href="http://wxlua.sourceforge.net">wxLua</a> is a <a href="http://www.lua.org">Lua</a> --- 1,19 ---- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> [...3226 lines suppressed...] ! LuaCall(int narg, int clear)</li> ! ! <ul> ! ! <li>Uses lua_call to run a chunk on the stack, but sets ! things up for wxLua first.</li> ! ! <li>Returns lua's error ! code LUA_ERRXXX or 0 on sucess</li> ! ! </ul> ! ! <li>The other functions are documented in <span style="font-style: italic;">wxLua/modules/wxlua/include/wxlstate.h</span>.</li> ! ! </ul> ! ! </body> ! </html> Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** changelog.txt 8 May 2007 00:55:12 -0000 1.28 --- changelog.txt 21 May 2007 01:07:59 -0000 1.29 *************** *** 15,18 **** --- 15,23 ---- - Updated lua to 5.1.2 - Removed wxEVT_LUA_CONSOLE compatibility #define, use wxEVT_LUA_PRINT now + - Refactored and cleaned up socket debugging code. + Removed exception code. + Removed DebuggerService code as it wasn't used. + - Put derived functions into the LUA_REGISTRYINDEX instead of the + wxLuaState's m_pDerivedList. version 2.8.0.0 (released 24/12/2006) |
From: John L. <jr...@us...> - 2007-05-21 01:08:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14147/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp Log Message: Remove all code in dservice as it wasn't used Removed m_pDerivedList and put derived lua functions into the lua registry index A little more cleanup in the socket and editor.wx.lua code. Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** staktree.cpp 19 Mar 2007 03:47:21 -0000 1.37 --- staktree.cpp 21 May 2007 01:07:59 -0000 1.38 *************** *** 258,262 **** wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); - int derivedCount = wxlState.GetLuaStateData()->m_pDerivedList.size(); int trackedCount = wxlState.GetTrackedObjects()->size(); int callbackCount = wxlState.GetTrackedCallbackList()->GetCount(); --- 258,261 ---- *************** *** 264,268 **** int destroyCount = wxlState.GetTrackedWinDestroyCallbackList()->GetCount(); - wxLuaDebugDataItem* derivedItem = new wxLuaDebugDataItem(_("Derived List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), derivedCount), wxT(""), LUA_NOREF, 0); wxLuaDebugDataItem* trackedItem = new wxLuaDebugDataItem(_("Tracked List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), trackedCount), wxT(""), LUA_NOREF, 0); wxLuaDebugDataItem* callbackItem = new wxLuaDebugDataItem(_("Event Callback List"), wxT("wxLuaData"), wxString::Format(wxT("%d"), callbackCount), wxT(""), LUA_NOREF, 0); --- 263,266 ---- *************** *** 272,277 **** wxTreeItemId treeNode; - treeControl->AppendItem(rootItem, wxT("Derived List"), 1, 1, derivedItem); - treeNode = treeControl->AppendItem(rootItem, wxT("Tracked List"), 1, 1, trackedItem); if (trackedCount > 0) m_treeControl->SetItemHasChildren(treeNode); --- 270,273 ---- |
From: John L. <jr...@us...> - 2007-05-21 01:08:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14147/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldserv.h wxlsock.h wxluasocketdefs.h Log Message: Remove all code in dservice as it wasn't used Removed m_pDerivedList and put derived lua functions into the lua registry index A little more cleanup in the socket and editor.wx.lua code. Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxldserv.h 19 May 2007 17:14:13 -0000 1.31 --- wxldserv.h 21 May 2007 01:08:00 -0000 1.32 *************** *** 19,23 **** class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerBase; class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggerEvent; - class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; // ---------------------------------------------------------------------------- --- 19,22 ---- Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxlsock.h 19 May 2007 02:05:47 -0000 1.21 --- wxlsock.h 21 May 2007 01:08:00 -0000 1.22 *************** *** 59,62 **** --- 59,67 ---- virtual ~wxLuaSocketBase() {} + // Get the port used for the socket, -1 if not initialized + int GetPortNumber() const { return m_port_number; } + // Get the address of the socket, empty string if not initialized + wxString GetAddress() const { return m_address; } + // Is the socket currently connected virtual bool IsConnected() = 0; *************** *** 96,101 **** // implementation ! wxString m_name; // human readable name for the socket, for debugging ! wxString m_errorMsg; // human readable error message int m_port_number; // The port that's used, else -1 --- 101,107 ---- // implementation ! wxString m_name; // human readable name of socket, for debugging ! wxString m_errorMsg; // human readable error message ! wxString m_address; // The address for the socket to use int m_port_number; // The port that's used, else -1 Index: wxluasocketdefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocketdefs.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxluasocketdefs.h 5 Sep 2006 21:48:11 -0000 1.4 --- wxluasocketdefs.h 21 May 2007 01:08:00 -0000 1.5 *************** *** 33,35 **** --- 33,44 ---- #endif + // ---------------------------------------------------------------------------- + // Defines for various things + // ---------------------------------------------------------------------------- + + #define ID_WXLUA_SERVER 1200 + #define ID_WXLUA_SOCKET 1201 + + #define WXLUA_SOCKET_PORT 1561 + #endif // __WX_WXLUASOCKETDEFS_H__ Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dservice.h 19 May 2007 02:05:47 -0000 1.22 --- dservice.h 21 May 2007 01:08:00 -0000 1.23 *************** *** 28,266 **** // This service waits for client - debugger to connect. - #ifndef WX_LUA_DEBUGGERSERVICE_H - #define WX_LUA_DEBUGGERSERVICE_H - - #include "wxluasocket/include/wxluasocketdefs.h" - - #include "wx/dynarray.h" - #include "wx/filename.h" - - #include "wxlua/include/wxlua.h" - #include "wxluasocket/include/wxlsock.h" - - #define ID_WXLUA_SERVER 1200 - #define ID_WXLUA_SOCKET 1201 - #define ID_WXLUA_SOCKET_DEBUGGER 1202 - - #define WXLUA_SOCKET_PORT 1561 - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugService; - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggee; - - #include "wxluasocket/include/wxldserv.h" - - WX_DECLARE_USER_EXPORTED_LIST(wxLuawxSocket, wxLuawxSocketList, WXDLLIMPEXP_WXLUASOCKET); - - // ---------------------------------------------------------------------------- - // wxLuaBreakPoint - Project BreakPoint - a filename/line pair - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaBreakPoint : public wxObject - { - public: - wxLuaBreakPoint(); - wxLuaBreakPoint(const wxLuaBreakPoint& breakPoint) { Copy(breakPoint); } - wxLuaBreakPoint(const wxFileName& fileName, int line, bool enabled = true); - ~wxLuaBreakPoint() {} - - // Filename - wxFileName& GetFileName() { return m_fileName; } - void SetFileName(wxFileName& fileName) { m_fileName = fileName; } - - // Line - int GetLine() const { return m_line; } - void SetLine(int line) { m_line = line; } - - // Breakpoint Enabled - int GetEnabled() const { return m_enabled; } - void SetEnabled(bool enable) { m_enabled = enable; } - - static wxString GetBreakPointKey(const wxFileName& fileName, int line) - { - return wxString::Format(wxT("%u:%s"), line, fileName.GetFullPath().c_str()); - } - - // operators - void operator= (const wxLuaBreakPoint& data) { Copy(data); } - - private: - void Copy(const wxLuaBreakPoint& breakPoint); - - wxFileName m_fileName; - bool m_enabled; - int m_line; - }; - - WX_DECLARE_USER_EXPORTED_LIST(wxLuaBreakPoint, wxLuaBreakPointList, WXDLLIMPEXP_WXLUASOCKET); - - // ---------------------------------------------------------------------------- - // wxLuaDebuggee - Accepts Commands from Debugger, Redirects Lua Events to Debugger - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebuggee : public wxObject - { - friend class wxLuaDebugService; - - public: - wxLuaDebuggee(wxLuaDebugService * debugService, lua_State *L); - virtual ~wxLuaDebuggee(); - - void AddBreakPoint(const wxFileName &fileName, int lineNumber); - void RemoveBreakPoint(const wxFileName &fileName, int lineNumber); - void DisableBreakPoint(const wxFileName &fileName, int lineNumber); - void EnableBreakPoint(const wxFileName &fileName, int lineNumber); - - void InteruptWait(); - - void NotifyBreakPoints(wxLuawxSocket* debugSocket = NULL); - protected: - - enum debugOperations - { - DEBUG_STEP, - DEBUG_STEPOVER, - DEBUG_STEPOUT, - DEBUG_GO - }; - - wxLuaDebugService* m_debugService; - wxLuaState m_wxlState; - - wxLuaBreakPointList m_breakPointList; - - debugOperations m_nextOperation; - bool m_forceBreak; - bool m_resetRequested; - bool m_fErrorsSeen; - int m_nFramesUntilBreak; - wxArrayInt m_references; - bool m_InDebugHook; - bool m_Wait; - wxCriticalSection m_luaCriticalSection; - - // Enter/Leave critical section for the threaded sockets - void EnterLuaCriticalSection() { m_luaCriticalSection.Enter(); } - void LeaveLuaCriticalSection() { m_luaCriticalSection.Leave(); } - - mutable wxCriticalSection m_breakPointListCriticalSection; - - // Do Debug Commands - void ClearAllBreakPoints(); - void Step(); - void StepOver(); - void StepOut(); - void Continue(); - void Break(); - void Reset(); - bool EnumerateStack(); - bool EnumerateStackEntry(int stackRef); - bool EnumerateTable(int tableRef, int nIndex, long itemNode); - bool EvaluateExpr(int exprRef, const wxString &strExpr); - void ClearReferences(); - - // Some Outputs - void DisplayError(const wxString &strError); - void NotifyPrint(const wxString &strMsg); - - // Debug Events from LuaDebugHook - bool DebugHook(int event); - - private: - bool AtBreakPoint(const wxFileName &fileName, int lineNumber) const; - - wxFileName GetDebugInfo(int &lineNumber) const; - - // Debug Events from Lua Interpreter - static void LUACALL LuaDebugHook(lua_State *L, lua_Debug *debug); - static int LUACALL LuaPrint (lua_State *L); - }; - - - WX_DECLARE_USER_EXPORTED_LIST(wxLuaDebuggee, wxLuaDebuggeeList, WXDLLIMPEXP_WXLUASOCKET); - - // ---------------------------------------------------------------------------- - // wxLuaDebugService - App Debugging Service - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugService : public wxEvtHandler - { - public: - wxLuaDebugService(int portNumber = WXLUA_SOCKET_PORT); - virtual ~wxLuaDebugService(); - - // Start Service - bool StartService(); - - // Debug Lua Interpreter - void DebugLua(lua_State* L); - - bool IsDebugger(); - - // Send Data to Debugger - bool NotifyBreak(const wxFileName &fileName, int lineNumber); - bool NotifyPrint(const wxString &errorMsg); - bool NotifyError(const wxString &errorMsg); - bool NotifyExit(); - bool NotifyStackEnumeration(const wxLuaDebugData& debugData); - bool NotifyStackEntryEnumeration(int stackRef, const wxLuaDebugData& debugData); - bool NotifyTableEnumeration(long itemNode, const wxLuaDebugData& debugData); - bool NotifyEvaluateExpr(int exprRef, const wxString &strResult); - bool NotifyBreakpointAdded(wxLuaBreakPoint& breakPoint, wxLuawxSocket* debugSocket = NULL); - bool NotifyBreakpointRemoved(wxLuaBreakPoint& breakPoint, wxLuawxSocket* debugSocket = NULL); - - wxLuaDebuggee* GetActiveDebuggee(); - - bool WaitForRead(); - - protected: - void OnServerEvent(wxSocketEvent& event); - void OnSocketEvent(wxSocketEvent& event); - - wxLuawxSocket* GetDebugSocket(wxSocketBase* sock); - - private: - wxSocketServer* m_serverSocket; - int m_portNumber; - - // Debuggers connected to Service - mutable wxCriticalSection m_debuggerSocketListCriticalSection; - wxLuawxSocketList m_debuggerSocketList; - - // Lua Interpreters Hooked by Service - mutable wxCriticalSection m_debuggeeListCriticalSection; - wxLuaDebuggeeList m_debuggeeList; - - mutable wxCriticalSection m_notifyBreakCriticalSection; - - DECLARE_EVENT_TABLE() - }; - - // ---------------------------------------------------------------------------- - // wxLuaDebugger - Lua Debugger Client (Client Side of Lua Debug Service) - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugger : public wxLuaDebuggerBase - { - public: - wxLuaDebugger(int port_number = WXLUA_SOCKET_PORT); - virtual ~wxLuaDebugger(); - - bool Connect(const wxString& hostname = wxT("localhost"), int portNumber = WXLUA_SOCKET_PORT); - - virtual wxLuaSocketBase* GetSocketBase() { return m_debuggerSocket; } - - protected: - void OnSocketEvent(wxSocketEvent& event); - - // Not Required for Debug Service - virtual bool Run(const wxString &WXUNUSED(fileName), - const wxString &WXUNUSED(buffer)) { return false; } - - private: - mutable wxCriticalSection m_debuggerSocketCriticalSection; - wxLuawxSocket* m_debuggerSocket; - - DECLARE_EVENT_TABLE() - }; - - #endif // WX_LUA_DEBUGGERSERVICE_H --- 28,29 ---- |
From: John L. <jr...@us...> - 2007-05-21 01:08:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14147/wxLua/modules/wxbind/src Modified Files: wxlhtmlwin.cpp wxlprint.cpp Log Message: Remove all code in dservice as it wasn't used Removed m_pDerivedList and put derived lua functions into the lua registry index A little more cleanup in the socket and editor.wx.lua code. Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxlprint.cpp 23 Mar 2007 04:27:23 -0000 1.15 --- wxlprint.cpp 21 May 2007 01:07:59 -0000 1.16 *************** *** 53,57 **** if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "GetPageInfo")) { int nOldTop = m_wxlState.lua_GetTop(); --- 53,57 ---- if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "GetPageInfo", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 83,87 **** if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "HasPage")) { int nOldTop = m_wxlState.lua_GetTop(); --- 83,87 ---- if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "HasPage", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 133,137 **** if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnBeginDocument")) { int nOldTop = m_wxlState.lua_GetTop(); --- 133,137 ---- if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnBeginDocument", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 163,167 **** // NOTE: The wxLua program MUST call the base class, see printing.wx.lua if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnEndDocument")) { int nOldTop = m_wxlState.lua_GetTop(); --- 163,167 ---- // NOTE: The wxLua program MUST call the base class, see printing.wx.lua if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnEndDocument", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 179,183 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnBeginPrinting")) { int nOldTop = m_wxlState.lua_GetTop(); --- 179,183 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnBeginPrinting", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 195,199 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnEndPrinting")) { int nOldTop = m_wxlState.lua_GetTop(); --- 195,199 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnEndPrinting", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 211,215 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnPreparePrinting")) { int nOldTop = m_wxlState.lua_GetTop(); --- 211,215 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnPreparePrinting", true)) { int nOldTop = m_wxlState.lua_GetTop(); *************** *** 229,233 **** if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnPrintPage")) { int nOldTop = m_wxlState.lua_GetTop(); --- 229,233 ---- if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnPrintPage", true)) { int nOldTop = m_wxlState.lua_GetTop(); Index: wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlhtmlwin.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxlhtmlwin.cpp 22 Feb 2007 05:40:53 -0000 1.14 --- wxlhtmlwin.cpp 21 May 2007 01:07:59 -0000 1.15 *************** *** 60,64 **** if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnCellClicked")) { lua_State *L = m_wxlState.GetLuaState(); --- 60,64 ---- if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnCellClicked", true)) { lua_State *L = m_wxlState.GetLuaState(); *************** *** 100,104 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnCellMouseHover")) { lua_State *L = m_wxlState.GetLuaState(); --- 100,104 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnCellMouseHover", true)) { lua_State *L = m_wxlState.GetLuaState(); *************** *** 121,125 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnLinkClicked")) { lua_State *L = m_wxlState.GetLuaState(); --- 121,125 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnLinkClicked", true)) { lua_State *L = m_wxlState.GetLuaState(); *************** *** 140,144 **** { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnSetTitle")) { lua_State *L = m_wxlState.GetLuaState(); --- 140,144 ---- { if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && ! m_wxlState.HasDerivedMethod(this, "OnSetTitle", true)) { lua_State *L = m_wxlState.GetLuaState(); |
From: John L. <jr...@us...> - 2007-05-21 01:08:33
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14147/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: Remove all code in dservice as it wasn't used Removed m_pDerivedList and put derived lua functions into the lua registry index A little more cleanup in the socket and editor.wx.lua code. Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** wxlstate.h 8 May 2007 00:55:12 -0000 1.66 --- wxlstate.h 21 May 2007 01:07:59 -0000 1.67 *************** *** 232,236 **** wxEventType m_inEventType; // wxEventType set when in event, else wxEVT_NULL - wxLongToLongHashMap m_pDerivedList; // derived objects. wxLongToLongHashMap m_trackedObjects; // tracked objects. wxList m_callbackList; // event objects for wxLuaCallback --- 232,235 ---- *************** *** 681,685 **** // Is there a derived method given an object and and a method name. ! bool HasDerivedMethod(void *pObject, const char *method) const; // Find a derived method given an object and and a method name. // If the method can be found, return the wxLuaState it belongs to. --- 680,685 ---- // Is there a derived method given an object and and a method name. ! // If push_method then push the method onto the stack ! bool HasDerivedMethod(void *pObject, const char *method, bool push_method) const; // Find a derived method given an object and and a method name. // If the method can be found, return the wxLuaState it belongs to. |