wxPGRootProperty Class Reference

Root parent property. More...

#include <propgrid.h>

Inheritance diagram for wxPGRootProperty:
wxPGProperty

List of all members.

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.

Detailed Description

Root parent property.


Constructor & Destructor Documentation

wxPGRootProperty::wxPGRootProperty (  ) 

Constructor.


Member Function Documentation

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;
                ...
            }
        }
Parameters:
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.

Parameters:
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).
Remarks:
  • Default implementation converts semicolon delimited tokens into child values. Only works for properties with children.
  • You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behavior).

Reimplemented from wxPGProperty.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator
Generated on Sun Aug 22 12:42:14 2010 for wxPropertyGrid by  doxygen 1.6.3