]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/object.h
don't draw borders for bitmap buttons with wxBORDER_NONE style
[wxWidgets.git] / include / wx / object.h
index 9da3222c8efd572c2260af4f8a390ae76aa80f46..3b57f5425f810d5997573b729c2ab4be360d26c4 100644 (file)
@@ -69,7 +69,6 @@ class WXDLLIMPEXP_FWD_BASE wxClassInfo;
 class WXDLLIMPEXP_FWD_BASE wxHashTable;
 class WXDLLIMPEXP_FWD_BASE wxObject;
 class WXDLLIMPEXP_FWD_BASE wxPluginLibrary;
 class WXDLLIMPEXP_FWD_BASE wxHashTable;
 class WXDLLIMPEXP_FWD_BASE wxObject;
 class WXDLLIMPEXP_FWD_BASE wxPluginLibrary;
-class WXDLLIMPEXP_FWD_BASE wxObjectRefData;
 class WXDLLIMPEXP_FWD_BASE wxHashTable_Node;
 
 // ----------------------------------------------------------------------------
 class WXDLLIMPEXP_FWD_BASE wxHashTable_Node;
 
 // ----------------------------------------------------------------------------
@@ -399,15 +398,13 @@ inline T *wxCheckCast(const void *ptr, T * = NULL)
 #endif // wxUSE_MEMORY_TRACING
 
 // ----------------------------------------------------------------------------
 #endif // wxUSE_MEMORY_TRACING
 
 // ----------------------------------------------------------------------------
-// wxObjectRefData: ref counted data meant to be stored in wxObject
+// wxRefCounter: ref counted data "manager"
 // ----------------------------------------------------------------------------
 
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_BASE wxObjectRefData
+class WXDLLIMPEXP_BASE wxRefCounter
 {
 {
-    friend class WXDLLIMPEXP_FWD_BASE wxObject;
-
 public:
 public:
-    wxObjectRefData() : m_count(1) { }
+    wxRefCounter() { m_count = 1; }
 
     int GetRefCount() const { return m_count; }
 
 
     int GetRefCount() const { return m_count; }
 
@@ -417,13 +414,20 @@ public:
 protected:
     // this object should never be destroyed directly but only as a
     // result of a DecRef() call:
 protected:
     // this object should never be destroyed directly but only as a
     // result of a DecRef() call:
-    virtual ~wxObjectRefData() { }
+    virtual ~wxRefCounter() { }
 
 private:
     // our refcount:
     int m_count;
 };
 
 
 private:
     // our refcount:
     int m_count;
 };
 
+// ----------------------------------------------------------------------------
+// wxObjectRefData: ref counted data meant to be stored in wxObject
+// ----------------------------------------------------------------------------
+
+typedef wxRefCounter wxObjectRefData;
+
+
 // ----------------------------------------------------------------------------
 // wxObjectDataPtr: helper class to avoid memleaks because of missing calls
 //                  to wxObjectRefData::DecRef
 // ----------------------------------------------------------------------------
 // wxObjectDataPtr: helper class to avoid memleaks because of missing calls
 //                  to wxObjectRefData::DecRef
@@ -518,7 +522,7 @@ public:
     {
          m_refData = other.m_refData;
          if (m_refData)
     {
          m_refData = other.m_refData;
          if (m_refData)
-             m_refData->m_count++;
+             m_refData->IncRef();
     }
 
     wxObject& operator=(const wxObject& other)
     }
 
     wxObject& operator=(const wxObject& other)