Eliminated WX_PG_DECLARE_X_METHODS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -176,10 +176,11 @@ public:
|
|||||||
virtual ~wxFontProperty();
|
virtual ~wxFontProperty();
|
||||||
virtual void OnSetValue();
|
virtual void OnSetValue();
|
||||||
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
|
virtual bool OnEvent( wxPropertyGrid* propgrid,
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
wxWindow* primary, wxEvent& event );
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
//WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
@@ -225,13 +226,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual int GetCustomColourIndex() const;
|
virtual int GetCustomColourIndex() const;
|
||||||
|
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
|
virtual bool OnEvent( wxPropertyGrid* propgrid,
|
||||||
//virtual wxSize GetImageSize( int item ) const;
|
wxWindow* primary, wxEvent& event );
|
||||||
//virtual wxPGCellRenderer* GetCellRenderer( int column ) const;
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
|
virtual wxSize OnMeasureImage( int item ) const;
|
||||||
|
virtual void OnCustomPaint( wxDC& dc,
|
||||||
|
const wxRect& rect, wxPGPaintData& paintdata );
|
||||||
|
|
||||||
// Helper function to show the colour dialog
|
// Helper function to show the colour dialog
|
||||||
bool QueryColourFromUser( wxVariant& variant ) const;
|
bool QueryColourFromUser( wxVariant& variant ) const;
|
||||||
@@ -294,9 +298,9 @@ class WXDLLIMPEXP_PROPGRID wxCursorProperty : public wxEnumProperty
|
|||||||
int value = 0 );
|
int value = 0 );
|
||||||
virtual ~wxCursorProperty();
|
virtual ~wxCursorProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
|
virtual wxSize OnMeasureImage( int item ) const;
|
||||||
//virtual wxSize GetImageSize( int item ) const;
|
virtual void OnCustomPaint( wxDC& dc,
|
||||||
//virtual wxPGCellRenderer* GetCellRenderer( int column ) const;
|
const wxRect& rect, wxPGPaintData& paintdata );
|
||||||
};
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
@@ -321,7 +325,9 @@ public:
|
|||||||
|
|
||||||
virtual void OnSetValue();
|
virtual void OnSetValue();
|
||||||
|
|
||||||
WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
|
virtual wxSize OnMeasureImage( int item ) const;
|
||||||
|
virtual void OnCustomPaint( wxDC& dc,
|
||||||
|
const wxRect& rect, wxPGPaintData& paintdata );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBitmap* m_pBitmap; // final thumbnail area
|
wxBitmap* m_pBitmap; // final thumbnail area
|
||||||
@@ -370,7 +376,8 @@ public:
|
|||||||
virtual bool StringToValue(wxVariant& variant,
|
virtual bool StringToValue(wxVariant& variant,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
int argFlags = 0) const;
|
int argFlags = 0) const;
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
virtual bool OnEvent( wxPropertyGrid* propgrid,
|
||||||
|
wxWindow* primary, wxEvent& event );
|
||||||
|
|
||||||
wxArrayInt GetValueAsArrayInt() const
|
wxArrayInt GetValueAsArrayInt() const
|
||||||
{
|
{
|
||||||
@@ -420,7 +427,7 @@ public:
|
|||||||
const wxString& text,
|
const wxString& text,
|
||||||
int argFlags = 0) const;
|
int argFlags = 0) const;
|
||||||
|
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
|
|
||||||
void SetFormat( const wxString& format )
|
void SetFormat( const wxString& format )
|
||||||
{
|
{
|
||||||
|
@@ -22,44 +22,10 @@ class wxArrayEditorDialog;
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
//
|
|
||||||
// Additional property class declaration helper macros
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Property class implementation helper macros.
|
// Property class implementation helper macros.
|
||||||
//
|
//
|
||||||
|
|
||||||
#define WX_PG_DECLARE_BASIC_TYPE_METHODS() \
|
|
||||||
virtual wxString GetValueAsString( int argFlags = 0 ) const; \
|
|
||||||
virtual bool StringToValue( wxVariant& variant, \
|
|
||||||
const wxString& text, \
|
|
||||||
int argFlags = 0 ) const;
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_CHOICE_METHODS() \
|
|
||||||
virtual bool IntToValue( wxVariant& variant, \
|
|
||||||
int number, int argFlags = 0 ) const; \
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_EVENT_METHODS() \
|
|
||||||
virtual bool OnEvent( wxPropertyGrid* propgrid, \
|
|
||||||
wxWindow* primary, wxEvent& event );
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_PARENTAL_METHODS() \
|
|
||||||
virtual void ChildChanged( wxVariant& thisValue, \
|
|
||||||
int childIndex, wxVariant& childValue ) const; \
|
|
||||||
virtual void RefreshChildren();
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_CUSTOM_PAINT_METHODS() \
|
|
||||||
virtual wxSize OnMeasureImage( int item ) const; \
|
|
||||||
virtual void OnCustomPaint( wxDC& dc, \
|
|
||||||
const wxRect& rect, wxPGPaintData& paintdata );
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_ATTRIBUTE_METHODS() \
|
|
||||||
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
|
||||||
|
|
||||||
#define WX_PG_DECLARE_VALIDATOR_METHODS() \
|
|
||||||
virtual wxValidator* DoGetValidator() const;
|
|
||||||
|
|
||||||
// Adds constructor function as well.
|
// Adds constructor function as well.
|
||||||
#define WX_PG_IMPLEMENT_PROPERTY_CLASS2(NAME,CLASSNAME,\
|
#define WX_PG_IMPLEMENT_PROPERTY_CLASS2(NAME,CLASSNAME,\
|
||||||
UPCLASS,T,T_AS_ARG,EDITOR) \
|
UPCLASS,T,T_AS_ARG,EDITOR) \
|
||||||
@@ -93,7 +59,7 @@ public: \
|
|||||||
const wxString& value = wxEmptyString); \
|
const wxString& value = wxEmptyString); \
|
||||||
virtual ~NAME(); \
|
virtual ~NAME(); \
|
||||||
virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); \
|
virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); \
|
||||||
WX_PG_DECLARE_VALIDATOR_METHODS() \
|
virtual wxValidator* DoGetValidator() const; \
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WX_PG_DECLARE_STRING_PROPERTY(NAME) \
|
#define WX_PG_DECLARE_STRING_PROPERTY(NAME) \
|
||||||
@@ -378,8 +344,12 @@ public:
|
|||||||
const wxString& value = wxEmptyString );
|
const wxString& value = wxEmptyString );
|
||||||
virtual ~wxStringProperty();
|
virtual ~wxStringProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
|
|
||||||
/** This is updated so "<composed>" special value can be handled.
|
/** This is updated so "<composed>" special value can be handled.
|
||||||
*/
|
*/
|
||||||
@@ -464,7 +434,10 @@ public:
|
|||||||
wxIntProperty( const wxString& label,
|
wxIntProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
const wxLongLong& value );
|
const wxLongLong& value );
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
virtual bool ValidateValue( wxVariant& value,
|
virtual bool ValidateValue( wxVariant& value,
|
||||||
wxPGValidationInfo& validationInfo ) const;
|
wxPGValidationInfo& validationInfo ) const;
|
||||||
virtual bool IntToValue( wxVariant& variant,
|
virtual bool IntToValue( wxVariant& variant,
|
||||||
@@ -515,8 +488,11 @@ public:
|
|||||||
wxUIntProperty( const wxString& label,
|
wxUIntProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
const wxULongLong& value );
|
const wxULongLong& value );
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
virtual bool ValidateValue( wxVariant& value,
|
virtual bool ValidateValue( wxVariant& value,
|
||||||
wxPGValidationInfo& validationInfo ) const;
|
wxPGValidationInfo& validationInfo ) const;
|
||||||
virtual bool IntToValue( wxVariant& variant,
|
virtual bool IntToValue( wxVariant& variant,
|
||||||
@@ -549,8 +525,11 @@ public:
|
|||||||
double value = 0.0 );
|
double value = 0.0 );
|
||||||
virtual ~wxFloatProperty();
|
virtual ~wxFloatProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
virtual bool ValidateValue( wxVariant& value,
|
virtual bool ValidateValue( wxVariant& value,
|
||||||
wxPGValidationInfo& validationInfo ) const;
|
wxPGValidationInfo& validationInfo ) const;
|
||||||
|
|
||||||
@@ -589,9 +568,13 @@ public:
|
|||||||
bool value = false );
|
bool value = false );
|
||||||
virtual ~wxBoolProperty();
|
virtual ~wxBoolProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_CHOICE_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool IntToValue( wxVariant& variant,
|
||||||
|
int number, int argFlags = 0 ) const;
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !SWIG
|
#endif // !SWIG
|
||||||
@@ -891,8 +874,7 @@ public:
|
|||||||
const wxString& text,
|
const wxString& text,
|
||||||
int argFlags = 0 ) const;
|
int argFlags = 0 ) const;
|
||||||
virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
|
virtual wxPGEditorDialogAdapter* GetEditorDialog() const;
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
|
||||||
|
|
||||||
static wxValidator* GetClassValidator();
|
static wxValidator* GetClassValidator();
|
||||||
virtual wxValidator* DoGetValidator() const;
|
virtual wxValidator* DoGetValidator() const;
|
||||||
@@ -942,8 +924,8 @@ public:
|
|||||||
virtual bool StringToValue( wxVariant& variant,
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
int argFlags = 0 ) const;
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool OnEvent( wxPropertyGrid* propgrid,
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
wxWindow* primary, wxEvent& event );
|
||||||
|
|
||||||
// Shows string editor dialog. Value to be edited should be read from
|
// Shows string editor dialog. Value to be edited should be read from
|
||||||
// value, and if dialog is not cancelled, it should be stored back and true
|
// value, and if dialog is not cancelled, it should be stored back and true
|
||||||
@@ -981,8 +963,8 @@ public:
|
|||||||
const wxString& value = wxEmptyString );
|
const wxString& value = wxEmptyString );
|
||||||
virtual ~wxDirProperty();
|
virtual ~wxDirProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
WX_PG_DECLARE_VALIDATOR_METHODS()
|
virtual wxValidator* DoGetValidator() const;
|
||||||
|
|
||||||
virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value );
|
virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value );
|
||||||
|
|
||||||
@@ -1017,8 +999,12 @@ public:
|
|||||||
virtual ~wxArrayStringProperty();
|
virtual ~wxArrayStringProperty();
|
||||||
|
|
||||||
virtual void OnSetValue();
|
virtual void OnSetValue();
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool OnEvent( wxPropertyGrid* propgrid,
|
||||||
|
wxWindow* primary, wxEvent& event );
|
||||||
|
|
||||||
virtual void GenerateValueAsString();
|
virtual void GenerateValueAsString();
|
||||||
|
|
||||||
@@ -1059,7 +1045,7 @@ public: \
|
|||||||
virtual bool OnEvent( wxPropertyGrid* propgrid, \
|
virtual bool OnEvent( wxPropertyGrid* propgrid, \
|
||||||
wxWindow* primary, wxEvent& event ); \
|
wxWindow* primary, wxEvent& event ); \
|
||||||
virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); \
|
virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); \
|
||||||
WX_PG_DECLARE_VALIDATOR_METHODS() \
|
virtual wxValidator* DoGetValidator() const; \
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM) \
|
#define WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM) \
|
||||||
|
@@ -26,9 +26,11 @@ public:
|
|||||||
|
|
||||||
virtual void OnSetValue(); // Override to allow image loading.
|
virtual void OnSetValue(); // Override to allow image loading.
|
||||||
|
|
||||||
WX_PG_DECLARE_CHOICE_METHODS()
|
virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
|
||||||
WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
|
virtual wxSize OnMeasureImage( int item ) const;
|
||||||
|
virtual void OnCustomPaint( wxDC& dc,
|
||||||
|
const wxRect& rect, wxPGPaintData& paintdata );
|
||||||
|
|
||||||
void LoadThumbnails( size_t n );
|
void LoadThumbnails( size_t n );
|
||||||
|
|
||||||
@@ -74,7 +76,9 @@ public:
|
|||||||
const wxVector3f& value = wxVector3f() );
|
const wxVector3f& value = wxVector3f() );
|
||||||
virtual ~wxVectorProperty();
|
virtual ~wxVectorProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
@@ -104,7 +108,9 @@ public:
|
|||||||
const wxTriangle& value = wxTriangle() );
|
const wxTriangle& value = wxTriangle() );
|
||||||
virtual ~wxTriangleProperty();
|
virtual ~wxTriangleProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
|
@@ -34,8 +34,10 @@ public:
|
|||||||
// in base class to function properly.
|
// in base class to function properly.
|
||||||
virtual wxVariant DoGetValue() const;
|
virtual wxVariant DoGetValue() const;
|
||||||
|
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Value must be stored as variant - otherwise it will be
|
// Value must be stored as variant - otherwise it will be
|
||||||
@@ -54,7 +56,9 @@ public:
|
|||||||
const wxSize& value = wxSize() );
|
const wxSize& value = wxSize() );
|
||||||
virtual ~wxSizeProperty();
|
virtual ~wxSizeProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -76,7 +80,9 @@ public:
|
|||||||
const wxPoint& value = wxPoint() );
|
const wxPoint& value = wxPoint() );
|
||||||
virtual ~wxPointProperty();
|
virtual ~wxPointProperty();
|
||||||
|
|
||||||
WX_PG_DECLARE_PARENTAL_METHODS()
|
virtual void ChildChanged( wxVariant& thisValue,
|
||||||
|
int childIndex, wxVariant& childValue ) const;
|
||||||
|
virtual void RefreshChildren();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -107,9 +113,12 @@ public:
|
|||||||
virtual ~wxArrayDoubleProperty ();
|
virtual ~wxArrayDoubleProperty ();
|
||||||
|
|
||||||
virtual void OnSetValue();
|
virtual void OnSetValue();
|
||||||
WX_PG_DECLARE_BASIC_TYPE_METHODS()
|
virtual wxString GetValueAsString( int argFlags = 0 ) const;
|
||||||
WX_PG_DECLARE_EVENT_METHODS()
|
virtual bool StringToValue( wxVariant& variant,
|
||||||
WX_PG_DECLARE_ATTRIBUTE_METHODS()
|
const wxString& text,
|
||||||
|
int argFlags = 0 ) const;
|
||||||
|
virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
|
||||||
|
virtual bool DoSetAttribute( const wxString& name, wxVariant& value );
|
||||||
|
|
||||||
// Generates cache for displayed text
|
// Generates cache for displayed text
|
||||||
virtual void GenerateValueAsString ( wxString& target, int prec, bool removeZeroes ) const;
|
virtual void GenerateValueAsString ( wxString& target, int prec, bool removeZeroes ) const;
|
||||||
|
Reference in New Issue
Block a user