StringFilter

gtk.string_filter.StringFilter determines whether to include items by comparing strings to a fixed search term.

The strings are obtained from the items by evaluating a gtk.expression.Expression set with gtk.string_filter.StringFilter.setExpression, and they are compared against a search term set with gtk.string_filter.StringFilter.setSearch.

gtk.string_filter.StringFilter has several different modes of comparison - it can match the whole string, just a prefix, or any substring. Use gtk.string_filter.StringFilter.setMatchMode choose a mode.

It is also possible to make case-insensitive comparisons, with gtk.string_filter.StringFilter.setIgnoreCase.

Constructors

this
this(gtk.expression.Expression expression)

Creates a new string filter.

Members

Functions

getExpression
gtk.expression.Expression getExpression()

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

getIgnoreCase
bool getIgnoreCase()

Returns whether the filter ignores case differences.

getMatchMode
gtk.types.StringFilterMatchMode getMatchMode()

Returns the match mode that the filter is using.

getSearch
string getSearch()

Gets the search term.

setExpression
void setExpression(gtk.expression.Expression expression)

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

setIgnoreCase
void setIgnoreCase(bool ignoreCase)

Sets whether the filter ignores case differences.

setMatchMode
void setMatchMode(gtk.types.StringFilterMatchMode mode)

Sets the match mode for the filter.

setSearch
void setSearch(string search)

Sets the string to search for.

Inherited Members

From Filter

changed
void changed(gtk.types.FilterChange change)

Notifies all users of the filter that it has changed.

getStrictness
gtk.types.FilterMatch getStrictness()

Gets the known strictness of filters.

match
bool match(gobject.object.ObjectG item)

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

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.