TreeSortableT

Description GtkTreeSortable is an interface to be implemented by tree models which support sorting. The GtkTreeView uses the methods provided by this interface to sort the model.

Members

Functions

addOnSortColumnChanged
void addOnSortColumnChanged(void delegate(TreeSortableIF) dlg, ConnectFlags connectFlags)

The ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed. The signal is emitted before the contents of sortable are resorted. See Also GtkTreeModel, GtkTreeView

getSortColumnId
int getSortColumnId(int sortColumnId, GtkSortType order)

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.

getTreeSortableTStruct
GtkTreeSortable* getTreeSortableTStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
hasDefaultSortFunc
int 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.

onSortColumnChangedListeners
void delegate(TreeSortableIF)[] onSortColumnChangedListeners()
Undocumented in source. Be warned that the author may not have intended to support it.
setDefaultSortFunc
void setDefaultSortFunc(GtkTreeIterCompareFunc sortFunc, void* userData, GDestroyNotify destroy)

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.

setSortColumnId
void setSortColumnId(int sortColumnId, GtkSortType order)

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

setSortFunc
void setSortFunc(int sortColumnId, GtkTreeIterCompareFunc sortFunc, void* userData, GDestroyNotify destroy)

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.

sortColumnChanged
void sortColumnChanged()

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

Static functions

callBackSortColumnChanged
void callBackSortColumnChanged(GtkTreeSortable* sortableStruct, TreeSortableIF _treeSortableIF)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_onSortColumnChangedListeners
void delegate(TreeSortableIF)[] _onSortColumnChangedListeners;
Undocumented in source.
connectedSignals
int[string] connectedSignals;
gtkTreeSortable
GtkTreeSortable* gtkTreeSortable;

the main Gtk struct

Meta