Gnome::Gtk4::StringSorter
Description
Gnome::Gtk4::StringSorter is a Gnome::Gtk4::Sorter that compares strings.
It does the comparison in a linguistically correct way using the current locale by normalizing Unicode strings and possibly case-folding them before performing the comparison.
To obtain the strings to compare, this sorter evaluates a Gnome::Gtk4::Expression.
Class initialization
new
:native-object
Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
new-stringsorter
Creates a new string sorter that compares items using the given $expression
.
Unless an expression is set on it, this sorter will always compare items as invalid.
method new-stringsorter ( N-Object() $expression --> Gnome::Gtk4::StringSorter \)
$expression; (transfer ownership: full) The expression to evaluate.
Methods
get-collation This function is not yet available
Gets which collation method the sorter uses.
method get-collation (--> GtkCollation )
Return value; The collation method.
get-expression
Gets the expression that is evaluated to obtain strings from items.
method get-expression (--> N-Object )
Return value; a Gnome::Gtk4::Expression.
get-ignore-case
Gets whether the sorter ignores case differences.
method get-ignore-case (--> Bool )
Return value; True
if $self
is ignoring case differences.
set-collation This function is not yet available
Sets the collation method to use for sorting.
method set-collation ( GtkCollation $collation )
$collation; the collation method.
set-expression
Sets the expression that is evaluated to obtain strings from items.
The expression must have the type G_TYPE_STRING
.
method set-expression ( N-Object() $expression )
$expression; a Gnome::Gtk4::Expression.
set-ignore-case
Sets whether the sorter will ignore case differences.
method set-ignore-case ( Bool() $ignore-case )
$ignore-case;
True
to ignore case differences.