]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/treelay.h
Corrected copyright
[wxWidgets.git] / include / wx / generic / treelay.h
index b59e1488f8588a675b32e818cbdf416115e23500..9a1973f37b2d71f4bf8772e94c7be97257ddd51a 100644 (file)
 #ifndef _WX_TREELAY_H_
 #define _WX_TREELAY_H_
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
 #pragma interface "wxtree.h"
 #endif
 
 #ifndef WX_PRECOMP
-#include <wx/object.h>
+#include "wx/object.h"
 class wxList;
 class wxDC;
 class wxMouseEvent;
 #endif
 
-#include <wx/string.h>
+#include "wx/string.h"
+
+#if wxUSE_TREELAYOUT
 
 class WXDLLEXPORT wxTreeLayout: public wxObject
 {
-    DECLARE_ABSTRACT_CLASS(wxTreeLayout)
-
 public:
     wxTreeLayout();
+    virtual ~wxTreeLayout() { }
 
     // Redefine these
     virtual void GetChildren(long id, wxList& list) = 0;
@@ -46,7 +47,7 @@ public:
     // Optional redefinition
     void Initialize(void);
     inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
-    inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(""); }
+    inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(wxT("")); }
     virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
     virtual void Draw(wxDC& dc);
     virtual void DrawNodes(wxDC& dc);
@@ -73,8 +74,6 @@ public:
 private:
     void CalcLayout(long node_id, int level, wxDC& dc);
 
-    // Members
-
 protected:
     long          m_parentNode;
     long          m_lastY;
@@ -84,6 +83,9 @@ protected:
     long          m_topMargin;
     long          m_leftMargin;
     bool          m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right
+    
+private:
+    DECLARE_ABSTRACT_CLASS(wxTreeLayout)
 };
 
 class WXDLLEXPORT wxStoredNode
@@ -102,10 +104,9 @@ public:
 
 class WXDLLEXPORT wxTreeLayoutStored: public wxTreeLayout
 {
-    DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
 public:
     wxTreeLayoutStored(int noNodes = 200);
-    ~wxTreeLayoutStored(void);
+    virtual ~wxTreeLayoutStored(void);
     void Initialize(int n);
 
     wxString HitTest(wxMouseEvent& event, wxDC& dc);
@@ -127,7 +128,8 @@ public:
     virtual void SetClientData(long id, long clientData);
     virtual long GetClientData(long id) const;
 
-    virtual long AddChild(const wxString& name, const wxString& parent = "");
+    virtual long AddChild(const wxString& name, const wxString& parent = wxT(""));
+    virtual long AddChild(const wxString& name, long parent);
     virtual long NameToId(const wxString& name);
 
     // Data members
@@ -135,11 +137,18 @@ private:
     wxStoredNode*     m_nodes;
     int               m_num;
     int               m_maxNodes;
+    
+private:
+    DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
+    DECLARE_NO_COPY_CLASS(wxTreeLayoutStored)
 };
 
 // For backward compatibility
 #define wxStoredTree wxTreeLayoutStored
 
+#endif
+    // wxUSE_TREELAYOUT
+
 #endif
  // _WX_TREELAY_H_