StringFilterProtocol
public protocol StringFilterProtocol : FilterProtocol
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 [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
].
The StringFilterProtocol
protocol exposes the methods and properties of an underlying GtkStringFilter
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see StringFilter
.
Alternatively, use StringFilterRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkStringFilter
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
string_filter_ptr
Default implementationTyped pointer to the underlying
GtkStringFilter
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStringFilter
instance.Declaration
Swift
var string_filter_ptr: UnsafeMutablePointer<GtkStringFilter>! { get }
-
Required Initialiser for types conforming to
StringFilterProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
StringFilterPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: StringFilterPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a StringFilter property
Declaration
Swift
@inlinable func get(property: StringFilterPropertyName) -> GLibObject.Value
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
set(property:
Extension methodvalue: ) Set the value of a StringFilter property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: StringFilterPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
getExpression()
Extension methodGets the expression that the string filter uses to obtain strings from items.
Declaration
Swift
@inlinable func getExpression() -> ExpressionRef!
-
getIgnoreCase()
Extension methodReturns whether the filter ignores case differences.
Declaration
Swift
@inlinable func getIgnoreCase() -> Bool
-
getMatchMode()
Extension methodReturns the match mode that the filter is using.
Declaration
Swift
@inlinable func getMatchMode() -> GtkStringFilterMatchMode
-
getSearch()
Extension methodGets the search term.
Declaration
Swift
@inlinable func getSearch() -> String!
-
set(expression:
Extension method) Sets the expression that the string filter uses to obtain strings from items.
The expression must have a value type of
G_TYPE_STRING
.Declaration
Swift
@inlinable func set(expression: ExpressionRef? = nil)
-
set(expression:
Extension method) Sets the expression that the string filter uses to obtain strings from items.
The expression must have a value type of
G_TYPE_STRING
.Declaration
Swift
@inlinable func set<ExpressionT>(expression: ExpressionT?) where ExpressionT : ExpressionProtocol
-
set(ignoreCase:
Extension method) Sets whether the filter ignores case differences.
Declaration
Swift
@inlinable func set(ignoreCase: Bool)
-
setMatch(mode:
Extension method) Sets the match mode for the filter.
Declaration
Swift
@inlinable func setMatch(mode: GtkStringFilterMatchMode)
-
set(search:
Extension method) Sets the string to search for.
Declaration
Swift
@inlinable func set(search: UnsafePointer<CChar>? = nil)
-
expression
Extension methodThe expression to evaluate on item to get a string to compare with.
Declaration
Swift
@inlinable var expression: ExpressionRef! { get nonmutating set }
-
ignoreCase
Extension methodReturns whether the filter ignores case differences.
Declaration
Swift
@inlinable var ignoreCase: Bool { get nonmutating set }
-
matchMode
Extension methodReturns the match mode that the filter is using.
Declaration
Swift
@inlinable var matchMode: GtkStringFilterMatchMode { get nonmutating set }
-
search
Extension methodThe search term.
Declaration
Swift
@inlinable var search: String! { get nonmutating set }