X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1ed01484e7bcce3d1668b5b76c8bb1beb32e9559..a132a1c810bea2d37b09f01524b57440c968de1c:/contrib/include/wx/gizmos/splittree.h diff --git a/contrib/include/wx/gizmos/splittree.h b/contrib/include/wx/gizmos/splittree.h index a6877851db..4be4386cda 100644 --- a/contrib/include/wx/gizmos/splittree.h +++ b/contrib/include/wx/gizmos/splittree.h @@ -78,13 +78,16 @@ public: // 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(wxTreeItemId& id, wxRect& rect); + void CalcTreeSize(const wxTreeItemId& id, wxRect& rect); // Adjust the containing wxScrolledWindow's scrollbars appropriately void AdjustRemoteScrollbars(); @@ -96,10 +99,57 @@ public: // the height of an item) void ScrollToLine(int posHoriz, int posVert); +//// Accessors + + // The companion window is one which will get notified when certain + // events happen such as node expansion + void SetCompanionWindow(wxWindow* companion) { m_companionWindow = companion; } + wxWindow* GetCompanionWindow() const { return m_companionWindow; } + + DECLARE_EVENT_TABLE() protected: + wxWindow* m_companionWindow; +}; + +/* + * wxTreeCompanionWindow + * + * A window displaying values associated with tree control items. + */ + +class wxTreeCompanionWindow: public wxWindow +{ +public: + DECLARE_CLASS(wxTreeCompanionWindow) + + wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + long style = 0); + +//// Overrides + virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect); + +//// Events + void OnPaint(wxPaintEvent& event); + void OnScroll(wxScrollWinEvent& event); + void OnExpand(wxTreeEvent& event); + +//// Operations + +//// Accessors + wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; }; + void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; } + +//// Data members +protected: + wxRemotelyScrolledTreeCtrl* m_treeCtrl; + + DECLARE_EVENT_TABLE() }; + /* * wxThinSplitterWindow *