1.127 <GtkMultiSorter>

Class: <GtkMultiSorter>

It derives from <GtkSorter>.

Combines multiple sorters by trying them in turn.

If the first sorter compares two items as equal, the second is tried next, and so on.

Properties

Property: multi-sorter:item-type self

The type of items. See list-model:get-item-type.

Its value is a class, or a GType number.

It is read only.

Property: multi-sorter:n-items self

The number of items. See list-model:get-n-items.

Its value is an unsigned 32-bit integer.

It is read only.

Procedures

Method: multi-sorter:append self sorter
Method: append self sorter

Add sorter to self to use for sorting at the end.

self will consult all existing sorters before it will sort with the given sorter.

self

Passed: a <GtkMultiSorter>.

a <GtkMultiSorter>

sorter

Passed: a <GtkSorter>.

a sorter to add

Procedure: multi-sorter:new ⇒ %return

Creates a new multi sorter.

This sorter compares items by trying each of the sorters in turn, until one returns non-zero. In particular, if no sorter has been added to it, it will always compare items as equal.

%return

Returned: a <GtkMultiSorter>.

a new <GtkMultiSorter>

Method: multi-sorter:remove self position
Method: remove self position

Removes the sorter at the given position from the list of sorter used by self.

If position is larger than the number of sorters, nothing happens.

self

Passed: a <GtkMultiSorter>.

a <GtkMultiSorter>

position

Passed: an unsigned 32-bit integer.

position of sorter to remove