]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/include/wx/gizmos/splittree.h
First pass at wxPython for Mac (darwin only so far). It
[wxWidgets.git] / contrib / include / wx / gizmos / splittree.h
index 118f0b450eb5352cad67a53140045a8a8e72a100..4be4386cda376eb21d794722ed3efba702175b7c 100644 (file)
@@ -56,7 +56,6 @@ public:
 
 //// Events
        void OnSize(wxSizeEvent& event);
 
 //// Events
        void OnSize(wxSizeEvent& event);
-       void OnPaint(wxPaintEvent& event);
        void OnExpand(wxTreeEvent& event);
     void OnScroll(wxScrollWinEvent& event);
 
        void OnExpand(wxTreeEvent& event);
     void OnScroll(wxScrollWinEvent& event);
 
@@ -79,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 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);
 //// 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();
 
        // Adjust the containing wxScrolledWindow's scrollbars appropriately
        void AdjustRemoteScrollbars();
@@ -97,10 +99,57 @@ public:
     // the height of an item)
     void ScrollToLine(int posHoriz, int posVert);
 
     // 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:
     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
  *
 /*
  * wxThinSplitterWindow
  *