gtk.tree_sortable

Module for [TreeSortable] interface

Types 2

interfaceTreeSortable

The interface for sortable models used by GtkTreeView

[gtk.tree_sortable.TreeSortable] is an interface to be implemented by tree models which support sorting. The [gtk.tree_view.TreeView] uses the methods provided by this interface to sort the model.

Deprecated

There is no replacement for this interface. You should

use [gtk.sort_list_model.SortListModel] to wrap your list model instead

Methods
bool getSortColumnId(out int sortColumnId, out gtk.types.SortType order)Fills in sortcolumnid and order with the current sort column and the order. It returns true unless the sortcolumnid is [gtk.types.TREESORTABLEDEFAULTSORTCOLUMNID] or [gtk.types.TREESORTABLEUNSORTED...
bool hasDefaultSortFunc()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. Returns: true, if the ...
void setDefaultSortFunc(gtk.types.TreeIterCompareFunc sortFunc)Sets the default comparison function used when sorting to be sortfunc. If the current sort column id of sortable is [gtk.types.TREESORTABLEDEFAULTSORTCOLUMNID], then the model will sort using this ...
void setSortColumnId(int sortColumnId, gtk.types.SortType order)Sets the current sort column to be sortcolumnid. The sortable will resort itself to reflect this change, after emitting a `GtkTreeSortable::sort-column-changed` signal. sortcolumnid may either be a...
void setSortFunc(int sortColumnId, gtk.types.TreeIterCompareFunc sortFunc)Sets the comparison function used when sorting to be sortfunc. If the current sort column id of sortable is the same as sortcolumn_id, then the model will sort using this function.
void sortColumnChanged()Emits a `GtkTreeSortable::sort-column-changed` signal on sortable.
gulong connectSortColumnChanged(T)(T callback, Flag!"After" after = No.After)Connect to `SortColumnChanged` signal.