Gtk.StringFilter¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.StringFilter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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].
- classmethod new(expression)[source]¶
- Parameters:
expression (
Gtk.Expression
orNone
) – The expression to evaluate- Returns:
a new
GtkStringFilter
- Return type:
Creates a new string filter.
You will want to set up the filter by providing a string to search for and by providing a property to look up on the item.
- get_expression()[source]¶
- Returns:
a
GtkExpression
- Return type:
Gets the expression that the string filter uses to obtain strings from items.
- get_match_mode()[source]¶
- Returns:
the match mode of the filter
- Return type:
Returns the match mode that the filter is using.
- set_expression(expression)[source]¶
- Parameters:
expression (
Gtk.Expression
orNone
) – aGtkExpression
Sets the expression that the string filter uses to obtain strings from items.
The expression must have a value type of
GObject.TYPE_STRING
.
- set_match_mode(mode)[source]¶
- Parameters:
mode (
Gtk.StringFilterMatchMode
) – the new match mode
Sets the match mode for the filter.
Property Details¶
- Gtk.StringFilter.props.expression¶
- Name:
expression
- Type:
- Default Value:
- Flags:
The expression to evaluate on item to get a string to compare with.
- Gtk.StringFilter.props.ignore_case¶
- Name:
ignore-case
- Type:
- Default Value:
- Flags:
If matching is case sensitive.
- Gtk.StringFilter.props.match_mode¶
- Name:
match-mode
- Type:
- Default Value:
- Flags:
If exact matches are necessary or if substrings are allowed.