]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/property.h
Have page-specific splitter setup flags in order to fix bug that caused splitter...
[wxWidgets.git] / include / wx / propgrid / property.h
index 49205999448d47fb1510d7d12caa8a86dd16a000..ca40fb77658ffe5ba0a99948e6ef1a83e0effb42 100644 (file)
@@ -435,7 +435,11 @@ wxPG_PROP_CLASS_SPECIFIC_1          = 0x00080000,
 
 /** Indicates the bit useable by derived properties.
 */
-wxPG_PROP_CLASS_SPECIFIC_2          = 0x00100000
+wxPG_PROP_CLASS_SPECIFIC_2          = 0x00100000,
+
+/** Indicates that the property is being deleted and should be ignored.
+*/
+wxPG_PROP_BEING_DELETED             = 0x00200000
 
 };
 
@@ -727,7 +731,7 @@ private:
     Helper class for managing choices of wxPropertyGrid properties.
     Each entry can have label, value, bitmap, text colour, and background
     colour.
+
     wxPGChoices uses reference counting, similar to other wxWidgets classes.
     This means that assignment operator and copy constructor only copy the
     reference and not the actual data. Use Copy() member function to create a
@@ -1557,10 +1561,25 @@ public:
 
     /**
         Returns wxPGCell of given column.
+
+        @remarks const version of this member function returns 'default'
+                 wxPGCell object if the property itself didn't hold
+                 cell data.
     */
     const wxPGCell& GetCell( unsigned int column ) const;
 
-    wxPGCell& GetCell( unsigned int column );
+    /**
+        Returns wxPGCell of given column, creating one if necessary.
+    */
+    wxPGCell& GetCell( unsigned int column )
+    {
+        return GetOrCreateCell(column);
+    }
+
+    /**
+        Returns wxPGCell of given column, creating one if necessary.
+    */
+    wxPGCell& GetOrCreateCell( unsigned int column );
 
     /** Return number of displayed common values for this property.
     */
@@ -2238,6 +2257,13 @@ protected:
     /** Deletes all sub-properties. */
     void Empty();
 
+    bool HasCell( unsigned int column ) const
+    {
+        if ( m_cells.size() > column )
+            return true;
+        return false;
+    }
+
     void InitAfterAdded( wxPropertyGridPageState* pageState,
                          wxPropertyGrid* propgrid );