StringSorter

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].

Constructors

this
this(GtkStringSorter* gtkStringSorter, bool ownedRef)

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

this
this(Expression expression)

Creates a new string sorter that compares items using the given @expression.

Members

Functions

getExpression
Expression getExpression()

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

getIgnoreCase
bool getIgnoreCase()

Gets whether the sorter ignores case differences.

getStringSorterStruct
GtkStringSorter* getStringSorterStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

setExpression
void setExpression(Expression expression)

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

setIgnoreCase
void setIgnoreCase(bool ignoreCase)

Sets whether the sorter will ignore case differences.

Static functions

getType
GType getType()

Variables

gtkStringSorter
GtkStringSorter* gtkStringSorter;

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