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; }; |