Package ch.bailu.gtk.gtk
Schnittstelle TreeSortable.OnTreeIterCompareFunc
- Umschließende Klasse:
TreeSortable
- Funktionsschnittstelle:
- Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
onTreeIterCompareFunc
(CallbackHandler __self, TreeModel model, TreeIter a, TreeIter b, Pointer user_data) 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.
-
Methodendetails
-
onTreeIterCompareFunc
int onTreeIterCompareFunc(CallbackHandler __self, @Nonnull TreeModel model, @Nonnull TreeIter a, @Nonnull TreeIter b, @Nullable Pointer user_data) 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.
For example, if @model is a product catalogue, then a compare function
for the “price” column could be one which returns
`price_of(@a) - price_of(@b)`.- Parameter:
model
- The `GtkTreeModel` the comparison is withina
- A `GtkTreeIter` in @modelb
- Another `GtkTreeIter` in @modeluser_data
- Data passed when the compare func is assigned e.g. by gtk_tree_sortable_set_sort_func()- Gibt zurück:
- a negative integer, zero or a positive integer depending on whether @a sorts before, with or after @b
-