wxPropertyCategory Class Reference

Category (caption) property. More...

#include <propgrid.h>

Inheritance diagram for wxPropertyCategory:
wxPGProperty

List of all members.

Public Member Functions

void CalculateTextExtent (wxWindow *wnd, const wxFont &font)
virtual void ChildChanged (wxVariant &, int, wxVariant &) const
 Called after value of a child property has been altered.
 DECLARE_DYNAMIC_CLASS (wxPropertyCategory) virtual const wxPGEditor *DoGetEditorClass() const
unsigned int GetTextColIndex () const
int GetTextExtent (const wxWindow *wnd, const wxFont &font) const
virtual wxString GetValueAsString (int argFlags) const
 Must be overridden with function that doesn't do anything.
void SetTextColIndex (unsigned int colInd)
 wxPropertyCategory (const wxString &label, const wxString &name=(*((wxString *) NULL)))
 Construct.
 wxPropertyCategory ()
 Special constructor only used in special cases.

Protected Attributes

wxByte m_capFgColIndex
int m_textExtent

Detailed Description

Category (caption) property.


Constructor & Destructor Documentation

wxPropertyCategory::wxPropertyCategory (  ) 

Special constructor only used in special cases.

wxPropertyCategory::wxPropertyCategory ( const wxString &  label,
const wxString &  name = (*((wxString *) NULL)) 
)

Construct.

Parameters:
label Label for the category.
Remarks:
All non-category properties appended will have most recently added category.

Member Function Documentation

virtual void wxPropertyCategory::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 wxString wxPropertyCategory::GetValueAsString ( int  argFlags  )  const [virtual]

Must be overridden with function that doesn't do anything.

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