About my projects, examples and tutorials
Gnome::Gtk4::StringSorter

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.

Uml Diagram§

UNKNOWN image§

=for image :class<inline> :src<asset_files/images/plantuml/StringSorter.png> :width<70\%>

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! )
Code

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 )
Code
  • $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  )
Code

Return value; The collation method.

get-expression§

Gets the expression that is evaluated to obtain strings from items.

method get-expression (--> N-Object )
Code

Return value; a Gnome::Gtk4::Expression.

get-ignore-case§

Gets whether the sorter ignores case differences.

method get-ignore-case (--> Bool )
Code

Return value; True if $self is ignoring case differences.

set-collation§

Sets the collation method to use for sorting.

method set-collation ( GtkCollation  $collation )
Code
  • $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 )
Code

set-ignore-case§

Sets whether the sorter will ignore case differences.

method set-ignore-case ( Bool() $ignore-case )
Code
  • $ignore-case; True to ignore case differences.