X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/40924780ea265ba9430b59348c563d78b8c40a71..5ecd2ba500a9783b66f0d95e9ff8d98146e18c30:/include/wx/propgrid/property.h diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 682732813c..d394098c82 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -615,7 +615,7 @@ public: // Takes ownership of 'item' void Insert( int index, wxPGChoiceEntry* item ) { - wxArrayPtrVoid::iterator it; + wxVector::iterator it; if ( index == -1 ) { it = m_items.end(); @@ -642,7 +642,7 @@ public: { wxCHECK_MSG( i < GetCount(), NULL, "invalid index" ); - return (wxPGChoiceEntry*) m_items[i]; + return m_items[i]; } void DecRef() @@ -654,7 +654,7 @@ public: } private: - wxArrayPtrVoid m_items; + wxVector m_items; // So that multiple properties can use the same set int m_refCount; @@ -856,15 +856,6 @@ public: Free(); Add(labels,values); } - - /** Version that works with wxArrayString. - TODO: Deprecate this. - */ - void Set( wxArrayString& arr, const long* values = (const long*) NULL ) - { - Free(); - Add(arr,values); - } #endif // SWIG /** Version that works with wxArrayString and wxArrayInt. */ @@ -1565,7 +1556,9 @@ public: /** Determines, recursively, if all children are not unspecified. - Takes values in given list into account. + @param pendingList + Assumes members in this wxVariant list as pending + replacement values. */ bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; @@ -1579,9 +1572,9 @@ public: /** Returns true if containing grid uses wxPG_EX_AUTO_UNSPECIFIED_VALUES. */ - FlagType UsesAutoUnspecified() const + bool UsesAutoUnspecified() const { - return HasFlag(wxPG_PROP_AUTO_UNSPECIFIED); + return HasFlag(wxPG_PROP_AUTO_UNSPECIFIED)?true:false; } wxBitmap* GetValueImage() const @@ -1612,8 +1605,6 @@ public: */ double GetAttributeAsDouble( const wxString& name, double defVal ) const; - unsigned int GetArrIndex() const { return m_arrIndex; } - unsigned int GetDepth() const { return (unsigned int)m_depth; } /** Gets flags as a'|' delimited string. Note that flag names are not @@ -1857,15 +1848,6 @@ public: */ bool SetChoices( wxPGChoices& choices ); - /** Sets new set of choices for property. - */ - bool SetChoices( const wxArrayString& labels, - const wxArrayInt& values = wxArrayInt() ) - { - wxPGChoices chs(labels, values); - return SetChoices(chs); - } - /** Set max length of text in text editor. */ inline bool SetMaxLength( int maxLen ); @@ -1906,19 +1888,18 @@ public: int GetChildrenHeight( int lh, int iMax = -1 ) const; /** Returns number of child properties */ - unsigned int GetChildCount() const { return m_children.GetCount(); } + unsigned int GetChildCount() const { return m_children.size(); } /** Returns sub-property at index i. */ wxPGProperty* Item( size_t i ) const - { return (wxPGProperty*)m_children.Item(i); } + { return m_children[i]; } /** Returns last sub-property. */ - wxPGProperty* Last() const { return (wxPGProperty*)m_children.Last(); } + wxPGProperty* Last() const { return m_children.back(); } - /** Returns index of given sub-property. */ - int Index( const wxPGProperty* p ) const - { return m_children.Index((wxPGProperty*)p); } + /** Returns index of given child property. */ + int Index( const wxPGProperty* p ) const; /** Deletes all sub-properties. */ void Empty(); @@ -2003,6 +1984,9 @@ protected: // Call for after sub-properties added with AddChild void PrepareSubProperties(); + // Removes child property with given pointer. Does not delete it. + void RemoveChild( wxPGProperty* p ); + void SetParentalType( int flag ) { m_flags &= ~(wxPG_PROP_PROPERTY|wxPG_PROP_PARENTAL_FLAGS); @@ -2039,7 +2023,7 @@ protected: wxVariant m_value; wxPGAttributeStorage m_attributes; - wxArrayPtrVoid m_children; + wxArrayPGProperty m_children; // Extended cell information wxArrayPtrVoid m_cells;