Gtk.CustomSorter

g GObject.Object GObject.Object Gtk.Sorter Gtk.Sorter GObject.Object->Gtk.Sorter Gtk.CustomSorter Gtk.CustomSorter Gtk.Sorter->Gtk.CustomSorter

Subclasses:

None

Methods

Inherited:

Gtk.Sorter (3), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (sort_func, *user_data)

set_sort_func (sort_func, *user_data)

Virtual Methods

Inherited:

Gtk.Sorter (2), GObject.Object (7)

Properties

None

Signals

Inherited:

Gtk.Sorter (1), GObject.Object (1)

Fields

Inherited:

Gtk.Sorter (1), GObject.Object (1)

Class Details

class Gtk.CustomSorter(**kwargs)
Bases:

Gtk.Sorter

Abstract:

No

Structure:

Gtk.CustomSorterClass

GtkCustomSorter is a GtkSorter implementation that sorts via a callback function.

classmethod new(sort_func, *user_data)[source]
Parameters:
Returns:

a new GtkCustomSorter

Return type:

Gtk.CustomSorter

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:

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.