]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridpagestate.h
using subclass as impl ptr, common code in macro because mix-in are not possible...
[wxWidgets.git] / include / wx / propgrid / propgridpagestate.h
index 3d6e1725250e8ffefec8a8aed7fb44da03fe2944..ec1c8064ef655d7c1f6a5e0a7b9093a9d4655521 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     2008-08-24
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
@@ -234,7 +234,8 @@ private:
     } \
     const CLASS& operator=( const CLASS& it ) \
     { \
-        Assign(it); \
+        if (this != &it) \
+            Assign(it); \
         return *this; \
     } \
     CLASS& operator++() { Next(); return *this; } \
@@ -289,6 +290,23 @@ public:
                             const wxPGProperty,
                             const wxPropertyGridPageState)
 
+    /**
+        Additional copy constructor.
+    */
+    wxPropertyGridConstIterator( const wxPropertyGridIterator& other )
+    {
+        Assign(other);
+    }
+
+    /**
+        Additional assignment operator.
+    */
+    const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it )
+    {
+        Assign(it);
+        return *this;
+    }
+
 protected:
 };
 
@@ -342,9 +360,12 @@ public:
 #ifndef SWIG
     const wxPGVIterator& operator=( const wxPGVIterator& it )
     {
-        UnRef();
-        m_pIt = it.m_pIt;
-        m_pIt->IncRef();
+        if (this != &it)
+        {
+            UnRef();
+            m_pIt = it.m_pIt;
+            m_pIt->IncRef();
+        }
         return *this;
     }
 #endif
@@ -400,7 +421,7 @@ public:
         Override this member function to add custom behavior on property
         deletion.
     */
-    virtual void DoDelete( wxPGProperty* item );
+    virtual void DoDelete( wxPGProperty* item, bool doDelete = true );
 
     wxSize DoFitColumns( bool allowGridResize = false );
 
@@ -463,7 +484,7 @@ public:
 
     unsigned int GetColumnCount() const
     {
-        return m_colWidths.size();
+        return (unsigned int) m_colWidths.size();
     }
 
     wxPGProperty* GetSelection() const
@@ -585,15 +606,15 @@ public:
     void DoSetPropertyValues( const wxVariantList& list,
                               wxPGProperty* default_category );
 
-    void DoSetPropertyValueUnspecified( wxPGProperty* p );
-
     void SetSplitterLeft( bool subProps = false );
 
     /** Set virtual width for this particular page. */
     void SetVirtualWidth( int width );
 
-    void SortChildren( wxPGProperty* p );
-    void Sort();
+    void DoSortChildren( wxPGProperty* p, int flags = 0 );
+    void DoSort( int flags = 0 );
+
+    bool PrepareAfterItemsAdded();
 
     void SetSelection( wxPGProperty* p ) { m_selected = p; }
 
@@ -636,7 +657,7 @@ protected:
     */
     int HitTestH( int x, int* pSplitterHit, int* pSplitterHitOffset ) const;
 
-    int PrepareToAddItem ( wxPGProperty* property,
+    bool PrepareToAddItem( wxPGProperty* property,
                            wxPGProperty* scheduledParent );
 
     /** If visible, then this is pointer to wxPropertyGrid.