]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridpagestate.h
compilation fix for Watcom (see #10576)
[wxWidgets.git] / include / wx / propgrid / propgridpagestate.h
index 95909a3b409e9a8deeed15a36567ac6f4b171407..5e58483f1f3ea3e513c8663c8258c003374dec28 100644 (file)
@@ -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 );
 
@@ -521,24 +542,13 @@ public:
                           unsigned int col,
                           bool subProps) const;
 
-    /** Returns information about arbitrary position in the grid.
-
-        wxPropertyGridHitTestResult definition:
-        @code
-            struct wxPropertyGridHitTestResult
-            {
-                wxPGProperty* GetProperty() const;
-
-                // column. -1 for margin
-                int             column;
-
-                // Index of splitter hit, -1 for none.
-                int             splitter;
+    /**
+        Returns information about arbitrary position in the grid.
 
-                // If splitter hit, then offset to that.
-                int             splitterHitOffset;
-            };
-        @endcode
+        @param pt
+            Logical coordinates in the virtual grid space. Use
+            wxScrolledWindow::CalcUnscrolledPosition() if you need to
+            translate a scrolled position into a logical one.
     */
     wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const;
 
@@ -548,9 +558,6 @@ public:
 
     bool IsInNonCatMode() const { return (bool)(m_properties == m_abcArray); }
 
-    /** Only inits arrays, doesn't migrate things or such. */
-    void InitNonCatMode ();
-
     void DoLimitPropertyEditing( wxPGProperty* p, bool limit = true )
     {
         p->SetFlagRecursively(wxPG_PROP_NOEDITOR, limit);
@@ -585,15 +592,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; }
 
@@ -686,6 +693,10 @@ protected:
     unsigned char               m_anyModified;
 
     unsigned char               m_vhCalcPending;
+
+private:
+    /** Only inits arrays, doesn't migrate things or such. */
+    void InitNonCatMode();
 };
 
 #endif // #ifndef SWIG