wxPGRootProperty Class Reference

Root parent property. More...

#include <propgrid.h>

Inheritance diagram for wxPGRootProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void ChildChanged (wxVariant &, int, wxVariant &) const
virtual bool StringToValue (wxVariant &, const wxString &, int) const
 wxPGRootProperty ()
virtual ~wxPGRootProperty ()

Detailed Description

Root parent property.

Definition at line 3281 of file propgrid.h.


Constructor & Destructor Documentation

wxPGRootProperty::wxPGRootProperty (  ) 

Constructor.

virtual wxPGRootProperty::~wxPGRootProperty (  )  [virtual]

Member Function Documentation

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

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.

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.

Definition at line 3291 of file propgrid.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


wxpropgrid
Author(s): Jaakko Salli
autogenerated on Fri Jan 11 09:34:07 2013