From: John L. <jr...@us...> - 2007-05-24 00:59:52
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21191/wxLua/modules/wxluadebug/include Added Files: wxlstack.h Removed Files: splttree.h staktree.h Log Message: Removed dservice.h/cpp splttree.h/cpp, moved staktree.h/cpp to wxlstack.h/cpp Rebaked with the changes --- staktree.h DELETED --- --- NEW FILE: wxlstack.h --- ///////////////////////////////////////////////////////////////////////////// // Name: wxLuaStackTree.h // Purpose: Interface to display the lua stack in wxLua // Author: J. Winwood // Created: April 2002 // Copyright: (c) 2002. Lomtick Software. All rights reserved. // Licence: wxWidgets license. ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_LUA_STACKTREE_H_ #define _WX_LUA_STACKTREE_H_ #include "wx/dialog.h" #include "wx/listctrl.h" #include "wxluadebug/include/wxluadebugdefs.h" #include "wxluadebug/include/wxldebug.h" class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; // ---------------------------------------------------------------------------- // wxWindowIds for the wxLuaStackDialog // ---------------------------------------------------------------------------- enum { ID_WXLUA_STACKDIALOG_COMBO = 2000, ID_WXLUA_STACKDIALOG_LISTCTRL }; // ---------------------------------------------------------------------------- // wxLuaStackDialog // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog : public wxDialog { public: wxLuaStackDialog() : wxDialog() { Init(); } wxLuaStackDialog(const wxLuaState& wxlState, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("wxLua Stack"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(500, 300)) : wxDialog() { Init(); Create(wxlState, parent, id, title, pos, size); } virtual ~wxLuaStackDialog(); bool Create(const wxLuaState& wxlState, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("wxLua Stack"), const wxPoint& pos = wxDefaultPosition, 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 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 // 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); // 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 void OnSelectStack(wxCommandEvent &event); void SelectStack(int stack_sel); // Handle and expand a listctrl 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 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: void Init(); DECLARE_ABSTRACT_CLASS(wxLuaStackDialog) DECLARE_EVENT_TABLE() }; #endif //_WX_LUA_STACKTREE_H_ --- splttree.h DELETED --- |