-#define WX_PG_IMPLEMENT_VARIANT_DATA(CLASSNAME, DATATYPE) \
-class CLASSNAME : public wxPGVariantData \
-{ \
-_WX_PG_IMPLEMENT_VARIANT_DATA_CLASS(CLASSNAME, DATATYPE, DATATYPE&, \
- const DATATYPE&, wxPGDoesNothing(), \
- wxVariant(new CLASSNAME(DATATYPE())), \
- wxPGDoesNothing()) \
-public: \
- virtual void* GetValuePtr() { return (void*)&m_value; } \
-}; \
-_WX_PG_IMPLEMENT_VARIANT_DATA(CLASSNAME, \
- DATATYPE, \
- DATATYPE&, \
- const DATATYPE&, \
- (DATATYPE&)*((DATATYPE*)NULL), \
- wxPGVariantData)
-
-#define WX_PG_IMPLEMENT_WXOBJECT_VARIANT_DATA(CLASSNAME, DATATYPE) \
-class CLASSNAME : public wxPGVariantData \
-{ \
-_WX_PG_IMPLEMENT_VARIANT_DATA_CLASS(CLASSNAME, DATATYPE, DATATYPE&, \
- const DATATYPE&, wxPGDoesNothing(), \
- wxVariant(new CLASSNAME(DATATYPE())), \
- wxPGDoesNothing()) \
-public: \
- virtual void* GetValuePtr() { return (void*)&m_value; } \
- virtual wxClassInfo* GetValueClassInfo() \
- { return m_value.GetClassInfo(); } \
-}; \
-_WX_PG_IMPLEMENT_VARIANT_DATA(CLASSNAME, DATATYPE, DATATYPE&, \
- const DATATYPE&, \
- (DATATYPE&)*((DATATYPE*)NULL), \
- wxPGVariantData)
-
-
-#define WX_PG_DECLARE_VARIANT_DATA(CLASSNAME, DATATYPE, DECL) \
-DECL DATATYPE& operator <<( DATATYPE& value, const wxVariant &variant ); \
-DECL wxVariant& operator <<( wxVariant &variant, const DATATYPE& value ); \
-DECL DATATYPE& DATATYPE##FromVariant( const wxVariant& variant ); \
-DECL wxVariant DATATYPE##ToVariant( const DATATYPE& value ); \
-template<> inline wxVariant WXVARIANT( const DATATYPE& value ) \
- { return DATATYPE##ToVariant(value); } \
-DECL _WX_PG_VARIANT_DATA_CLASSINFO_CONTAINER_DECL(CLASSNAME);
-
-#define WX_PG_DECLARE_WXOBJECT_VARIANT_DATA WX_PG_DECLARE_VARIANT_DATA
-
-#define WX_PG_DECLARE_PTR_VARIANT_DATA(CLASSNAME, DATATYPE, DECL) \
-DECL DATATYPE* operator <<( DATATYPE* value, const wxVariant &variant ); \
-DECL wxVariant& operator <<( wxVariant &variant, DATATYPE* value ); \
-DECL DATATYPE* DATATYPE##FromVariant( const wxVariant& variant ); \
-DECL wxVariant DATATYPE##ToVariant( DATATYPE* value ); \
-DECL _WX_PG_VARIANT_DATA_CLASSINFO_CONTAINER_DECL(CLASSNAME);
-
-
-#define WX_PG_IMPLEMENT_PTR_VARIANT_DATA(CLASSNAME, DATATYPE, DEFAULT) \
-class CLASSNAME : public wxPGVariantData \
-{ \
-_WX_PG_IMPLEMENT_VARIANT_DATA_CLASS(CLASSNAME, DATATYPE*, DATATYPE*, \
- DATATYPE*, m_value = NULL, \
- DEFAULT, \
- if (m_value) Py_DECREF(m_value); \
- if (!value) value = Py_None; \
- Py_INCREF(value) ) \
- ~CLASSNAME() { if (m_value) Py_DECREF(m_value); } \
-public: \
- virtual void* GetValuePtr() { return (void*)m_value; } \
-}; \
-_WX_PG_IMPLEMENT_VARIANT_DATA(CLASSNAME, DATATYPE, DATATYPE*, DATATYPE*, \
- NULL, wxPGVariantData)
-
-
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataPoint, wxPoint, WXDLLIMPEXP_PROPGRID)
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataSize, wxSize, WXDLLIMPEXP_PROPGRID)
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataArrayInt,
- wxArrayInt, WXDLLIMPEXP_PROPGRID)
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataLongLong,
- wxLongLong, WXDLLIMPEXP_PROPGRID)
-WX_PG_DECLARE_VARIANT_DATA(wxPGVariantDataULongLong,
- wxULongLong, WXDLLIMPEXP_PROPGRID)
-
-WX_PG_DECLARE_WXOBJECT_VARIANT_DATA(wxPGVariantDataFont,
- wxFont, WXDLLIMPEXP_PROPGRID)
-template<> inline wxVariant WXVARIANT( const wxColour& value )
-{
- wxVariant variant;
- variant << value;
- return variant;