X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41abc29aa6d7a44cbf4e01b05d239868e216e4af..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/dataview.h?ds=sidebyside diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 5b00916342..e45d0fced1 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -2337,6 +2337,22 @@ public: */ void DeleteAllItems(); + /** + Returns the number of items (=rows) in the control + + @since 2.9.4 + */ + unsigned int GetItemCount() const; + + /** + Returns the client data associated with the item. + + @see SetItemData() + + @since 2.9.4 + */ + wxUIntPtr GetItemData(const wxDataViewItem& item) const; + /** Sets the value in the store and update the control. */ @@ -2379,6 +2395,19 @@ public: */ bool GetToggleValue( unsigned int row, unsigned int col ) const; + /** + Associates a client data pointer with the given item. + + Notice that the control does @e not take ownership of the pointer for + compatibility with wxListCtrl. I.e. it will @e not delete the pointer + (if it is a pointer and not a number) itself, it is up to you to do it. + + @see GetItemData() + + @since 2.9.4 + */ + void SetItemData(const wxDataViewItem& item, wxUIntPtr data); + //@} }; @@ -2688,6 +2717,22 @@ public: */ void DeleteAllItems(); + /** + Returns the number of items (=rows) in the control + + @since 2.9.4 + */ + unsigned int GetItemCount() const; + + /** + Returns the client data associated with the item. + + @see SetItemData() + + @since 2.9.4 + */ + wxUIntPtr GetItemData(const wxDataViewItem& item) const; + /** Overridden from wxDataViewModel */ @@ -2698,6 +2743,18 @@ public: */ virtual wxString GetColumnType( unsigned int col ) const; + /** + Sets the client data associated with the item. + + Notice that this class does @e not take ownership of the passed in + pointer and will not delete it. + + @see GetItemData() + + @since 2.9.4 + */ + void SetItemData(const wxDataViewItem& item, wxUIntPtr data); + /** Overridden from wxDataViewIndexListModel */