]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/property.h
add virtual DoGetTextExtent() to allow calling the overloaded wxWindowBase::GetTextEx...
[wxWidgets.git] / include / wx / propgrid / property.h
index 199ec099ca326089b8c3be473636b53fc562aba7..106d983896437aadb8ab9422128eff9ed466ec67 100644 (file)
@@ -1274,17 +1274,21 @@ public:
                           wxEvent& event );
 
     /**
-        Called after value of a child property has been altered.
+        Called after value of a child property has been altered. Must return
+        new value of the whole property (after any alterations warrented by
+        child's new value).
 
         Note that this function is usually called at the time that value of
-        this property, or given child property, is still pending for change.
+        this property, or given child property, is still pending for change,
+        and as such, result of GetValue() or m_value should not be relied
+        on.
 
         Sample pseudo-code implementation:
 
         @code
-        void MyProperty::ChildChanged( wxVariant& thisValue,
-                                       int childIndex,
-                                       wxVariant& childValue ) const
+        wxVariant MyProperty::ChildChanged( wxVariant& thisValue,
+                                            int childIndex,
+                                            wxVariant& childValue ) const
         {
             // Acquire reference to actual type of data stored in variant
             // (TFromVariant only exists if wxPropertyGrid's wxVariant-macros
@@ -1302,19 +1306,28 @@ public:
                     break;
                 ...
             }
+
+            // Return altered data
+            return data;
         }
         @endcode
 
         @param thisValue
-            Value of this property, that should be altered.
+            Value of this property. Changed value should be returned (in
+            previous versions of wxPropertyGrid it was only necessary to
+            write value back to this argument).
         @param childIndex
-            Index of child changed (you can use Item(childIndex) to get).
+            Index of child changed (you can use Item(childIndex) to get
+            child property).
         @param childValue
-            Value of the child property.
+            (Pending) value of the child property.
+
+        @return
+            Modified value of the whole property.
     */
-    virtual void ChildChanged( wxVariant& thisValue,
-                               int childIndex,
-                               wxVariant& childValue ) const;
+    virtual wxVariant ChildChanged( wxVariant& thisValue,
+                                    int childIndex,
+                                    wxVariant& childValue ) const;
 
     /** Returns pointer to an instance of used editor.
     */