Root parent property. More...
#include <propgrid.h>
Public Member Functions | |
virtual void | ChildChanged (wxVariant &, int, wxVariant &) const |
virtual bool | StringToValue (wxVariant &, const wxString &, int) const |
wxPGRootProperty () | |
virtual | ~wxPGRootProperty () |
Root parent property.
Definition at line 3281 of file propgrid.h.
wxPGRootProperty::wxPGRootProperty | ( | ) |
Constructor.
virtual wxPGRootProperty::~wxPGRootProperty | ( | ) | [virtual] |
virtual void wxPGRootProperty::ChildChanged | ( | wxVariant & | thisValue, | |
int | childIndex, | |||
wxVariant & | childValue | |||
) | const [inline, 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.
Definition at line 3296 of file propgrid.h.
virtual bool wxPGRootProperty::StringToValue | ( | wxVariant & | variant, | |
const wxString & | text, | |||
int | argFlags | |||
) | const [inline, 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.
Definition at line 3291 of file propgrid.h.