Class StringSorter

All Implemented Interfaces:
PointerInterface

public class StringSorter extends Sorter
`GtkStringSorter` is a `GtkSorter` 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
[class@Gtk.Expression].

https://docs.gtk.org/gtk4/class.StringSorter.html

  • Constructor Details

    • StringSorter

      public StringSorter(PointerContainer pointer)
    • StringSorter

      public StringSorter(@Nullable Expression expression)
      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.
      Parameters:
      expression - The expression to evaluate
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getExpression

      public Expression getExpression()
      Gets the expression that is evaluated to obtain strings from items.
      Returns:
      a `GtkExpression`
    • getIgnoreCase

      public boolean getIgnoreCase()
      Gets whether the sorter ignores case differences.
      Returns:
      %TRUE if @self is ignoring case differences
    • setExpression

      public void setExpression(@Nullable Expression expression)
      Sets the expression that is evaluated to obtain strings from items.

      The expression must have the type %G_TYPE_STRING.
      Parameters:
      expression - a `GtkExpression`
    • setIgnoreCase

      public void setIgnoreCase(boolean ignore_case)
      Sets whether the sorter will ignore case differences.
      Parameters:
      ignore_case - %TRUE to ignore case differences
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()