Package: gtk
Callback gtk-tree-iter-compare-func
Details A gtk-tree-iter-compare-func callback function should return a negative integer, zero, or a positive integer if iter1 sorts before iter2, iter1 sorts with iter2, or iter1 sorts after iter2 respectively.
If two iterators compare as equal, their order in the sorted model is undefined. In order to ensure that the gtk-tree-sortable object behaves as expected, the gtk-tree-iter-compare-func callback function
must define a partial order on the model, i.e. it must be reflexive,
antisymmetric and transitive. For example, if the model is a product catalogue, then a compare function for the "price" column could be one which returns price-of(a) - price-of(b). lambda (model iter1 iter2)
| See also |
2021-3-5