Remove wxHeaderColumn::SetAsSortKey() and only use SetSortOrder().
The two member functions, SetAsSortKey() and SetSortOrder(), were doing almost the same thing but differently and the former was only used in the generic wxDataViewCtrl implementation and not implemented in the native GTK/OS X one. Remove SetAsSortKey() entirely and only keep UnsetAsSortKey() which is still needed by generic/MSW wxDataViewCtrl. But only SetSortOrder() should now be called to indicate that the column is used for sorting. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -186,8 +186,12 @@ public:
|
||||
virtual void SetHidden(bool hidden)
|
||||
{ ChangeFlag(wxCOL_HIDDEN, hidden); }
|
||||
|
||||
virtual void SetAsSortKey(bool sort = true) = 0;
|
||||
void UnsetAsSortKey() { SetAsSortKey(false); }
|
||||
// This function can be called to indicate that this column is not used for
|
||||
// sorting any more. Under some platforms it's not necessary to do anything
|
||||
// in this case as just setting another column as a sort key takes care of
|
||||
// everything but under MSW we currently need to call this explicitly to
|
||||
// reset the sort indicator displayed on the column.
|
||||
virtual void UnsetAsSortKey() { }
|
||||
|
||||
virtual void SetSortOrder(bool ascending) = 0;
|
||||
void ToggleSortOrder() { SetSortOrder(!IsSortOrderAscending()); }
|
||||
@@ -249,10 +253,15 @@ public:
|
||||
virtual void SetFlags(int flags) { m_flags = flags; }
|
||||
virtual int GetFlags() const { return m_flags; }
|
||||
|
||||
virtual void SetAsSortKey(bool sort = true) { m_sort = sort; }
|
||||
virtual bool IsSortKey() const { return m_sort; }
|
||||
virtual void UnsetAsSortKey() { m_sort = false; }
|
||||
|
||||
virtual void SetSortOrder(bool ascending)
|
||||
{
|
||||
m_sort = true;
|
||||
m_sortAscending = ascending;
|
||||
}
|
||||
|
||||
virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; }
|
||||
virtual bool IsSortOrderAscending() const { return m_sortAscending; }
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user