From: John L. <jr...@us...> - 2005-06-06 23:06:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14733/wxLua/modules/wxluadebug/include Added Files: debug.h splttree.h staktree.h Log Message: moved files to the modules directory structure --- NEW FILE: staktree.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_ #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "staktree.h" #endif #include "wxlua/defs.h" #include "wxlua/splttree.h" class WXDLLIMPEXP_WXLUA wxLuaStackDataWindow; class WXDLLIMPEXP_WXLUA wxLuaDebugServer; class WXDLLIMPEXP_WXLUA wxLuaInterface; class WXDLLIMPEXP_WXLUA wxLuaDebugData; // ---------------------------------------------------------------------------- // wxLuaStackFrame // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaStackFrame : public wxDialog { public: wxLuaStackFrame(wxWindow *parent, const wxString &title, const wxPoint &pos, const wxSize &size, wxLuaDebugServer *pServer); wxLuaStackFrame(wxWindow *parent, const wxString &title, const wxPoint &pos, const wxSize &size, wxLuaInterface *luaInterface); ~wxLuaStackFrame(); void OnSizeWindow(wxSizeEvent& event); void OnSelectStack(wxCommandEvent &event); void OnItemExpanding(wxTreeEvent &event); void OnCloseDialog(wxCommandEvent &event); void SelectStack(int nCurrentSel); void ItemExpanding(const wxTreeItemId &itemId); void SizeWindow(int nWidth, int nHeight); void FillStackCombobox(const wxLuaDebugData *pDebugData); void FillStackEntry(int nEntry, const wxLuaDebugData *pSortedList); void FillTableEntry(wxTreeItemId itemNode, const wxLuaDebugData *pSortedList); void GetDerivedAndTrackedItems(wxRemotelyScrolledTreeCtrl *treeControl, wxTreeItemId rootItem); private: void Construct(); protected: wxComboBox *m_stackComboBox; wxRemotelyScrolledTreeCtrl *m_treeControl; wxThinSplitterWindow *m_treeSplitter; wxThinSplitterWindow *m_valueSplitter; wxSplitterScrolledWindow *m_scrolledWindow; wxButton *m_dismissButton; wxLuaStackDataWindow *m_firstValueWindow; wxLuaStackDataWindow *m_secondValueWindow; wxLuaInterface *m_luaInterface; wxLuaDebugServer *m_pServer; int m_nCurrentSel; DECLARE_EVENT_TABLE() private: friend class wxLuaStackDataWindow; }; // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- #define idSTACK_FRAME 2000 #define idSTACK_COMBOBOX 2001 #define idSCROLLED_WINDOW 2002 #define idSPLITTER_WINDOW 2003 #define idSTACKTREE_CTRL 2004 #define idVALUE_SPLITTER_WINDOW 2005 #define idFIRST_VALUE_WINDOW 2006 #define idSECOND_VALUE_WINDOW 2007 #define idDISMISS_BUTTON 2008 // ---------------------------------------------------------------------------- // wxLuaStackTree // ---------------------------------------------------------------------------- class wxLuaStackTree : public wxRemotelyScrolledTreeCtrl { DECLARE_CLASS(wxLuaStackTree) public: wxLuaStackTree( wxWindow *parent, wxWindowID id, const wxPoint &pt = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); ~wxLuaStackTree(); void DeleteAllItems(); DECLARE_EVENT_TABLE() private: wxImageList* m_imageList; }; // ---------------------------------------------------------------------------- // wxLuaStackDataWindow // ---------------------------------------------------------------------------- class wxLuaStackDataWindow : public wxTreeCompanionWindow { public: wxLuaStackDataWindow( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = 0, bool fFirst = true); // Overrides virtual void DrawItem(wxDC &dc, wxTreeItemId id, const wxRect &rect); private: bool m_fFirst; DECLARE_EVENT_TABLE() }; #endif //_WX_LUA_STACKTREE_H_ --- NEW FILE: debug.h --- ///////////////////////////////////////////////////////////////////////////// // Purpose: Implements the debugger end of wxLua debugging session // Author: J. Winwood // Created: June 2003 // Copyright: (c) 2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// // Ray Gilbert moved class definitions out of wxLuaDebugServer, wxLuaDebugIO // to allow alternate debugger model // // Original Debugging Model: // wxLuaDebugServer, LuaDebugTarget // The current process acts as a server - debugger (wxLuaDebugServer) // starts a new process which starts up as a client - debuggee (LuaDebugTarget) // that connects back to server process. // // Alternative Debugging Model: // wxLuaDebugService, wxLuaDebuggee, wxLuaDebugger // The current process acts as a server - debuggee (wxLuaDebugService; wxLuaDebuggee). // This service waits for client - debugger to connect. #ifndef WX_LUA_DEBUG_H #define WX_LUA_DEBUG_H #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "debug.h" #endif #include "wx/dynarray.h" #include "wx/treectrl.h" #include "wxlua/defs.h" class WXDLLIMPEXP_WXLUA wxLuaDebugData; // ---------------------------------------------------------------------------- // wxLuaBuffer // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaBuffer : public wxObject { public: wxLuaBuffer(const wxString &fileName, const wxString &buffer); wxString GetBuffer() const { return m_buffer; } wxString GetFileName() const { return m_fileName; } int GetBufferLength() const { return m_buffer.Length(); } private: wxString m_fileName; wxString m_buffer; DECLARE_CLASS(wxLuaBuffer) }; #if wxCHECK_VERSION(2, 5, 0) WX_DEFINE_ARRAY_PTR(wxLuaBuffer *, wxLuaBufferArray); #else WX_DEFINE_ARRAY(wxLuaBuffer *, wxLuaBufferArray); #endif // !wxCHECK_VERSION(2, 5, 0) // ---------------------------------------------------------------------------- // wxLuaDebugDataItem // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaDebugDataItem : public wxTreeItemData { public: wxLuaDebugDataItem(const wxLuaDebugDataItem &debugDataItem); wxLuaDebugDataItem(const wxString &itemName, const wxString &itemType, const wxString &itemValue, const wxString &itemSource, int nReference, int nIndex = 0, bool fExpanded = false); wxString GetName() const { return m_itemName; } wxString GetType() const { return m_itemType; } 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; } private: wxString m_itemName; wxString m_itemType; wxString m_itemValue; wxString m_itemSource; int m_nReference; int m_nIndex; bool m_fExpanded; }; WX_DEFINE_SORTED_ARRAY(wxLuaDebugDataItem *, wxLuaDebugDataItemArray); // ---------------------------------------------------------------------------- // wxLuaDebugData // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaDebugData : public wxLuaDebugDataItemArray { public: wxLuaDebugData(); virtual ~wxLuaDebugData(); wxLuaDebugData *Clone(); static int SortFunction(wxLuaDebugDataItem *elem1, wxLuaDebugDataItem *elem2 ); }; // ---------------------------------------------------------------------------- // wxLuaInterface // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaInterface { public: wxLuaInterface(lua_State *luaState); virtual ~wxLuaInterface(); wxLuaDebugData *BuildStack(); wxLuaDebugData *BuildStackList(int nEntry); wxLuaDebugData *BuildTableList(int nRef, int nEntry); wxLuaDebugData *GetGlobalData(); lua_State *GetLuaState() const { return m_luaState; } private: int GetStack(int nIndex, lua_Debug *luaDebug); bool GetInfo(const wxString &opts, lua_Debug *luaDebug); wxString GetLocal(lua_Debug *luaDebug, int index); void GetGlobals(); int GetTop(); int Type(int index); double ToNumber(int index); int ToBoolean(int index); wxString ToString(int index); const void *ToPointer(int index); bool IsCFunction(int index); const void *ToCFunction(int index); const void *ToUserData(int index); int GetTag(int index); int GetN(int index); int Ref(); int GetRef(int ref); void Pop(int count); void PushNil(); void PushValue(int index); int Next(int index); bool IsLuaTable(int index) const; wxString GetTableInfo(int index); wxString GetUserDataInfo(int index, bool full = true); static wxString MakeNumber(double dnum); static wxString MakeBoolean(int num); lua_State *m_luaState; wxArrayInt m_references; }; // ---------------------------------------------------------------------------- // wxLuaDebugEvents_Type // ---------------------------------------------------------------------------- enum debugEvents // FIXME prefix wxLUA on these { EVENT_DEBUG_BREAK, EVENT_DEBUG_PRINT, EVENT_DEBUG_ERROR, EVENT_DEBUG_EXIT, EVENT_DEBUG_STACK_ENUM, EVENT_DEBUG_STACK_ENTRY_ENUM, EVENT_DEBUG_TABLE_ENUM, EVENT_DEBUG_EVALUATE_EXPR, EVENT_DEBUG_BREAKPOINT_ADDED, EVENT_DEBUG_BREAKPOINT_REMOVED }; // ---------------------------------------------------------------------------- // wxLuaDebugCommands_Type // ---------------------------------------------------------------------------- enum debugCommands // FIXME prefix wxLUA on these { CMD_ADD_BREAKPOINT, CMD_REMOVE_BREAKPOINT, CMD_CLEAR_ALL_BREAKPOINTS, CMD_RUN_BUFFER, CMD_DEBUG_STEP, CMD_DEBUG_STEPOVER, CMD_DEBUG_STEPOUT, CMD_DEBUG_CONTINUE, CMD_DEBUG_BREAK, CMD_ENUMERATE_STACK, CMD_ENUMERATE_STACK_ENTRY, CMD_ENUMERATE_TABLE_REF, CMD_EVALUATE_EXPR, CMD_RESET, CMD_CLEAR_DEBUG_REFERENCES, CMD_DISABLE_BREAKPOINT, CMD_ENABLE_BREAKPOINT }; // ---------------------------------------------------------------------------- // wxLuaDebuggerBase - Debugger interface base class // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaDebuggerBase : public wxEvtHandler { public: wxLuaDebuggerBase() {} virtual ~wxLuaDebuggerBase() {} virtual bool AddBreakPoint(const wxString &fileName, int lineNumber) = 0; virtual bool RemoveBreakPoint(const wxString &fileName, int lineNumber) = 0; virtual bool ClearAllBreakPoints() = 0; virtual bool Run(const wxString &fileName, const wxString &buffer) = 0; virtual bool Step() = 0; virtual bool StepOver() = 0; virtual bool StepOut() = 0; virtual bool Continue() = 0; virtual bool Break() = 0; virtual bool Reset() = 0; virtual bool EnumerateStack() = 0; virtual bool EnumerateStackEntry(int stackEntry) = 0; virtual bool EnumerateTable(int tableRef, int nIndex, int nItemNode) = 0; virtual bool CleanupDebugReferences() = 0; private: DECLARE_CLASS(wxLuaDebuggerBase) }; // ---------------------------------------------------------------------------- // wxLuaDebugEvent // ---------------------------------------------------------------------------- class WXDLLIMPEXP_WXLUA wxLuaDebugEvent : public wxEvent { public: wxLuaDebugEvent(); wxLuaDebugEvent(int eventType); wxLuaDebugEvent(int eventType, int lineNumber, const wxString &fileName, bool enabledFlag = false); virtual ~wxLuaDebugEvent(); void SetMessage(const wxString &message); void SetDebugData(int nReference, wxLuaDebugData *pDebugData = NULL); int GetLineNumber() const; wxString GetFileName() const; wxString GetMessage() const; int GetReference() const; const wxLuaDebugData *GetDebugData() const; bool GetEnabledFlag() const; protected: virtual wxEvent* Clone() const; private: bool m_fHasMessage; bool m_fEnabledFlag; int m_lineNumber; wxString m_fileName; wxString m_strMessage; int m_nReference; wxLuaDebugData *m_pDebugData; DECLARE_DYNAMIC_CLASS(wxLuaDebugEvent) }; typedef void (wxEvtHandler::*wxLuaDebugEventFunction)(wxLuaDebugEvent&); // FIXME prefix wxLUA on these BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_CLIENT_CONNECTED, 2510) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_BREAK, 2511) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_PRINT, 2512) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_ERROR, 2513) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_EXIT, 2514) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_STACK_ENUM, 2515) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_STACK_ENTRY_ENUM, 2516) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_TABLE_ENUM, 2517) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_EVALUATE_EXPR, 2518) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_STARTDEBUGGER, 2519) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_STOPDEBUGGER, 2520) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_BREAKPOINT_ADDED, 2521) DECLARE_LOCAL_EVENT_TYPE(wxEVT_DEBUG_BREAKPOINT_REMOVED, 2522) END_DECLARE_EVENT_TYPES() #define EVT_DEBUG_CLIENT_CONNECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_BREAK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_BREAK(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_BREAK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_PRINT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_PRINT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_ERROR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_ERROR, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_EXIT(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_EXIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_STACK_ENUM(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_STACK_ENUM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_STACK_ENTRY_ENUM(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_STACK_ENTRY_ENUM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_TABLE_ENUM(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_TABLE_ENUM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_EVALUATE_EXPR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_EVALUATE_EXPR, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_STARTDEBUGGER(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_STARTDEBUGGER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_STOPDEBUGGER(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_STOPDEBUGGER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_BREAKPOINT_ADDED(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_BREAKPOINT_ADDED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #define EVT_DEBUG_BREAKPOINT_REMOVED(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_DEBUG_BREAKPOINT_REMOVED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxLuaDebugEventFunction) & fn, (wxObject *) NULL), #endif // WX_LUA_DEBUG_H --- NEW FILE: splttree.h --- ///////////////////////////////////////////////////////////////////////////// // Name: splittree.h // Purpose: Classes to achieve a remotely-scrolled tree in a splitter // window that can be scrolled by a scrolled window higher in the // hierarchy // Author: Julian Smart // Modified by: J. Winwood, to fix a few bugs and also add a second // splitter and scrolled window (three columns rather than two). // Created: 8/7/2000 // Copyright: (c) Julian Smart // (c) 2002 Lomtick Software. All rights reserved. // Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_SPLITTREE_H_ #define _WX_SPLITTREE_H_ #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "splttree.h" #endif #include "wxlua/defs.h" #include "wx/treectrl.h" #include "wx/splitter.h" #include "wx/scrolwin.h" class WXDLLIMPEXP_WXLUA wxRemotelyScrolledTreeCtrl; class WXDLLIMPEXP_WXLUA wxThinSplitterWindow; class WXDLLIMPEXP_WXLUA wxSplitterScrolledWindow; /* * 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_WXLUA wxRemotelyScrolledTreeCtrl : public wxTreeCtrl { public: wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint &pt = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS); ~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 ); // 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; } DECLARE_EVENT_TABLE() protected: wxWindow *m_firstCompanionWindow; wxWindow *m_secondCompanionWindow; bool m_drawRowLines; wxTreeItemId &m_lastTreeItemId; private: DECLARE_CLASS(wxRemotelyScrolledTreeCtrl) }; /* * wxTreeCompanionWindow * * A window displaying values associated with tree control items. */ class WXDLLIMPEXP_WXLUA wxTreeCompanionWindow: public wxWindow { public: DECLARE_CLASS(wxTreeCompanionWindow) wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = 0); ~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); //// Operations //// Accessors wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeControl; } void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeControl) { m_treeControl = treeControl; } //// Data members protected: wxRemotelyScrolledTreeCtrl *m_treeControl; DECLARE_EVENT_TABLE() }; /* * wxThinSplitterWindow * * Implements a splitter with a less obvious sash * than the usual one. */ class WXDLLIMPEXP_WXLUA wxThinSplitterWindow : public wxSplitterWindow { public: DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow) wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1, 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); //// Operations //// Accessors //// Data members protected: 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 wxSplitterScrolledWindow: public wxScrolledWindow { public: DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow) wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1, const wxPoint &pos = wxDefaultPosition, const wxSize &sz = wxDefaultSize, long style = 0); //// Overrides //// Events void OnScroll(wxScrollWinEvent& event); void OnSize(wxSizeEvent& event); //// Operations //// Accessors //// Data members public: DECLARE_EVENT_TABLE() }; #endif // _SPLITTREE_H_ |