Improve wxDataViewModel::HasDefaultCompare() documentation

Document that returning true from it means that Compare() can (and will)
be called with -1 as the column index when the default sort order is
being used.

Closes #18190.
This commit is contained in:
Vadim Zeitlin
2018-08-18 15:28:16 +02:00
parent 2a3e3bb533
commit 151309b2e4

View File

@@ -153,7 +153,10 @@ public:
@param item2
Second item to compare.
@param column
The column holding the items to be compared.
The column holding the items to be compared. If the model class
overrides HasDefaultCompare() to return @true, this parameter will
be @c (unsigned)-1 when sorting items if no column is selected for
sorting them.
@param ascending
Indicates whether the sort is being performed in ascending or
descending order.
@@ -273,7 +276,14 @@ public:
If any other order (e.g. by index or order of appearance) is required,
then this should be used.
Note that if this method is overridden to return @true, the
implementation of Compare() should be ready to accept @c (unsigned)-1
as the value for the column index parameter.
See wxDataViewIndexListModel for a model which makes use of this.
@see Compare()
*/
virtual bool HasDefaultCompare() const;