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 _getGType() static nothrow
GType _gType() @property nothrow
StringFilter self() nothrowReturns `this`, for use in `with` statements.
StringFilterGidBuilder builder() static nothrowGet builder for [gtk.string_filter.StringFilter] Returns: New builder object
gtk.expression.Expression expression() @property nothrowGet `expression` property. Returns: The expression to evaluate on item to get a string to compare with.
void expression(gtk.expression.Expression propval) @property nothrowSet `expression` property. Params: propval = The expression to evaluate on item to get a string to compare with.
bool ignoreCase() @property nothrowGet `ignoreCase` property. Returns: If matching is case sensitive.
void ignoreCase(bool propval) @property nothrowSet `ignoreCase` property. Params: propval = If matching is case sensitive.
gtk.types.StringFilterMatchMode matchMode() @property nothrowGet `matchMode` property. Returns: If exact matches are necessary or if substrings are allowed.
void matchMode(gtk.types.StringFilterMatchMode propval) @property nothrowSet `matchMode` property. Params: propval = If exact matches are necessary or if substrings are allowed.
string search() @property nothrowGet `search` property. Returns: The search term.
void search(string propval) @property nothrowSet `search` property. Params: propval = The search term.
gtk.expression.Expression getExpression() nothrowGets the expression that the string filter uses to obtain strings from items. Returns: a [gtk.expression.Expression]
bool getIgnoreCase() nothrowReturns whether the filter ignores case differences. Returns: true if the filter ignores case
gtk.types.StringFilterMatchMode getMatchMode() nothrowReturns the match mode that the filter is using. Returns: the match mode of the filter
string getSearch() nothrowGets the search term. Returns: The search term
void setExpression(gtk.expression.Expression expression = null) nothrowSets the expression that the string filter uses to obtain strings from items.
void setIgnoreCase(bool ignoreCase) nothrowSets whether the filter ignores case differences.
void setMatchMode(gtk.types.StringFilterMatchMode mode) nothrowSets the match mode for the filter.
void setSearch(string search = null) nothrowSets the string to search for.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.expression.Expression expression = null)Creates a new string filter.

Fluent builder implementation template for gtk.string_filter.StringFilter

Methods
T expression(gtk.expression.Expression propval) nothrowSet `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) nothrowSet `ignoreCase` property. Params: propval = If matching is case sensitive. Returns: Builder instance for fluent chaining
T matchMode(gtk.types.StringFilterMatchMode propval) nothrowSet `matchMode` property. Params: propval = If exact matches are necessary or if substrings are allowed. Returns: Builder instance for fluent chaining
T search(string propval) nothrowSet `search` property. Params: propval = The search term. Returns: Builder instance for fluent chaining
Methods
StringFilter build() nothrowCreate object from builder. Returns: New object