X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa93d732e2afd376527d9c0eb726057f15f18868..d0260bd894ec5ef95c960e45cdaff3e6ebae019d:/include/wx/generic/dataview.h diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index ce3540749d..ed3d11eb69 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -68,10 +68,12 @@ public: virtual void SetFlags(int flags) { m_flags = flags; UpdateDisplay(); } virtual int GetFlags() const { return m_flags; } - virtual void SetAsSortKey(bool sort = true) { m_sort = sort; UpdateDisplay(); } virtual bool IsSortKey() const { return m_sort; } - virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; UpdateDisplay(); } + virtual void UnsetAsSortKey() { m_sort = false; UpdateDisplay(); } + + virtual void SetSortOrder(bool ascending); + virtual bool IsSortOrderAscending() const { return m_sortAscending; } virtual void SetBitmap( const wxBitmap& bitmap ) { wxDataViewColumnBase::SetBitmap(bitmap); UpdateDisplay(); } @@ -220,17 +222,23 @@ public: // utility functions not part of the API // return the column displayed at the given position in the control wxDataViewColumn *GetColumnAt(unsigned int pos) const; + virtual void OnInternalIdle(); + private: virtual wxDataViewItem DoGetCurrentItem() const; virtual void DoSetCurrentItem(const wxDataViewItem& item); - void UpdateColBestWidths(); - void UpdateColBestWidth(int idx); + void InvalidateColBestWidths(); + void InvalidateColBestWidth(int idx); + void UpdateColWidths(); wxDataViewColumnList m_cols; // cached column best widths or 0 if not computed, values are for // respective columns from m_cols and the arrays have same size wxVector m_colsBestWidths; + // m_colsBestWidths partially invalid, needs recomputing + bool m_colsDirty; + wxDataViewModelNotifier *m_notifier; wxDataViewMainWindow *m_clientArea; wxDataViewHeaderWindow *m_headerArea;