wxPropertyGrid Miscellanous

Defines

#define WX_PG_CLASSINFO(NAME)   (&NAME::ms_classInfo)
#define wxPG_COLOUR(R, G, B)   ((wxUint32)(R+(G<<8)+(B<<16)))
#define wxPG_COLOUR_BLACK   (*wxBLACK)
#define wxPG_DEFAULT_IMAGE_SIZE   wxSize(-1, -1)
#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)
typedef int(* wxPGSortCallback )(wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)
typedef bool(* wxPropertyGridCallback )(wxPropertyGrid *propGrid, wxPGProperty *property, wxWindow *ctrl, int data)

Detailed Description

This section describes some miscellanous values, types and macros.


Define Documentation

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

Use this with wxPropertyGrid::IsPropertyKindOf. For example, as in

        pg->IsPropertyKindOf(WX_PG_CLASSINFO(wxStringProperty))

Definition at line 730 of file propgrid.h.

#define wxPG_COLOUR ( R,
G,
 )     ((wxUint32)(R+(G<<8)+(B<<16)))

Convert Red, Green and Blue to a single 32-bit value.

Definition at line 666 of file propgrid.h.

#define wxPG_COLOUR_BLACK   (*wxBLACK)

Definition at line 651 of file propgrid.h.

#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.

Definition at line 672 of file propgrid.h.

#define wxPG_EMPTY_ARRAYINT   wxArrayInt()

Definition at line 645 of file propgrid.h.

#define wxPG_EMPTY_ARRAYSTRING   wxArrayString()

Definition at line 646 of file propgrid.h.

#define wxPG_INVALID_VALUE   INT_MAX

Definition at line 661 of file propgrid.h.

#define wxPG_LABEL   (*((wxString*)NULL))

Definition at line 649 of file propgrid.h.

#define wxPG_NULL_BITMAP   wxNullBitmap

Definition at line 650 of file propgrid.h.


Typedef Documentation

typedef wxString wxPGCachedString

Definition at line 733 of file propgrid.h.

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.

Definition at line 698 of file propgrid.h.

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

Definition at line 720 of file propgrid.h.

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.

Definition at line 688 of file propgrid.h.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


wxpropgrid
Author(s): Jaakko Salli
autogenerated on Fri Jan 11 09:34:05 2013