X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d61d8cffa928c7b25cfada5618b987be2ec5e052..f1a736636c32fa9cda80447c9f17287484ea8094:/include/wx/propgrid/advprops.h diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index 042d6021ab..9326cc40b9 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -23,8 +23,6 @@ // Additional Value Type Handlers // #ifndef SWIG -bool WXDLLIMPEXP_PROPGRID operator==(const wxFont&, const wxFont&); - bool WXDLLIMPEXP_PROPGRID operator==(const wxArrayInt& array1, const wxArrayInt& array2); #endif @@ -128,7 +126,8 @@ public: #ifndef SWIG void operator=(const wxColourPropertyValue& cpv) { - Init( cpv.m_type, cpv.m_colour ); + if (this != &cpv) + Init( cpv.m_type, cpv.m_colour ); } private: @@ -146,7 +145,7 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxColourPropertyValue, WXDLLIMPEXP_PROPGRID) #endif #ifndef SWIG - #define wxPG_EMPTY_CPV (*((wxColourPropertyValue*)NULL)) + #define wxPG_EMPTY_CPV (*(NULL)) #define wxPG_NORMAL_FONT (*wxNORMAL_FONT) #else #define wxPG_EMPTY_CPV wxCPV_wxPG_EMPTY @@ -180,7 +179,7 @@ public: const wxFont& value = wxFont()); virtual ~wxFontProperty(); virtual void OnSetValue(); - virtual wxString GetValueAsString( int argFlags = 0 ) const; + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); virtual void ChildChanged( wxVariant& thisValue, @@ -231,7 +230,7 @@ public: */ virtual int GetCustomColourIndex() const; - virtual wxString GetValueAsString( int argFlags = 0 ) const; + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; @@ -291,9 +290,10 @@ public: const wxColour& value = *wxWHITE ); virtual ~wxColourProperty(); -protected: - virtual wxString GetValueAsString( int argFlags ) const; + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual wxColour GetColour( int index ) const; + +protected: virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; private: @@ -392,7 +392,7 @@ public: virtual ~wxMultiChoiceProperty(); virtual void OnSetValue(); - virtual wxString GetValueAsString( int flags = 0 ) const; + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const; @@ -406,7 +406,7 @@ public: protected: - void GenerateValueAsString(); + void GenerateValueAsString( wxVariant& value, wxString* target ) const; // Returns translation of values into string indices. wxArrayInt GetValueAsIndices() const; @@ -430,7 +430,8 @@ protected: Supported special attributes: - "DateFormat": Determines displayed date format. - "PickerStyle": Determines window style used with wxDatePickerCtrl. - Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. + Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE + enables additional support for unspecified property value. */ class WXDLLIMPEXP_PROPGRID wxDateProperty : public wxPGProperty { @@ -442,7 +443,8 @@ public: const wxDateTime& value = wxDateTime() ); virtual ~wxDateProperty(); - virtual wxString GetValueAsString( int flags = 0 ) const; + virtual void OnSetValue(); + virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const;