gtk.string_filter
Module for [StringFilter] class
Types 3
classStringFilter : gtk.filter.Filter
[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
StringFilter self()Returns `this`, for use in `with` statements.StringFilterGidBuilder builder()Get builder for [gtk.string_filter.StringFilter] Returns: New builder objectgtk.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.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.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 casegtk.types.StringFilterMatchMode getMatchMode()Returns the match mode that the filter is using. Returns: the match mode of the filterstring getSearch()Gets the search term. Returns: The search termvoid 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(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 chainingT ignoreCase(bool propval)Set `ignoreCase` property. Params: propval = If matching is case sensitive. Returns: Builder instance for fluent chainingT 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 chainingT search(string propval)Set `search` property. Params: propval = The search term. Returns: Builder instance for fluent chainingFluent builder for [gtk.string_filter.StringFilter]
Methods