wxPropertyGrid Miscellanous

This section describes some miscellanous values, types and macros. More...

Defines

#define WX_PG_CLASSINFO(NAME)   (&NAME::ms_classInfo)
 Use this with wxPropertyGrid::IsPropertyKindOf.
#define wxPG_COLOUR(R, G, B)   ((wxUint32)(R+(G<<8)+(B<<16)))
 Convert Red, Green and Blue to a single 32-bit value.
#define wxPG_COLOUR_BLACK   (*wxBLACK)
#define wxPG_DEFAULT_IMAGE_SIZE   wxSize(-1, -1)
 If property is supposed to have custom-painted image, then returning this in OnMeasureImage() will usually be enough.
#define wxPG_EMPTY_ARRAYINT   wxArrayInt()
#define wxPG_EMPTY_ARRAYSTRING   wxArrayString()
#define wxPG_INVALID_VALUE   INT_MAX
#define wxPG_LABEL   (*((wxString*)NULL))
#define wxPG_NULL_BITMAP   wxNullBitmap

Typedefs

typedef wxString wxPGCachedString
typedef void(* wxPGPaintCallback )(wxPGProperty *property, wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata)
 This callback function is used by atleast wxCustomProperty to facilitiate drawing items in drop down list.
typedef int(* wxPGSortCallback )(wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)
 This callback function is used for sorting properties.
typedef bool(* wxPropertyGridCallback )(wxPropertyGrid *propGrid, wxPGProperty *property, wxWindow *ctrl, int data)
 This callback function is used by atleast wxCustomProperty to facilitiate easy custom action on button press.

Detailed Description

This section describes some miscellanous values, types and macros.


Define Documentation

#define WX_PG_CLASSINFO ( NAME   )     (&NAME::ms_classInfo)

Typedef Documentation

typedef void(* wxPGPaintCallback)(wxPGProperty *property, wxDC &dc, const wxRect &rect, wxPGPaintData &paintdata)

This callback function is used by atleast wxCustomProperty to facilitiate drawing items in drop down list.

Works very much like the old wxPGProperty::OnCustomPaint.

typedef int(* wxPGSortCallback)(wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)

This callback function is used for sorting properties.

Call wxPropertyGrid::SetSortFunction() to set it.

This function should return a value greater than 0 if position of p1 is after p2. So, for instance, when comparing property names, you can use following implementation:

            int MyPropertySortFunction(wxPropertyGrid* propGrid,
                                       wxPGProperty* p1,
                                       wxPGProperty* p2)
            {
                return p1->GetBaseName().compare( p2->GetBaseName() );
            }
typedef bool(* wxPropertyGridCallback)(wxPropertyGrid *propGrid, wxPGProperty *property, wxWindow *ctrl, int data)

This callback function is used by atleast wxCustomProperty to facilitiate easy custom action on button press.

Parameters:
propGrid related wxPropertyGrid
property related wxPGProperty
ctrl If not NULL (for example, not selected), a wxWindow* or equivalent
data Value depends on the context.
Return values:
True if changed value of the property.
 All Classes Functions Variables Enumerations Enumerator
Generated on Sun Aug 22 12:42:13 2010 for wxPropertyGrid by  doxygen 1.6.3