#include <propgrid.h>
Public Member Functions | |
void | CalculateTextExtent (wxWindow *wnd, const wxFont &font) |
virtual void | ChildChanged (wxVariant &, int, wxVariant &) const |
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 |
void | SetTextColIndex (unsigned int colInd) |
wxPropertyCategory (const wxString &label, const wxString &name=(*((wxString *) NULL))) | |
wxPropertyCategory () | |
Protected Attributes | |
wxByte | m_capFgColIndex |
int | m_textExtent |
wxPropertyCategory::wxPropertyCategory | ( | ) |
Special constructor only used in special cases.
wxPropertyCategory::wxPropertyCategory | ( | const wxString & | label, | |
const wxString & | name = (*((wxString *) NULL)) | |||
) |
Construct.
label | Label for the category. |
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; ... } }
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] |