Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: StringSorter

[16:7] extends: object

Sorts items by comparing strings. To obtain the strings to compare, this sorter evaluates a [class@Gtk.Expression]. 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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • StringSorter (expression = null)

    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.
    • @p expression is The expression to evaluate.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asSorter ()

    Wraps this handle as Sorter.

    • @r A Sorter object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setCollation (string Value)

    The collation method to use for sorting. The GTK_COLLATION_NONE value is useful when the expression already returns collation keys, or strings that need to be compared byte-by-byte. The default value, GTK_COLLATION_UNICODE, compares strings according to the Unicode collation algorithm.

    • @p Value is the new property value.
    • @r None.
  • setExpression (object Value)

    The expression to evaluate on item to get a string to compare with.

    • @p Value is the new property value.
    • @r None.
  • setIgnorecase (bool Value)

    If sorting is case sensitive.

    • @p Value is the new property value.
    • @r None.
  • get_collation ()

    Gets which collation method the sorter uses.

  • get_expression ()

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

  • get_ignore_case ()

    Gets whether the sorter ignores case differences.

  • set_collation (string collation)

    Sets the collation method to use for sorting.

    • @p collation is the collation method.
    • @r None.
  • set_expression (object expression)

    Sets the expression that is evaluated to obtain strings from items. The expression must have the type %G_TYPE_STRING.

    • @p expression is a GtkExpression.
    • @r None.
  • set_ignore_case (bool ignore_case)

    Sets whether the sorter will ignore case differences.

    • @p ignore_case is %TRUE to ignore case differences.
    • @r None.

class: StringSorterMeta

[235:14] static extends: object

Generated metadata helpers for StringSorter class surfaces.

Methods

  • properties ()

    Returns property metadata for StringSorter.

    • @r A list.