wxPropertyCategory Class Reference

Category (caption) property. More...

#include <propgrid.h>

Inheritance diagram for wxPropertyCategory:
Inheritance graph
[legend]

List of all members.

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 ()

Detailed Description

Category (caption) property.

Definition at line 3309 of file propgrid.h.


Constructor & Destructor Documentation

wxPropertyCategory::wxPropertyCategory (  ) 

Special constructor only used in special cases.

wxPropertyCategory::wxPropertyCategory ( const wxString &  label,
const wxString &  name = wxPG_LABEL 
)

Construct.

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

Member Function Documentation

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


Member Data Documentation

Definition at line 3343 of file propgrid.h.

Definition at line 3342 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