Commit 17c26dbb authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Document GtkTreeIterCompareFunc (#154943)



2004-10-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtktreesortable.sgml: Document GtkTreeIterCompareFunc
	(#154943)
parent 5a44b7ca
2004-10-11 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtktreesortable.sgml: Document GtkTreeIterCompareFunc
(#154943)
2004-10-10 Matthias Clasen <matthias@localhost.localdomain>
* gtk/images/progressbar.png:
......
......@@ -42,15 +42,24 @@ The interface for sortable models used by GtkTreeView
<!-- ##### USER_FUNCTION GtkTreeIterCompareFunc ##### -->
<para>
A GtkTreeIterCompareFunc should return a negative integer, zero, or a positive
integer if @a sorts before @b, @a sorts with @b, or @a sorts after @b
respectively. If two iters compare as equal, their order in the sorted model
is undefined. In order to ensure that the #GtkTreeSortable behaves as
expected, the GtkTreeIterCompareFunc must define a partial order on
the model, i.e. it must be reflexive, antisymmetric and transitive.
</para>
<para>
For example, if @model is a product catalogue, then a compare function
for the "price" column could be one which returns
<literal>price_of(@a) - price_of(@b)</literal>.
</para>
@model:
@a:
@b:
@user_data:
@Returns:
@model: The #GtkTreeModel the comparison is within
@a: A #GtkTreeIter in @model
@b: Another #GtkTreeIter in @model
@user_data: Data passed when the compare func is assigned e.g. by
gtk_tree_sortable_set_sort_func()
<!-- ##### FUNCTION gtk_tree_sortable_sort_column_changed ##### -->
<para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment