From: John L. <jr...@us...> - 2007-11-29 23:35:57
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29041/wxLua/modules/wxluadebug/include Modified Files: wxlstack.h Log Message: Made the wxLuaStackDialog much nicer, faster, search in all cols, collapse and expand child tables. Index: wxlstack.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxlstack.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlstack.h 17 Nov 2007 00:15:07 -0000 1.8 --- wxlstack.h 29 Nov 2007 23:35:53 -0000 1.9 *************** *** 18,21 **** --- 18,22 ---- class WXDLLEXPORT wxListEvent; class WXDLLEXPORT wxSplitterWindow; + class WXDLLEXPORT wxProgressDialog; #include "wxluadebug/include/wxluadebugdefs.h" *************** *** 32,42 **** ID_WXLUA_STACK_CHOICE = 2000, ID_WXLUA_STACK_EXPAND_BUTTON, ID_WXLUA_STACK_FIND_COMBO, ID_WXLUA_STACK_FINDNEXT_BUTTON, ID_WXLUA_STACK_FINDPREV_BUTTON, ! ID_WXLUA_STACK_FINDCASE_CHECKBOX, ID_WXLUA_STACK_SPLITTERWIN, ID_WXLUA_STACK_LISTCTRL, ! ID_WXLUA_STACK_TREECTRL }; --- 33,60 ---- ID_WXLUA_STACK_CHOICE = 2000, ID_WXLUA_STACK_EXPAND_BUTTON, + ID_WXLUA_STACK_COLLAPSE_BUTTON, + ID_WXLUA_STACK_FIND_COMBO, ID_WXLUA_STACK_FINDNEXT_BUTTON, ID_WXLUA_STACK_FINDPREV_BUTTON, ! ID_WXLUA_STACK_FINDMENU_BUTTON, ! ID_WXLUA_STACK_SPLITTERWIN, ID_WXLUA_STACK_LISTCTRL, ! ID_WXLUA_STACK_TREECTRL, ! ! ID_WXLUA_STACK_LISTMENU_COPY0, ! ID_WXLUA_STACK_LISTMENU_COPY1, ! ID_WXLUA_STACK_LISTMENU_COPY2, ! ID_WXLUA_STACK_LISTMENU_COPY3, ! ID_WXLUA_STACK_LISTMENU_COPY4, ! ! ID_WXLUA_STACK_FINDMENU_CASE, ! ID_WXLUA_STACK_FINDMENU_ALL, ! ID_WXLUA_STACK_FINDMENU_NAME, ! ID_WXLUA_STACK_FINDMENU_LEVEL, ! ID_WXLUA_STACK_FINDMENU_KEYTYPE, ! ID_WXLUA_STACK_FINDMENU_VALUETYPE, ! ID_WXLUA_STACK_FINDMENU_VALUE }; *************** *** 64,68 **** // ---------------------------------------------------------------------------- ! // wxLuaStackListData - the data we store in the wxTreeCtrl item's data // ---------------------------------------------------------------------------- --- 82,86 ---- // ---------------------------------------------------------------------------- ! // wxLuaStackTreeData - the data we store in the wxTreeCtrl item's data // ---------------------------------------------------------------------------- *************** *** 82,86 **** { public: ! wxLuaStackDialog() : wxDialog() { Init(); } wxLuaStackDialog(const wxLuaState& wxlState, --- 100,104 ---- { public: ! wxLuaStackDialog() { Init(); } wxLuaStackDialog(const wxLuaState& wxlState, *************** *** 88,92 **** const wxString& title = wxT("wxLua Stack"), const wxPoint& pos = wxDefaultPosition, ! const wxSize& size = wxSize(500, 300)) : wxDialog() { Init(); --- 106,110 ---- const wxString& title = wxT("wxLua Stack"), const wxPoint& pos = wxDefaultPosition, ! const wxSize& size = wxDefaultSize) { Init(); *************** *** 149,156 **** --- 167,181 ---- // implementation + // Put BeginBatch() before adding/removing items and EndBatch() afterwards for speed. + void BeginBatch(); + void EndBatch(); + wxTreeItemId FindTreeItemId(const wxTreeItemId& id, wxLuaStackListData* stkListData) const; long FindListItem(wxLuaStackListData* stkListData, bool get_parent = false) const; + void DoExpandCollapse(const wxTreeItemId& treeId, bool expand, wxProgressDialog* dlg, long& counter); + void OnExpandButton(wxCommandEvent& event); + void OnMenu(wxCommandEvent& event); void OnFind(wxCommandEvent& event); *************** *** 162,168 **** // Handle and expand/collapse a listctrl item void OnListItemActivated(wxListEvent &event); ! bool ExpandItem(long lc_item, bool show_err_msg = true); bool CollapseItem(long lc_item); void OnListItemDeleted(wxListEvent &event); void OnListAllItemsDeleted(wxListEvent &event); --- 187,200 ---- // Handle and expand/collapse a listctrl item void OnListItemActivated(wxListEvent &event); ! // Popup menu on right click ! void OnListRightClick(wxListEvent &event); ! ! // Main functions to expand or collapse a list item ! bool ExpandItem(long lc_item); bool CollapseItem(long lc_item); + // Don't warn about expanding duplicate tables + void SetShowDuplicateExpandMessage(bool show) { m_show_dup_expand_msg = show; } + void OnListItemDeleted(wxListEvent &event); void OnListAllItemsDeleted(wxListEvent &event); *************** *** 175,178 **** --- 207,211 ---- wxListCtrl* m_listCtrl; wxTreeCtrl* m_treeCtrl; + wxMenu* m_listMenu; wxChoice* m_stackChoice; // display stack entries *************** *** 181,185 **** wxComboBox* m_findComboBox; // Find string combobox ! wxCheckBox* m_findCaseCheckBox; // Find case sensitive wxLuaState m_wxlState; // lua_State to show stack for --- 214,218 ---- wxComboBox* m_findComboBox; // Find string combobox ! wxMenu* m_findMenu; wxLuaState m_wxlState; // lua_State to show stack for *************** *** 189,192 **** --- 222,232 ---- wxColour m_typeColours[IMG__COUNT]; + bool m_show_dup_expand_msg; + int m_batch_count; + + wxLongToLongHashMap m_expandedItems; + + static wxSize m_defaultSize; // remember last dialog size + private: void Init(); |