StringFilter

open class StringFilter(val gtkStringFilterPointer: <Error class: unknown class><<Error class: unknown class>>) : Filter

GtkStringFilter determines whether to include items by comparing strings to a fixed search term.

The strings are obtained from the items by evaluating a GtkExpression set with method@Gtk.StringFilter.set_expression, and they are compared against a search term set with method@Gtk.StringFilter.set_search.

GtkStringFilter has several different modes of comparison - it can match the whole string, just a prefix, or any substring. Use method@Gtk.StringFilter.set_match_mode choose a mode.

It is also possible to make case-insensitive comparisons, with method@Gtk.StringFilter.set_ignore_case.

Constructors

Link copied to clipboard
constructor(expression: Expression? = null)

Creates a new string filter.

constructor(gtkStringFilterPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The expression to evaluate on item to get a string to compare with.

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

If matching is case sensitive.

Link copied to clipboard

If exact matches are necessary or if substrings are allowed.

Link copied to clipboard
open var search: String?

The search term.

Functions

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

Notifies all users of the filter that it has changed.

Link copied to clipboard

Emits the "changed" signal. See onChanged.

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.

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

Emitted whenever the filter changed.