+// ---------------------------------------------------------
+// wxDataViewSortedListModel
+// ---------------------------------------------------------
+
+typedef int (wxCALLBACK *wxDataViewListModelCompare)
+ (size_t row1, size_t row2, size_t col, wxDataViewListModel* model );
+
+WX_DEFINE_SORTED_EXPORTED_ARRAY_SIZE_T(size_t, wxDataViewSortedIndexArray );
+
+class wxDataViewSortedListModel: public wxDataViewListModel
+{
+public:
+ wxDataViewSortedListModel( wxDataViewListModel *child );
+ virtual ~wxDataViewSortedListModel();
+
+ virtual size_t GetNumberOfRows();
+ virtual size_t GetNumberOfCols();
+ // return type as reported by wxVariant
+ virtual wxString GetColType( size_t col );
+ // get value into a wxVariant
+ virtual void GetValue( wxVariant &variant, size_t col, size_t row );
+ // set value, call ValueChanged() afterwards!
+ virtual bool SetValue( wxVariant &variant, size_t col, size_t row );
+
+ // delegated notifiers
+ virtual bool RowAppended();
+ virtual bool RowPrepended();
+ virtual bool RowInserted( size_t before );
+ virtual bool RowDeleted( size_t row );
+ virtual bool RowChanged( size_t row );
+ virtual bool ValueChanged( size_t col, size_t row );
+ virtual bool RowsReordered( size_t *new_order );
+ virtual bool Cleared();
+
+ bool ChildValueChanged( size_t col, size_t row );
+
+ virtual void Resort();
+
+private:
+ wxDataViewListModel *m_child;
+ wxDataViewSortedIndexArray m_array;
+ wxDataViewListModelNotifier *m_notifierOnChild;
+
+protected:
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewSortedListModel)
+};
+
+// ---------------------------------------------------------