]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/include/wx/gizmos/splittree.h
Fixups for solaris; remove '-mt' from pkg-config output and add '-lX11' for a static...
[wxWidgets.git] / contrib / include / wx / gizmos / splittree.h
index 5758dde534ea56d64660ca7957492f1d0666576c..c6cd5896ad44b37a742bc7d6ea27e489877c9590 100644 (file)
@@ -14,9 +14,7 @@
 #ifndef _WX_SPLITTREE_H_
 #define _WX_SPLITTREE_H_
 
 #ifndef _WX_SPLITTREE_H_
 #define _WX_SPLITTREE_H_
 
-#ifdef __GNUG__
-       #pragma interface "splittree.h"
-#endif
+#include "wx/gizmos/gizmos.h"
 
 // Set this to 1 to use generic tree control (doesn't yet work properly)
 #define USE_GENERIC_TREECTRL 0
 
 // Set this to 1 to use generic tree control (doesn't yet work properly)
 #define USE_GENERIC_TREECTRL 0
@@ -46,18 +44,19 @@ class wxSplitterScrolledWindow;
  * It also updates the scrolled window vertical scrollbar as appropriate.
  */
 
  * It also updates the scrolled window vertical scrollbar as appropriate.
  */
 
-class wxRemotelyScrolledTreeCtrl: public wxTreeCtrl
+class WXDLLIMPEXP_GIZMOS wxRemotelyScrolledTreeCtrl: public wxTreeCtrl
 {
 {
-       DECLARE_CLASS(wxRemotelyScrolledTreeCtrl)
+    DECLARE_CLASS(wxRemotelyScrolledTreeCtrl)
 public:
     wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
         const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
 public:
     wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
         const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
-       ~wxRemotelyScrolledTreeCtrl();
+    ~wxRemotelyScrolledTreeCtrl();
 
 //// Events
 
 //// Events
-       void OnSize(wxSizeEvent& event);
-       void OnExpand(wxTreeEvent& event);
+    void OnSize(wxSizeEvent& event);
+    void OnExpand(wxTreeEvent& event);
     void OnScroll(wxScrollWinEvent& event);
     void OnScroll(wxScrollWinEvent& event);
+    void OnPaint(wxPaintEvent& event);
 
 //// Overrides
     // Override this in case we're using the generic tree control.
 
 //// Overrides
     // Override this in case we're using the generic tree control.
@@ -69,7 +68,7 @@ public:
     virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
                              int noUnitsX, int noUnitsY,
                              int xPos = 0, int yPos = 0,
     virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
                              int noUnitsX, int noUnitsY,
                              int xPos = 0, int yPos = 0,
-                             bool noRefresh = FALSE );
+                             bool noRefresh = false );
 
     // In case we're using the generic tree control.
     // Get the view start
 
     // In case we're using the generic tree control.
     // Get the view start
@@ -78,19 +77,22 @@ 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
 //// Helpers
-       void HideVScrollbar();
+    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);
+    // 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();
+    // Adjust the containing wxScrolledWindow's scrollbars appropriately
+    void AdjustRemoteScrollbars();
 
 
-       // Find the scrolled window that contains this control
-       wxScrolledWindow* GetScrolledWindow() const;
+    // 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)
 
     // Scroll to the given line (in scroll units where each unit is
     // the height of an item)
@@ -98,15 +100,16 @@ public:
 
 //// Accessors
 
 
 //// 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; }
+    // 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;
+    wxWindow*   m_companionWindow;
+    bool        m_drawRowLines;
 };
 
 /*
 };
 
 /*
@@ -115,33 +118,33 @@ protected:
  * A window displaying values associated with tree control items.
  */
 
  * A window displaying values associated with tree control items.
  */
 
-class wxTreeCompanionWindow: public wxWindow
+class WXDLLIMPEXP_GIZMOS wxTreeCompanionWindow: public wxWindow
 {
 public:
     DECLARE_CLASS(wxTreeCompanionWindow)
 
 {
 public:
     DECLARE_CLASS(wxTreeCompanionWindow)
 
-    wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
+    wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = 0);
 
 //// Overrides
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = 0);
 
 //// Overrides
-       virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
+    virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
 
 //// Events
 
 //// Events
-       void OnPaint(wxPaintEvent& event);    
+    void OnPaint(wxPaintEvent& event);
     void OnScroll(wxScrollWinEvent& event);
     void OnScroll(wxScrollWinEvent& event);
-       void OnExpand(wxTreeEvent& event);
+    void OnExpand(wxTreeEvent& event);
 
 //// Operations
 
 //// Accessors
 
 //// Operations
 
 //// Accessors
-       wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; };
-       void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; }
+    wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; };
+    void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; }
 
 //// Data members
 protected:
 
 //// Data members
 protected:
-       wxRemotelyScrolledTreeCtrl*     m_treeCtrl;
+    wxRemotelyScrolledTreeCtrl* m_treeCtrl;
 
     DECLARE_EVENT_TABLE()
 };
 
     DECLARE_EVENT_TABLE()
 };
@@ -154,15 +157,16 @@ protected:
  * than the usual one.
  */
 
  * than the usual one.
  */
 
-class wxThinSplitterWindow: public wxSplitterWindow
+class WXDLLIMPEXP_GIZMOS wxThinSplitterWindow: public wxSplitterWindow
 {
 public:
     DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
 
 {
 public:
     DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
 
-    wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
+    wxThinSplitterWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = wxSP_3D | wxCLIP_CHILDREN);
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = wxSP_3D | wxCLIP_CHILDREN);
+    ~wxThinSplitterWindow();
 
 //// Overrides
 
 
 //// Overrides
 
@@ -170,10 +174,10 @@ public:
     // Tests for x, y over sash. Overriding this allows us to increase
     // the tolerance.
     bool SashHitTest(int x, int y, int tolerance = 2);
     // 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);
+    void DrawSash(wxDC& dc);
 
 //// Events
 
 //// Events
-    
+
     void OnSize(wxSizeEvent& event);
 
 //// Operations
     void OnSize(wxSizeEvent& event);
 
 //// Operations
@@ -182,6 +186,9 @@ public:
 
 //// Data members
 protected:
 
 //// Data members
 protected:
+    wxPen*      m_facePen;
+    wxBrush*    m_faceBrush;
+
     DECLARE_EVENT_TABLE()
 };
 
     DECLARE_EVENT_TABLE()
 };
 
@@ -194,12 +201,12 @@ protected:
  * scroll appropriately.
  */
 
  * scroll appropriately.
  */
 
-class wxSplitterScrolledWindow: public wxScrolledWindow
+class WXDLLIMPEXP_GIZMOS wxSplitterScrolledWindow: public wxScrolledWindow
 {
 public:
     DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
 
 {
 public:
     DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
 
-    wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
+    wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = 0);
       const wxPoint& pos = wxDefaultPosition,
       const wxSize& sz = wxDefaultSize,
       long style = 0);
@@ -207,7 +214,7 @@ public:
 //// Overrides
 
 //// Events
 //// Overrides
 
 //// Events
-    
+
     void OnScroll(wxScrollWinEvent& event);
     void OnSize(wxSizeEvent& event);
 
     void OnScroll(wxScrollWinEvent& event);
     void OnSize(wxSizeEvent& event);