X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18415eb5ca44bad29ab72db4607ed92cc6f456e4..02fd8b9b6186623ed61019ac7e69ed9a4ef16773:/include/wx/propgrid/property.h?ds=sidebyside diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index be9739e6fc..176db3d61e 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -322,7 +322,7 @@ public: data->IncRef(); variant.SetData(data); variant.SetName(it->first); - it++; + ++it; return true; } @@ -992,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) @@ -1422,6 +1423,15 @@ public: */ virtual wxPGEditorDialogAdapter* GetEditorDialog() const; + /** + Called whenever validation has failed with given pending value. + + @remarks If you implement this in your custom property class, please + remember to call the baser implementation as well, since they + may use it to revert property into pre-change state. + */ + virtual void OnValidationFailure( wxVariant& pendingValue ); + /** Append a new choice to property's list of choices. */ int AddChoice( const wxString& label, int value = wxPG_INVALID_VALUE ) @@ -1442,6 +1452,11 @@ public: return false; } + /** + Deletes children of the property. + */ + void DeleteChildren(); + /** Removes entry from property's wxPGChoices and editor control (if it is active). @@ -1544,8 +1559,6 @@ public: */ wxDEPRECATED( wxString GetValueString( int argFlags = 0 ) const ); - void UpdateControl( wxWindow* primary ); - /** Returns wxPGCell of given column. */ @@ -2072,9 +2085,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 ); @@ -2204,6 +2214,9 @@ protected: void DoSetName(const wxString& str) { m_name = str; } + /** Deletes all sub-properties. */ + void Empty(); + void InitAfterAdded( wxPropertyGridPageState* pageState, wxPropertyGrid* propgrid ); @@ -2355,9 +2368,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