1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 The interface for sortable models used by GtkTreeView
7 <!-- ##### SECTION Long_Description ##### -->
12 <!-- ##### SECTION See_Also ##### -->
17 <!-- ##### STRUCT GtkTreeSortable ##### -->
23 <!-- ##### SIGNAL GtkTreeSortable::sort-column-changed ##### -->
28 @treesortable: the object which received the signal.
30 <!-- ##### STRUCT GtkTreeSortableIface ##### -->
40 @set_default_sort_func:
41 @has_default_sort_func:
43 <!-- ##### USER_FUNCTION GtkTreeIterCompareFunc ##### -->
45 A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
46 integer if @a sorts before @b, @a sorts with @b, or @a sorts after @b
47 respectively. If two iters compare as equal, their order in the sorted model
48 is undefined. In order to ensure that the #GtkTreeSortable behaves as
49 expected, the GtkTreeIterCompareFunc must define a partial order on
50 the model, i.e. it must be reflexive, antisymmetric and transitive.
53 For example, if @model is a product catalogue, then a compare function
54 for the "price" column could be one which returns
55 <literal>price_of(@a) - price_of(@b)</literal>.
58 @model: The #GtkTreeModel the comparison is within
59 @a: A #GtkTreeIter in @model
60 @b: Another #GtkTreeIter in @model
61 @user_data: Data passed when the compare func is assigned e.g. by
62 gtk_tree_sortable_set_sort_func()
64 <!-- ##### FUNCTION gtk_tree_sortable_sort_column_changed ##### -->
72 <!-- ##### FUNCTION gtk_tree_sortable_get_sort_column_id ##### -->
83 <!-- ##### FUNCTION gtk_tree_sortable_set_sort_column_id ##### -->
93 <!-- ##### FUNCTION gtk_tree_sortable_set_sort_func ##### -->
105 <!-- ##### FUNCTION gtk_tree_sortable_set_default_sort_func ##### -->
116 <!-- ##### FUNCTION gtk_tree_sortable_has_default_sort_func ##### -->