11.135Class GtkTreeSortable

The interface for sortable models used by GtkTreeView

Class GtkTreeSortable

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.

Methods
get_sort_column_idReturns the sort column id and order with the current sort column and the order.
has_default_sort_funcReturns TRUE if the model has a default sort function.
set_sort_column_idSets the current sort column to be sort_column_id.
signal_sort_column_changedThe ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed.
sort_column_changedEmits a "sort-column-changed" signal on sortable.

Methods

get_sort_column_id

Returns the sort column id and order with the current sort column and the order.

GtkTreeSortable.get_sort_column_id()
Returnan array ( sort column id, GtkSortType ).

If the sort column ID is not set, then (-2, 0) is returned. If the sort column ID is set to -1 indicating the default sort function is to be used this method returns (-1, 0).

has_default_sort_func

Returns TRUE if the model has a default sort function.

GtkTreeSortable.has_default_sort_func()
ReturnTRUE, 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.

set_sort_column_id

Sets the current sort column to be sort_column_id.

GtkTreeSortable.set_sort_column_id( sort_column_id, order )
sort_column_id the sort column id to set
order The sort order of the column (GtkSortType)

The sortable will resort itself to reflect this change, after emitting a "sort-column-changed" signal. sortable 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

signal_sort_column_changed

The ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed.

GtkTreeSortable.signal_sort_column_changed()

The signal is emitted before the contents of sortable are resorted.

sort_column_changed

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

GtkTreeSortable.sort_column_changed()
Made with http://www.falconpl.org