Sorts items numerically.
To obtain the numbers to compare, this sorter evaluates a [classGtk.Expression].
function Get_Expression
(Self : not null access Gtk_Numeric_Sorter_Record)
return Gtk.Expression.Gtk_Expression
Gets the expression that is evaluated to obtain numbers from items.
a GtkExpression. Has transfer-ownership='none'.
function Get_Sort_Order
(Self : not null access Gtk_Numeric_Sorter_Record)
return Gtk.Enums.Gtk_Sort_Type
Gets whether this sorter will sort smaller numbers first.
the order of the numbers
function Get_Type return Glib.GType
procedure Gtk_New
(Self : out Gtk_Numeric_Sorter;
Expression : Gtk.Expression.Gtk_Expression)
Creates a new numeric sorter using the given Expression. Smaller numbers will be sorted first. You can call [methodGtk.NumericSorter.set_sort_order] to change this. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
The expression to evaluate. Has transfer-ownership='full'.
type Gtk_Numeric_Sorter is access all Gtk_Numeric_Sorter_Record'Class;
function Gtk_Numeric_Sorter_New
(Expression : Gtk.Expression.Gtk_Expression) return Gtk_Numeric_Sorter
Creates a new numeric sorter using the given Expression. Smaller numbers will be sorted first. You can call [methodGtk.NumericSorter.set_sort_order] to change this.
The expression to evaluate. Has transfer-ownership='full'.
type Gtk_Numeric_Sorter_Record is new Gtk_Sorter_Record with null record;
procedure Initialize
(Self : not null access Gtk_Numeric_Sorter_Record'Class;
Expression : Gtk.Expression.Gtk_Expression)
Creates a new numeric sorter using the given Expression. Smaller numbers will be sorted first. You can call [methodGtk.NumericSorter.set_sort_order] to change this. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
The expression to evaluate. Has transfer-ownership='full'.
procedure Set_Expression
(Self : not null access Gtk_Numeric_Sorter_Record;
Expression : Gtk.Expression.Gtk_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.
a GtkExpression
procedure Set_Sort_Order
(Self : not null access Gtk_Numeric_Sorter_Record;
Sort_Order : Gtk.Enums.Gtk_Sort_Type)
Sets whether to sort smaller numbers before larger ones.
whether to sort smaller numbers first
Sort_Order_Property : constant Gtk.Enums.Property_Gtk_Sort_Type;
Whether the sorter will sort smaller numbers first.