X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7e2b52235d70e25d7797ce1dccd97fa6989f4b5..8dc5f051c7e2c3d0e8e5b94dd829d00c47d7e51c:/include/wx/propgrid/property.h diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 6198c7166a..d305659326 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -199,11 +199,9 @@ class WXDLLIMPEXP_PROPGRID wxPGCell : public wxObject { public: wxPGCell(); - wxPGCell( const wxPGCell& other ) + wxPGCell(const wxPGCell& other) + : wxObject(other) { - m_refData = other.m_refData; - if ( m_refData ) - m_refData->IncRef(); } wxPGCell( const wxString& text, @@ -324,7 +322,7 @@ public: data->IncRef(); variant.SetData(data); variant.SetName(it->first); - it++; + ++it; return true; } @@ -649,10 +647,8 @@ class WXDLLIMPEXP_PROPGRID wxPGChoiceEntry : public wxPGCell public: wxPGChoiceEntry(); wxPGChoiceEntry(const wxPGChoiceEntry& other) + : wxPGCell(other) { - m_refData = other.m_refData; - if ( m_refData ) - m_refData->IncRef(); m_value = other.m_value; } wxPGChoiceEntry( const wxString& label, @@ -996,7 +992,8 @@ public: #ifndef SWIG void operator= (const wxPGChoices& a) { - AssignData(a.m_data); + if (this != &a) + AssignData(a.m_data); } wxPGChoiceEntry& operator[](unsigned int i) @@ -1446,6 +1443,11 @@ public: return false; } + /** + Deletes children of the property. + */ + void DeleteChildren(); + /** Removes entry from property's wxPGChoices and editor control (if it is active). @@ -1548,8 +1550,6 @@ public: */ wxDEPRECATED( wxString GetValueString( int argFlags = 0 ) const ); - void UpdateControl( wxWindow* primary ); - /** Returns wxPGCell of given column. */ @@ -2076,9 +2076,6 @@ public: /** Returns index of given child property. */ int Index( const wxPGProperty* p ) const; - /** Deletes all sub-properties. */ - void Empty(); - // Puts correct indexes to children void FixIndicesOfChildren( unsigned int starthere = 0 ); @@ -2208,6 +2205,9 @@ protected: void DoSetName(const wxString& str) { m_name = str; } + /** Deletes all sub-properties. */ + void Empty(); + void InitAfterAdded( wxPropertyGridPageState* pageState, wxPropertyGrid* propgrid ); @@ -2359,9 +2359,9 @@ public: int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const; -protected: virtual wxString ValueToString( wxVariant& value, int argFlags ) const; +protected: void SetTextColIndex( unsigned int colInd ) { m_capFgColIndex = (wxByte) colInd; } unsigned int GetTextColIndex() const