X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/518cef04707760634dd3937c3a928bbc2db24836..ca77701441e39245dcbfce903049e76f166979e5:/include/wx/dataview.h diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 9e1ad7bac1..dbef9d872a 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -229,7 +229,7 @@ public: return true; } - // define hierachy + // define hierarchy virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0; virtual bool IsContainer( const wxDataViewItem &item ) const = 0; // Is the container just a header or an item with all columns @@ -939,7 +939,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); class WXDLLIMPEXP_ADV wxDataViewListStoreLine { public: - wxDataViewListStoreLine( wxUIntPtr data = NULL ) + wxDataViewListStoreLine( wxUIntPtr data = 0 ) { m_data = data; } @@ -966,12 +966,14 @@ public: void InsertColumn( unsigned int pos, const wxString &varianttype ); void AppendColumn( const wxString &varianttype ); - void AppendItem( const wxVector &values, wxUIntPtr data = NULL ); - void PrependItem( const wxVector &values, wxUIntPtr data = NULL ); - void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = NULL ); + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ); + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ); + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ); void DeleteItem( unsigned int pos ); void DeleteAllItems(); + unsigned int GetItemCount() const; + void SetItemData( const wxDataViewItem& item, wxUIntPtr data ); wxUIntPtr GetItemData( const wxDataViewItem& item ) const; @@ -1051,11 +1053,11 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); - void AppendItem( const wxVector &values, wxUIntPtr data = NULL ) + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->AppendItem( values, data ); } - void PrependItem( const wxVector &values, wxUIntPtr data = NULL ) + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->PrependItem( values, data ); } - void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = NULL ) + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->InsertItem( row, values, data ); } void DeleteItem( unsigned row ) { GetStore()->DeleteItem( row ); } @@ -1085,6 +1087,9 @@ public: wxUIntPtr GetItemData( const wxDataViewItem& item ) const { return GetStore()->GetItemData( item ); } + int GetItemCount() const + { return GetStore()->GetItemCount(); } + void OnSize( wxSizeEvent &event ); private: