NumericSorter

GtkNumericSorter is a GtkSorter that compares numbers.

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

Constructors

this
this(GtkNumericSorter* gtkNumericSorter, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Expression expression)

Creates a new numeric sorter using the given @expression.

Members

Functions

getExpression
Expression getExpression()

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

getNumericSorterStruct
GtkNumericSorter* getNumericSorterStruct(bool transferOwnership)

Get the main Gtk struct

getSortOrder
GtkSortType getSortOrder()

Gets whether this sorter will sort smaller numbers first.

getStruct
void* getStruct()

the main Gtk struct as a void*

setExpression
void setExpression(Expression expression)

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

setSortOrder
void setSortOrder(GtkSortType sortOrder)

Sets whether to sort smaller numbers before larger ones.

Static functions

getType
GType getType()

Variables

gtkNumericSorter
GtkNumericSorter* gtkNumericSorter;

the main Gtk struct

Inherited Members

From Sorter

gtkSorter
GtkSorter* gtkSorter;

the main Gtk struct

getSorterStruct
GtkSorter* getSorterStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
changed
void changed(GtkSorterChange change)

Emits the [signal@Gtk.Sorter::changed] signal to notify all users of the sorter that it has changed.

compare
GtkOrdering compare(ObjectG item1, ObjectG item2)

Compares two given items according to the sort order implemented by the sorter.

getOrder
GtkSorterOrder getOrder()

Gets the order that @self conforms to.

addOnChanged
gulong addOnChanged(void delegate(GtkSorterChange, Sorter) dlg, ConnectFlags connectFlags)

Emitted whenever the sorter changed.

Meta