X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5dbe15d0bacde245539f54c4d97af6b4696f01f..1d66b09982c9cadc20f9abcf9e2bdc804ffa877a:/include/wx/dataview.h diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 8ad75c0d26..0a6a5a8f54 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -83,10 +83,15 @@ private: wxUint32 m_id; }; +bool operator == ( const wxDataViewItem& left, const wxDataViewItem& right ); + // --------------------------------------------------------- // wxDataViewModel // --------------------------------------------------------- +typedef int (wxCALLBACK *wxDataViewModelCompare) + (const wxDataViewItem& item1, const wxDataViewItem& item2, unsigned int col, unsigned int option ); + class WXDLLIMPEXP_ADV wxDataViewModel: public wxObjectRefData { public: @@ -123,11 +128,15 @@ public: void AddNotifier( wxDataViewModelNotifier *notifier ); void RemoveNotifier( wxDataViewModelNotifier *notifier ); + void SetCompareFunction( wxDataViewModelCompare func ) { m_cmpFunc = func; } + wxDataViewModelCompare GetCompareFunction() { return m_cmpFunc; } + protected: // the user should not delete this class directly: he should use DecRef() instead! virtual ~wxDataViewModel() { } - wxList m_notifiers; + wxList m_notifiers; + wxDataViewModelCompare m_cmpFunc; }; // ---------------------------------------------------------