Determines whether to include items by comparing strings to a fixed search term.
The strings are obtained from the items by evaluating an expression set with [methodGtk.StringFilter.set_expression], and they are compared against a search term set with [methodGtk.StringFilter.set_search].
GtkStringFilter has several different modes of comparison - it can match the whole string, just a prefix, or any substring. Use [methodGtk.StringFilter.set_match_mode] choose a mode.
It is also possible to make case-insensitive comparisons, with [methodGtk.StringFilter.set_ignore_case].
function Get_Expression
(Self : not null access Gtk_String_Filter_Record)
return Gtk.Expression.Gtk_Expression
Gets the expression that the string filter uses to obtain strings from items.
the expression. Has transfer-ownership='none'.
function Get_Ignore_Case
(Self : not null access Gtk_String_Filter_Record) return Boolean
Returns whether the filter ignores case differences.
true if the filter ignores case
function Get_Match_Mode
(Self : not null access Gtk_String_Filter_Record)
return Gtk_String_Filter_Match_Mode
Returns the match mode that the filter is using.
the match mode of the filter
function Get_Search
(Self : not null access Gtk_String_Filter_Record) return UTF8_String
Gets the search term.
the search term
function Get_Type return Glib.GType
procedure Gtk_New
(Self : out Gtk_String_Filter;
Expression : Gtk.Expression.Gtk_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. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the expression to evaluate. Has transfer-ownership='full'.
type Gtk_String_Filter is access all Gtk_String_Filter_Record'Class;
type Gtk_String_Filter_Match_Mode is (
String_Filter_Match_Mode_Exact,
String_Filter_Match_Mode_Substring,
String_Filter_Match_Mode_Prefix);
Specifies how search strings are matched inside text.
package Gtk_String_Filter_Match_Mode_Properties is
new Generic_Internal_Discrete_Property (Gtk_String_Filter_Match_Mode);
function Gtk_String_Filter_New
(Expression : Gtk.Expression.Gtk_Expression) return Gtk_String_Filter
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.
the expression to evaluate. Has transfer-ownership='full'.
type Gtk_String_Filter_Record is new Gtk_Filter_Record with null record;
Ignore_Case_Property : constant Glib.Properties.Property_Boolean;
If matching is case sensitive.
procedure Initialize
(Self : not null access Gtk_String_Filter_Record'Class;
Expression : Gtk.Expression.Gtk_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. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the expression to evaluate. Has transfer-ownership='full'.
Match_Mode_Property : constant Gtk.String_Filter.Property_Gtk_String_Filter_Match_Mode;
Type: Gtk_String_Filter_Match_Mode If exact matches are necessary or if substrings are allowed.
type Property_Gtk_String_Filter_Match_Mode is new Gtk_String_Filter_Match_Mode_Properties.Property;
Search_Property : constant Glib.Properties.Property_String;
The search term.
procedure Set_Expression
(Self : not null access Gtk_String_Filter_Record;
Expression : Gtk.Expression.Gtk_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.
the expression
procedure Set_Ignore_Case
(Self : not null access Gtk_String_Filter_Record;
Ignore_Case : Boolean)
Sets whether the filter ignores case differences.
true to ignore case
procedure Set_Match_Mode
(Self : not null access Gtk_String_Filter_Record;
Mode : Gtk_String_Filter_Match_Mode)
Sets the match mode for the filter.
the new match mode
procedure Set_Search
(Self : not null access Gtk_String_Filter_Record;
Search : UTF8_String := "")
Sets the string to search for.
the string to search for