About all my projects
Gnome::Gtk4::MultiSorter

Gnome::Gtk4::MultiSorter

Description

Gnome::Gtk4::MultiSorter 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.

Uml Diagram

No caption

Class initialization

new

:native-object

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )

new-multisorter

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.

method new-multisorter ( --> Gnome::Gtk4::MultiSorter )

Methods

append

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.

method append ( N-Object() $sorter )
  • $sorter; (transfer ownership: full) a sorter to add.

remove

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.

method remove ( UInt() $position )
  • $position; position of sorter to remove.