gtk.sorter
Module for [Sorter] class
Types 3
[gtk.sorter.Sorter] is an object to describe sorting criteria.
Its primary user is [gtk.sort_list_model.SortListModel]
The model will use a sorter to determine the order in which its items should appear by calling [gtk.sorter.Sorter.compare] for pairs of items.
Sorters may change their sorting behavior through their lifetime. In that case, they will emit the [gtk.sorter.Sorter.changed] signal to notify that the sort order is no longer valid and should be updated by calling [gtk.sorter.Sorter.compare] again.
GTK provides various pre-made sorter implementations for common sorting operations. [gtk.column_view.ColumnView] has built-in support for sorting lists via the [gtk.column_view_column.ColumnViewColumn.sorter] property, where the user can change the sorting by clicking on list headers.
Of course, in particular for large lists, it is also possible to subclass [gtk.sorter.Sorter] and provide one's own sorter.
SorterGidBuilder builder()Get builder for [gtk.sorter.Sorter] Returns: New builder objectvoid changed(gtk.types.SorterChange change)Notifies all users of the sorter that it has changed.gtk.types.Ordering compare(gobject.object.ObjectWrap item1, gobject.object.ObjectWrap item2)Compares two given items according to the sort order implemented by the sorter.gtk.types.SorterOrder getOrder()Gets the order that self conforms to.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtk.types.SorterChange)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.sorter.Sorter)))
&& Parameters!T.length < 3)Connect to `Changed` signal.