Filter

open class Filter(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GtkFilter object describes the filtering to be performed by a class@Gtk.FilterListModel.

The model will use the filter to determine if it should include items or not by calling method@Gtk.Filter.match for each item and only keeping the ones that the function returns true for.

Filters may change what items they match through their lifetime. In that case, they will emit the signal@Gtk.Filter::changed signal to notify that previous filter results are no longer valid and that items should be checked again via method@Gtk.Filter.match.

GTK provides various pre-made filter implementations for common filtering operations. These filters often include properties that can be linked to various widgets to easily allow searches.

However, in particular for large lists or complex search methods, it is also possible to subclass GtkFilter and provide one's own filter.

Inheritors

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkFilterPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun changed(change: FilterChange)

Notifies all users of the filter that it has changed.

Link copied to clipboard
fun connectChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (change: FilterChange) -> Unit): <Error class: unknown class>

Emitted whenever the filter changed.

Link copied to clipboard

Gets the known strictness of @filters.

Link copied to clipboard
open fun match(item: <Error class: unknown class>): Boolean

Checks if the given @item is matched by the filter or not.