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:
Vadim Zeitlin
2011-09-21 15:07:46 +00:00
parent 8148ae02ef
commit aadbdd1699
10 changed files with 36 additions and 55 deletions

View File

@@ -338,38 +338,26 @@ public:
virtual void SetHidden(bool hidden);
/**
Sets this column as the sort key for the associated control.
Calling this function with @true argument means that this column is
currently used for sorting the control contents and so should typically
display an arrow indicating it (the direction of the arrow depends on
IsSortOrderAscending() return value).
Don't confuse this function with SetSortable() which should be used to
indicate that the column @em may be used for sorting while this one is
used to indicate that it currently @em is used for sorting. Of course,
SetAsSortKey() can be only called for sortable columns.
@param sort
Sort (default) or don't sort the control contents by this column.
*/
virtual void SetAsSortKey(bool sort = true) = 0;
/**
Don't use this column for sorting.
This is equivalent to calling SetAsSortKey() with @false argument.
This is the reverse of SetSortOrder() and is called to indicate that
this column is not used for sorting any longer.
*/
void UnsetAsSortKey();
/**
Sets the sort order for this column.
Sets this column as the sort key for the associated control.
This only makes sense for sortable columns which are currently used as
sort key, i.e. for which IsSortKey() returns @true and is only taken
into account by the control in which this column is inserted, this
function just stores the sort order in the wxHeaderColumn object.
This function indicates that this column is currently used for sorting
the control and also sets the sorting direction. Notice that actual
sorting is only done in the control associated with the header, this
function doesn't do any sorting on its own.
Don't confuse this function with SetSortable() which should be used to
indicate that the column @em may be used for sorting while this one is
used to indicate that it currently @em is used for sorting. Of course,
SetSortOrder() can be only called for sortable columns.
@param ascending
If @true, sort in ascending order, otherwise in descending order.
@@ -444,7 +432,6 @@ public:
virtual wxAlignment GetAlignment() const;
virtual void SetFlags(int flags);
virtual int GetFlags() const;
virtual void SetAsSortKey(bool sort = true);
virtual bool IsSortKey() const;
virtual void SetSortOrder(bool ascending);
virtual bool IsSortOrderAscending() const;