X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aef252d9da7e846f0526eb0ad0c91198034f0973..2cce66352fc23859e991c2e7658dbf1cdf8c4183:/include/wx/generic/dataview.h diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index 953c293142..43f6fb9194 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -446,6 +446,7 @@ public: virtual void Expand( const wxDataViewItem & item ); virtual void Collapse( const wxDataViewItem & item ); + virtual bool IsExpanded( const wxDataViewItem & item ) const; virtual void SetFocus(); @@ -463,8 +464,8 @@ protected: virtual wxDataViewItem GetItemByRow( unsigned int row ) const; virtual int GetRowByItem( const wxDataViewItem & item ) const; - wxDataViewColumn* GetSortingColumn() { return m_sortingColumn; } - void SetSortingColumn( wxDataViewColumn* column ) { m_sortingColumn = column; } + int GetSortingColumnIndex() const { return m_sortingColumnIdx; } + void SetSortingColumnIndex(int idx) { m_sortingColumnIdx = idx; } public: // utility functions not part of the API @@ -485,12 +486,20 @@ public: // utility functions not part of the API wxWindow *GetMainWindow() { return (wxWindow*) m_clientArea; } + // return the index of the given column in m_cols + int GetColumnIndex(const wxDataViewColumn *column) const; + + // return the column displayed at the given position in the control + wxDataViewColumn *GetColumnAt(unsigned int pos) const; + private: wxDataViewColumnList m_cols; wxDataViewModelNotifier *m_notifier; wxDataViewMainWindow *m_clientArea; wxDataViewHeaderWindow *m_headerArea; - wxDataViewColumn *m_sortingColumn; + + // the index of the column currently used for sorting or -1 + int m_sortingColumnIdx; private: void OnSize( wxSizeEvent &event );