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
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 );