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. |
This section describes some miscellanous values, types and macros.
#define WX_PG_CLASSINFO | ( | NAME | ) | (&NAME::ms_classInfo) |
Use this with wxPropertyGrid::IsPropertyKindOf.
For example, as in
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.
propGrid | related wxPropertyGrid | |
property | related wxPGProperty | |
ctrl | If not NULL (for example, not selected), a wxWindow* or equivalent | |
data | Value depends on the context. |
True | if changed value of the property. |