Top |
Functions
GtkStringFilter * | gtk_string_filter_new () |
const char * | gtk_string_filter_get_search () |
void | gtk_string_filter_set_search () |
GtkExpression * | gtk_string_filter_get_expression () |
void | gtk_string_filter_set_expression () |
gboolean | gtk_string_filter_get_ignore_case () |
void | gtk_string_filter_set_ignore_case () |
GtkStringFilterMatchMode | gtk_string_filter_get_match_mode () |
void | gtk_string_filter_set_match_mode () |
Properties
GtkExpression * | expression | Read / Write |
gboolean | ignore-case | Read / Write |
GtkStringFilterMatchMode | match-mode | Read / Write |
char * | search | Read / Write |
Description
GtkStringFilter determines whether to include items by looking at strings and comparing them to a fixed search term. The strings are obtained from the items by evaluating a GtkExpression.
GtkStringFilter has several different modes of comparison - it can match the whole string, just a prefix, or any substring.
Functions
gtk_string_filter_new ()
GtkStringFilter *
gtk_string_filter_new (GtkExpression *expression
);
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.
gtk_string_filter_get_search ()
const char *
gtk_string_filter_get_search (GtkStringFilter *self
);
Gets the search string set via gtk_string_filter_set_search()
.
gtk_string_filter_set_search ()
void gtk_string_filter_set_search (GtkStringFilter *self
,const char *search
);
Sets the string to search for.
gtk_string_filter_get_expression ()
GtkExpression *
gtk_string_filter_get_expression (GtkStringFilter *self
);
Gets the expression that the string filter uses to obtain strings from items.
gtk_string_filter_set_expression ()
void gtk_string_filter_set_expression (GtkStringFilter *self
,GtkExpression *expression
);
Sets the expression that the string filter uses to obtain strings from items. The expression must have a value type of G_TYPE_STRING.
gtk_string_filter_get_ignore_case ()
gboolean
gtk_string_filter_get_ignore_case (GtkStringFilter *self
);
Returns whether the filter ignores case differences.
gtk_string_filter_set_ignore_case ()
void gtk_string_filter_set_ignore_case (GtkStringFilter *self
,gboolean ignore_case
);
Sets whether the filter ignores case differences.
gtk_string_filter_get_match_mode ()
GtkStringFilterMatchMode
gtk_string_filter_get_match_mode (GtkStringFilter *self
);
Returns the match mode that the filter is using.
gtk_string_filter_set_match_mode ()
void gtk_string_filter_set_match_mode (GtkStringFilter *self
,GtkStringFilterMatchMode mode
);
Sets the match mode for the filter.
Types and Values
Property Details
The “expression”
property
“expression” GtkExpression *
The expression to evaluate on item to get a string to compare with
[type GtkExpression]
Owner: GtkStringFilter
Flags: Read / Write
The “ignore-case”
property
“ignore-case” gboolean
If matching is case sensitive
Owner: GtkStringFilter
Flags: Read / Write
Default value: TRUE
The “match-mode”
property
“match-mode” GtkStringFilterMatchMode
If exact matches are necessary or if substrings are allowed
Owner: GtkStringFilter
Flags: Read / Write
Default value: GTK_STRING_FILTER_MATCH_MODE_SUBSTRING