gtk.string_filter

Module for [StringFilter] class

Types 3

[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].

Methods
GType _gType() @property
StringFilter self()Returns `this`, for use in `with` statements.
StringFilterGidBuilder builder()Get builder for [gtk.string_filter.StringFilter] Returns: New builder object
gtk.expression.Expression expression() @propertyGet `expression` property. Returns: The expression to evaluate on item to get a string to compare with.
void expression(gtk.expression.Expression propval) @propertySet `expression` property. Params: propval = The expression to evaluate on item to get a string to compare with.
bool ignoreCase() @propertyGet `ignoreCase` property. Returns: If matching is case sensitive.
void ignoreCase(bool propval) @propertySet `ignoreCase` property. Params: propval = If matching is case sensitive.
gtk.types.StringFilterMatchMode matchMode() @propertyGet `matchMode` property. Returns: If exact matches are necessary or if substrings are allowed.
void matchMode(gtk.types.StringFilterMatchMode propval) @propertySet `matchMode` property. Params: propval = If exact matches are necessary or if substrings are allowed.
string search() @propertyGet `search` property. Returns: The search term.
void search(string propval) @propertySet `search` property. Params: propval = The search term.
gtk.expression.Expression getExpression()Gets the expression that the string filter uses to obtain strings from items. Returns: a [gtk.expression.Expression]
bool getIgnoreCase()Returns whether the filter ignores case differences. Returns: true if the filter ignores case
gtk.types.StringFilterMatchMode getMatchMode()Returns the match mode that the filter is using. Returns: the match mode of the filter
string getSearch()Gets the search term. Returns: The search term
void setExpression(gtk.expression.Expression expression = null)Sets the expression that the string filter uses to obtain strings from items.
void setIgnoreCase(bool ignoreCase)Sets whether the filter ignores case differences.
void setMatchMode(gtk.types.StringFilterMatchMode mode)Sets the match mode for the filter.
void setSearch(string search = null)Sets the string to search for.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.expression.Expression expression = null)Creates a new string filter.
Methods
T expression(gtk.expression.Expression propval)Set `expression` property. Params: propval = The expression to evaluate on item to get a string to compare with. Returns: Builder instance for fluent chaining
T ignoreCase(bool propval)Set `ignoreCase` property. Params: propval = If matching is case sensitive. Returns: Builder instance for fluent chaining
T matchMode(gtk.types.StringFilterMatchMode propval)Set `matchMode` property. Params: propval = If exact matches are necessary or if substrings are allowed. Returns: Builder instance for fluent chaining
T search(string propval)Set `search` property. Params: propval = The search term. Returns: Builder instance for fluent chaining

Fluent builder for [gtk.string_filter.StringFilter]