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
GtkStringFilterinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
string_filter_ptrDefault implementationTyped pointer to the underlying
GtkStringFilterinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStringFilterinstance.Declaration
Swift
var string_filter_ptr: UnsafeMutablePointer<GtkStringFilter>! { get } -
Required Initialiser for types conforming to
StringFilterProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
StringFilterPropertyNamesource 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 : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a StringFilter property
Declaration
Swift
@inlinable func get(property: StringFilterPropertyName) -> GLibObject.ValueParameters
propertythe 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
propertythe 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) -
expressionExtension methodThe expression to evaluate on item to get a string to compare with.
Declaration
Swift
@inlinable var expression: ExpressionRef! { get nonmutating set } -
ignoreCaseExtension methodReturns whether the filter ignores case differences.
Declaration
Swift
@inlinable var ignoreCase: Bool { get nonmutating set } -
matchModeExtension methodReturns the match mode that the filter is using.
Declaration
Swift
@inlinable var matchMode: GtkStringFilterMatchMode { get nonmutating set } -
searchExtension methodThe search term.
Declaration
Swift
@inlinable var search: String! { get nonmutating set }
View on GitHub
Install in Dash
StringFilterProtocol Protocol Reference