X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0062c047ecb5a7d4790b980777dfa70869f4834..3c029873c66cfdc0dcbf52958970273435ba02fc:/include/wx/dataview.h?ds=sidebyside diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 085655fb16..0a6a5a8f54 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -38,12 +38,12 @@ // wxDataViewCtrl globals // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_ADV wxDataViewItem; -class WXDLLIMPEXP_ADV wxDataViewModel; -class WXDLLIMPEXP_ADV wxDataViewCtrl; -class WXDLLIMPEXP_ADV wxDataViewColumn; -class WXDLLIMPEXP_ADV wxDataViewRenderer; -class WXDLLIMPEXP_ADV wxDataViewModelNotifier; +class WXDLLIMPEXP_FWD_ADV wxDataViewItem; +class WXDLLIMPEXP_FWD_ADV wxDataViewModel; +class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl; +class WXDLLIMPEXP_FWD_ADV wxDataViewColumn; +class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer; +class WXDLLIMPEXP_FWD_ADV wxDataViewModelNotifier; class wxDataViewEventModelNotifier; extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[]; @@ -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(); + virtual ~wxDataViewModel() { } - wxList m_notifiers; + wxList m_notifiers; + wxDataViewModelCompare m_cmpFunc; }; // ---------------------------------------------------------