insert_sorted


Description:

[ Version ( since = "2.44" ) ]
public uint insert_sorted (Object item, CompareDataFunc<Object> compare_func)

Inserts item into this at a position to be determined by the compare_func.

The list must already be sorted before calling this function or the result is undefined. Usually you would approach this by only ever inserting items by way of this function.

This function takes a ref on item.

Parameters:

this

a ListStore

item

the new item

compare_func

pairwise comparison function for sorting

user_data

user data for compare_func

Returns:

the position at which item was inserted