Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: NumericSorter

[14:7] extends: object

Sorts items numerically. To obtain the numbers to compare, this sorter evaluates a [class@Gtk.Expression].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • NumericSorter (expression = null)

    Creates a new numeric sorter using the given @expression. Smaller numbers will be sorted first. You can call [method@Gtk.NumericSorter.set_sort_order] to change this.

    • @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.

  • setExpression (object Value)

    The expression to evaluate on items to get a number to compare with.

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

    Whether the sorter will sort smaller numbers first.

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

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

  • get_sort_order ()

    Gets whether this sorter will sort smaller numbers first.

  • set_expression (object expression)

    Sets the expression that is evaluated to obtain numbers from items. Unless an expression is set on @self, the sorter will always compare items as invalid. The expression must have a return type that can be compared numerically, such as %G_TYPE_INT or %G_TYPE_DOUBLE.

    • @p expression is a GtkExpression.
    • @r None.
  • set_sort_order (string sort_order)

    Sets whether to sort smaller numbers before larger ones.

    • @p sort_order is whether to sort smaller numbers first.
    • @r None.

class: NumericSorterMeta

[196:14] static extends: object

Generated metadata helpers for NumericSorter class surfaces.

Methods

  • properties ()

    Returns property metadata for NumericSorter.

    • @r A list.