Gtk.CustomSorter¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.CustomSorter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkCustomSorter
is aGtkSorter
implementation that sorts via a callback function.- classmethod new(sort_func, *user_data)[source]¶
- Parameters:
sort_func (
GLib.CompareDataFunc
orNone
) – theGCompareDataFunc
to use for sorting
- Returns:
a new
GtkCustomSorter
- Return type:
Creates a new
GtkSorter
that works by calling sort_func to compare items.If sort_func is
None
, all items are considered equal.
- set_sort_func(sort_func, *user_data)[source]¶
- Parameters:
sort_func (
GLib.CompareDataFunc
orNone
) – function to sort itemsuser_data (
object
orNone
) – user data to pass to match_func
Sets (or unsets) the function used for sorting items.
If sort_func is
None
, all items are considered equal.If the sort func changes its sorting behavior,
Gtk.Sorter.changed
() needs to be called.If a previous function was set, its user_destroy will be called now.