W Wrapl, The Programming Language

Libraries:Gtk:Gtk:TreeSortable

Types

T

T is an interface to be implemented by tree models which support sorting. The Gtk.Gtk.TreeView.T uses the methods provided by this interface to sort the model.



ParentT

Constants

InterfaceInfo : Std.Object.T

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



Methods

:GetSortColumnId(self @ T, sort_column_id @ Std.Object.T, order @ Std.Object.T) : Std.Symbol.T

Fills in sort_column_id and order with the current sort column and the order. It returns TRUE unless the sort_column_id is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.

sortable A T
sort_column_id The sort column id to be filled in
order The Gtk.Gtk.SortType.T to be filled in
Returns TRUE if the sort column is not one of the special sort column ids.


:GetSortColumnId(_ @ ParentT, _ @ Std.Object.T, _ @ Std.Object.T)

:HasDefaultSortFunc(self @ T) : Std.Symbol.T

Returns TRUE if the model has a default sort function. This is used primarily by GtkTreeViewColumns in order to determine if a model can go back to the default state, or not.

sortable A T
Returns TRUE, if the model has a default sort function


:HasDefaultSortFunc(_ @ ParentT)

:SetDefaultSortFunc(self @ T, sort_func @ Std.Function.T, user_data, destroy @ Std.Function.T) : Std.Object.T

Sets the default comparison function used when sorting to be sort_func. If the current sort column id of sortable is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this function.

If sort_func is NULL, then there will be no default comparison function. This means that once the model has been sorted, it can't go back to the default state. In this case, when the current sort column id of sortable is GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.

sortable A T
sort_func The comparison function
user_data User data to pass to sort_func, or NULL. [allow-none]
destroy Destroy notifier of user_data, or NULL. [allow-none]


:SetDefaultSortFunc(_ @ ParentT, _ @ Std.Function.T, _ @ Std.Address.T, _ @ Std.Function.T)

:SetSortColumnId(self @ T, sort_column_id @ Std.Integer.SmallT, order @ Gtk.Gtk.SortType.T) : Std.Object.T

Sets the current sort column to be sort_column_id. The sortable will resort itself to reflect this change, after emitting a "sort-column-changed" signal. sort_column_id may either be a regular column id, or one of the following special values:

GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID the default sort function will be used, if it is set
GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID no sorting will occur


:SetSortColumnId(_ @ ParentT, _ @ Std.Integer.SmallT, _ @ Gtk.Gtk.SortType.T)

:SetSortFunc(self @ T, sort_column_id @ Std.Integer.SmallT, sort_func @ Std.Function.T, user_data, destroy @ Std.Function.T) : Std.Object.T

Sets the comparison function used when sorting to be sort_func. If the current sort column id of sortable is the same as sort_column_id, then the model will sort using this function.

sortable A T
sort_column_id the sort column id to set the function for
sort_func The comparison function
user_data User data to pass to sort_func, or NULL. [allow-none]
destroy Destroy notifier of user_data, or NULL. [allow-none]


:SetSortFunc(_ @ ParentT, _ @ Std.Integer.SmallT, _ @ Std.Function.T, _ @ Std.Address.T, _ @ Std.Function.T)

:SortColumnChanged(self @ T) : Std.Object.T

Emits a "sort-column-changed" signal on sortable.

sortable A T


:SortColumnChanged(_ @ ParentT)