Root parent property. More...
#include <propgrid.h>
Public Member Functions | |
virtual void | ChildChanged (wxVariant &, int, wxVariant &) const |
Called after value of a child property has been altered. | |
DECLARE_DYNAMIC_CLASS (wxPGRootProperty) virtual const wxPGEditor *DoGetEditorClass() const | |
virtual bool | StringToValue (wxVariant &, const wxString &, int) const |
Converts 'text' into proper value 'variant'. | |
wxPGRootProperty () | |
Constructor. |
Root parent property.
wxPGRootProperty::wxPGRootProperty | ( | ) |
Constructor.
virtual void wxPGRootProperty::ChildChanged | ( | wxVariant & | thisValue, | |
int | childIndex, | |||
wxVariant & | childValue | |||
) | const [virtual] |
Called after value of a child property has been altered.
Note that this function is usually called at the time that value of this property, or given child property, is still pending for change.
Sample pseudo-code implementation:
void 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 were used to create // the variant class). T& data = TFromVariant(thisValue); // Copy childValue into data. switch ( childIndex ) { case 0: data.SetSubProp1( childvalue.GetLong() ); break; case 1: data.SetSubProp2( childvalue.GetString() ); break; ... } }
thisValue | Value of this property, that should be altered. | |
childIndex | Index of child changed (you can use Item(childIndex) to get). | |
childValue | Value of the child property. |
Reimplemented from wxPGProperty.
virtual bool wxPGRootProperty::StringToValue | ( | wxVariant & | variant, | |
const wxString & | text, | |||
int | argFlags | |||
) | const [virtual] |
Converts 'text' into proper value 'variant'.
Returns true if new (different than m_value) value could be interpreted from the text.
argFlags | If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable one (they may be different). If wxPG_COMPOSITE_FRAGMENT is set, text is interpreted as a part of composite property string value (as generated by GetValueAsString() called with this same flag). |
Reimplemented from wxPGProperty.