StringFilter

open class StringFilter(pointer: <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(pointer: <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
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 expression that the string filter uses to obtain strings from items.

Link copied to clipboard

Returns whether the filter ignores case differences.

Link copied to clipboard

Returns the match mode that the filter is using.

Link copied to clipboard
open fun getSearch(): String?

Gets the search term.

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
open fun setExpression(expression: Expression? = null)

Sets the expression that the string filter uses to obtain strings from items.

Link copied to clipboard
open fun setIgnoreCase(ignoreCase: Boolean)

Sets whether the filter ignores case differences.

Link copied to clipboard

Sets the match mode for the filter.

Link copied to clipboard
open fun setSearch(search: String? = null)

Sets the string to search for.