Category (caption) property. More...
#include <propgrid.h>
Public Member Functions | |
void | CalculateTextExtent (wxWindow *wnd, const wxFont &font) |
virtual void | ChildChanged (wxVariant &, int, wxVariant &) 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=wxPG_LABEL) | |
wxPropertyCategory () | |
~wxPropertyCategory () | |
Protected Attributes | |
wxByte | m_capFgColIndex |
int | m_textExtent |
Private Member Functions | |
void | Init () |
Category (caption) property.
Definition at line 3309 of file propgrid.h.
wxPropertyCategory::wxPropertyCategory | ( | ) |
Special constructor only used in special cases.
wxPropertyCategory::wxPropertyCategory | ( | const wxString & | label, | |
const wxString & | name = wxPG_LABEL | |||
) |
Construct.
label | Label for the category. |
wxPropertyCategory::~wxPropertyCategory | ( | ) |
void wxPropertyCategory::CalculateTextExtent | ( | wxWindow * | wnd, | |
const wxFont & | font | |||
) |
virtual void wxPropertyCategory::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 3330 of file propgrid.h.
unsigned int wxPropertyCategory::GetTextColIndex | ( | ) | const [inline] |
Definition at line 3339 of file propgrid.h.
int wxPropertyCategory::GetTextExtent | ( | const wxWindow * | wnd, | |
const wxFont & | font | |||
) | const |
virtual wxString wxPropertyCategory::GetValueAsString | ( | int | argFlags | ) | const [virtual] |
Must be overridden with function that doesn't do anything.
Reimplemented from wxPGProperty.
void wxPropertyCategory::Init | ( | ) | [private] |
Reimplemented from wxPGProperty.
void wxPropertyCategory::SetTextColIndex | ( | unsigned int | colInd | ) | [inline] |
Definition at line 3338 of file propgrid.h.
wxByte wxPropertyCategory::m_capFgColIndex [protected] |
Definition at line 3343 of file propgrid.h.
int wxPropertyCategory::m_textExtent [protected] |
Definition at line 3342 of file propgrid.h.