EntryCompletionProtocol
public protocol EntryCompletionProtocol : ObjectProtocol, BuildableProtocol, CellLayoutProtocol
GtkEntryCompletion
is an auxiliary object to provide completion functionality
for GtkEntry
.
It implements the [ifaceGtk.CellLayout
] interface, to allow the user
to add extra cells to the GtkTreeView
with completion matches.
“Completion functionality” means that when the user modifies the text
in the entry, GtkEntryCompletion
checks which rows in the model match
the current content of the entry, and displays a list of matches.
By default, the matching is done by comparing the entry text
case-insensitively against the text column of the model (see
[methodGtk.EntryCompletion.set_text_column
]), but this can be overridden
with a custom match function (see [methodGtk.EntryCompletion.set_match_func
]).
When the user selects a completion, the content of the entry is
updated. By default, the content of the entry is replaced by the
text column of the model, but this can be overridden by connecting
to the [signalGtk.EntryCompletion::match-selected
] signal and updating the
entry in the signal handler. Note that you should return true
from
the signal handler to suppress the default behaviour.
To add completion functionality to an entry, use
[methodGtk.Entry.set_completion
].
GtkEntryCompletion
uses a [classGtk.TreeModelFilter
] model to
represent the subset of the entire model that is currently matching.
While the GtkEntryCompletion
signals
[signalGtk.EntryCompletion::match-selected
] and
[signalGtk.EntryCompletion::cursor-on-match
] take the original model
and an iter pointing to that model as arguments, other callbacks and
signals (such as GtkCellLayoutDataFunc
or
[signalGtk.CellArea::apply-attributes
)]
will generally take the filter model as argument. As long as you are
only calling [methodGtk.TreeModel.get
], this will make no difference to
you. If for some reason, you need the original model, use
[methodGtk.TreeModelFilter.get_model
]. Don’t forget to use
[methodGtk.TreeModelFilter.convert_iter_to_child_iter
] to obtain a
matching iter.
The EntryCompletionProtocol
protocol exposes the methods and properties of an underlying GtkEntryCompletion
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 EntryCompletion
.
Alternatively, use EntryCompletionRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkEntryCompletion
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
entry_completion_ptr
Default implementationTyped pointer to the underlying
GtkEntryCompletion
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkEntryCompletion
instance.Declaration
Swift
var entry_completion_ptr: UnsafeMutablePointer<GtkEntryCompletion>! { get }
-
Required Initialiser for types conforming to
EntryCompletionProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
EntryCompletionPropertyName
source property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: EntryCompletionPropertyName, 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 EntryCompletion property
Declaration
Swift
@inlinable func get(property: EntryCompletionPropertyName) -> 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 EntryCompletion property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: EntryCompletionPropertyName, value v: GLibObject.Value)
Parameters
property
the property to get the value for
Return Value
the value of the named property
-
connect(signal:
Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
EntryCompletionSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
handler
The Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:
Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
EntryCompletionSignalName
signalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: EntryCompletionSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int
Parameters
signal
The signal to connect
flags
The connection flags to use
data
A pointer to user data to provide to the callback
destroyData
A
GClosureNotify
C function to destroy the data pointed to byuserData
signalHandler
The C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onCursorOnMatch(flags:
Extension methodhandler: ) Emitted when a match from the cursor is on a match of the list.
The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by
iter
.Note that
model
is the model that was passed to [methodGtk.EntryCompletion.set_model
].Note
This represents the underlyingcursor-on-match
signalDeclaration
Swift
@discardableResult @inlinable func onCursorOnMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
model
the
GtkTreeModel
containing the matchesiter
a
GtkTreeIter
positioned at the selected matchhandler
true
if the signal has been handled Run the given callback whenever thecursorOnMatch
signal is emitted -
cursorOnMatchSignal
Extension methodTyped
cursor-on-match
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var cursorOnMatchSignal: EntryCompletionSignalName { get }
-
onInsertPrefix(flags:
Extension methodhandler: ) Emitted when the inline autocompletion is triggered.
The default behaviour is to make the entry display the whole prefix and select the newly inserted part.
Applications may connect to this signal in order to insert only a smaller part of the
prefix
into the entry - e.g. the entry used in theGtkFileChooser
inserts only the part of the prefix up to the next ‘/’.Note
This represents the underlyinginsert-prefix
signalDeclaration
Swift
@discardableResult @inlinable func onInsertPrefix(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ prefix: String) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
true
if the signal has been handled Run the given callback whenever theinsertPrefix
signal is emitted -
insertPrefixSignal
Extension methodTyped
insert-prefix
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var insertPrefixSignal: EntryCompletionSignalName { get }
-
onMatchSelected(flags:
Extension methodhandler: ) Emitted when a match from the list is selected.
The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by
iter
.Note that
model
is the model that was passed to [methodGtk.EntryCompletion.set_model
].Note
This represents the underlyingmatch-selected
signalDeclaration
Swift
@discardableResult @inlinable func onMatchSelected(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ model: TreeModelRef, _ iter: TreeIterRef) -> Bool) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
model
the
GtkTreeModel
containing the matchesiter
a
GtkTreeIter
positioned at the selected matchhandler
true
if the signal has been handled Run the given callback whenever thematchSelected
signal is emitted -
matchSelectedSignal
Extension methodTyped
match-selected
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var matchSelectedSignal: EntryCompletionSignalName { get }
-
onNoMatches(flags:
Extension methodhandler: ) Emitted when the filter model has zero number of rows in completion_complete method.
In other words when
GtkEntryCompletion
is out of suggestions.Note
This represents the underlyingno-matches
signalDeclaration
Swift
@discardableResult @inlinable func onNoMatches(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
handler
The signal handler to call Run the given callback whenever the
noMatches
signal is emitted -
noMatchesSignal
Extension methodTyped
no-matches
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var noMatchesSignal: EntryCompletionSignalName { get }
-
onNotifyCellArea(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::cell-area
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyCellArea(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyCellArea
signal is emitted -
notifyCellAreaSignal
Extension methodTyped
notify::cell-area
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyCellAreaSignal: EntryCompletionSignalName { get }
-
onNotifyInlineCompletion(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::inline-completion
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyInlineCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyInlineCompletion
signal is emitted -
notifyInlineCompletionSignal
Extension methodTyped
notify::inline-completion
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyInlineCompletionSignal: EntryCompletionSignalName { get }
-
onNotifyInlineSelection(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::inline-selection
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyInlineSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyInlineSelection
signal is emitted -
notifyInlineSelectionSignal
Extension methodTyped
notify::inline-selection
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyInlineSelectionSignal: EntryCompletionSignalName { get }
-
onNotifyMinimumKeyLength(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::minimum-key-length
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyMinimumKeyLength(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyMinimumKeyLength
signal is emitted -
notifyMinimumKeyLengthSignal
Extension methodTyped
notify::minimum-key-length
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyMinimumKeyLengthSignal: EntryCompletionSignalName { get }
-
onNotifyModel(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::model
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyModel
signal is emitted -
notifyModelSignal
Extension methodTyped
notify::model
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyModelSignal: EntryCompletionSignalName { get }
-
onNotifyPopupCompletion(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::popup-completion
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupCompletion(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPopupCompletion
signal is emitted -
notifyPopupCompletionSignal
Extension methodTyped
notify::popup-completion
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPopupCompletionSignal: EntryCompletionSignalName { get }
-
onNotifyPopupSetWidth(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::popup-set-width
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupSetWidth(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPopupSetWidth
signal is emitted -
notifyPopupSetWidthSignal
Extension methodTyped
notify::popup-set-width
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPopupSetWidthSignal: EntryCompletionSignalName { get }
-
onNotifyPopupSingleMatch(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::popup-single-match
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyPopupSingleMatch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyPopupSingleMatch
signal is emitted -
notifyPopupSingleMatchSignal
Extension methodTyped
notify::popup-single-match
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyPopupSingleMatchSignal: EntryCompletionSignalName { get }
-
onNotifyTextColumn(flags:
Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::text-column
signalDeclaration
Swift
@discardableResult @inlinable func onNotifyTextColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: EntryCompletionRef, _ pspec: ParamSpecRef) -> Void) -> Int
Parameters
flags
Flags
unownedSelf
Reference to instance of self
pspec
the
GParamSpec
of the property which changed.handler
The signal handler to call Run the given callback whenever the
notifyTextColumn
signal is emitted -
notifyTextColumnSignal
Extension methodTyped
notify::text-column
signal for using theconnect(signal:)
methodsDeclaration
Swift
static var notifyTextColumnSignal: EntryCompletionSignalName { get }
-
complete()
Extension methodRequests a completion operation, or in other words a refiltering of the current list with completions, using the current key.
The completion list view will be updated accordingly.
Declaration
Swift
@inlinable func complete()
-
computePrefix(key:
Extension method) Computes the common prefix that is shared by all rows in
completion
that start withkey
.If no row matches
key
,nil
will be returned. Note that a text column must have been set for this function to work, see [methodGtk.EntryCompletion.set_text_column
] for details.Declaration
Swift
@inlinable func computePrefix(key: UnsafePointer<CChar>!) -> String!
-
getCompletionPrefix()
Extension methodGet the original text entered by the user that triggered the completion or
nil
if there’s no completion ongoing.Declaration
Swift
@inlinable func getCompletionPrefix() -> String!
-
getEntry()
Extension methodGets the entry
completion
has been attached to.Declaration
Swift
@inlinable func getEntry() -> WidgetRef!
-
getInlineCompletion()
Extension methodReturns whether the common prefix of the possible completions should be automatically inserted in the entry.
Declaration
Swift
@inlinable func getInlineCompletion() -> Bool
-
getInlineSelection()
Extension methodReturns
true
if inline-selection mode is turned on.Declaration
Swift
@inlinable func getInlineSelection() -> Bool
-
getMinimumKeyLength()
Extension methodReturns the minimum key length as set for
completion
.Declaration
Swift
@inlinable func getMinimumKeyLength() -> Int
-
getModel()
Extension methodReturns the model the
GtkEntryCompletion
is using as data source.Returns
nil
if the model is unset.Declaration
Swift
@inlinable func getModel() -> TreeModelRef!
-
getPopupCompletion()
Extension methodReturns whether the completions should be presented in a popup window.
Declaration
Swift
@inlinable func getPopupCompletion() -> Bool
-
getPopupSetWidth()
Extension methodReturns whether the completion popup window will be resized to the width of the entry.
Declaration
Swift
@inlinable func getPopupSetWidth() -> Bool
-
getPopupSingleMatch()
Extension methodReturns whether the completion popup window will appear even if there is only a single match.
Declaration
Swift
@inlinable func getPopupSingleMatch() -> Bool
-
getTextColumn()
Extension methodReturns the column in the model of
completion
to get strings from.Declaration
Swift
@inlinable func getTextColumn() -> Int
-
insertPrefix()
Extension methodRequests a prefix insertion.
Declaration
Swift
@inlinable func insertPrefix()
-
set(inlineCompletion:
Extension method) Sets whether the common prefix of the possible completions should be automatically inserted in the entry.
Declaration
Swift
@inlinable func set(inlineCompletion: Bool)
-
set(inlineSelection:
Extension method) Sets whether it is possible to cycle through the possible completions inside the entry.
Declaration
Swift
@inlinable func set(inlineSelection: Bool)
-
setMatchFunc(func:
Extension methodfuncData: funcNotify: ) Sets the match function for
completion
to befunc
.The match function is used to determine if a row should or should not be in the completion list.
Declaration
Swift
@inlinable func setMatchFunc(func: GtkEntryCompletionMatchFunc?, funcData: gpointer! = nil, funcNotify: GDestroyNotify?)
-
setMinimumKey(length:
Extension method) Requires the length of the search key for
completion
to be at leastlength
.This is useful for long lists, where completing using a small key takes a lot of time and will come up with meaningless results anyway (ie, a too large dataset).
Declaration
Swift
@inlinable func setMinimumKey(length: Int)
-
set(model:
Extension method) Sets the model for a
GtkEntryCompletion
.If
completion
already has a model set, it will remove it before setting the new model. If model isnil
, then it will unset the model.Declaration
Swift
@inlinable func set(model: TreeModelRef? = nil)
-
set(model:
Extension method) Sets the model for a
GtkEntryCompletion
.If
completion
already has a model set, it will remove it before setting the new model. If model isnil
, then it will unset the model.Declaration
Swift
@inlinable func set<TreeModelT>(model: TreeModelT?) where TreeModelT : TreeModelProtocol
-
set(popupCompletion:
Extension method) Sets whether the completions should be presented in a popup window.
Declaration
Swift
@inlinable func set(popupCompletion: Bool)
-
set(popupSetWidth:
Extension method) Sets whether the completion popup window will be resized to be the same width as the entry.
Declaration
Swift
@inlinable func set(popupSetWidth: Bool)
-
set(popupSingleMatch:
Extension method) Sets whether the completion popup window will appear even if there is only a single match.
You may want to set this to
false
if you are using [propertyGtk.EntryCompletion:inline-completion
].Declaration
Swift
@inlinable func set(popupSingleMatch: Bool)
-
setText(column:
Extension method) Convenience function for setting up the most used case of this code: a completion list with just strings.
This function will set up
completion
to have a list displaying all (and just) strings in the completion list, and to get those strings fromcolumn
in the model ofcompletion
.This functions creates and adds a
GtkCellRendererText
for the selected column. If you need to set the text column, but don’t want the cell renderer, useg_object_set()
to set the [propertyGtk.EntryCompletion:text-column
] property directly.Declaration
Swift
@inlinable func setText(column: Int)
-
completionPrefix
Extension methodGet the original text entered by the user that triggered the completion or
nil
if there’s no completion ongoing.Declaration
Swift
@inlinable var completionPrefix: String! { get }
-
entry
Extension methodGets the entry
completion
has been attached to.Declaration
Swift
@inlinable var entry: WidgetRef! { get }
-
inlineCompletion
Extension methodReturns whether the common prefix of the possible completions should be automatically inserted in the entry.
Declaration
Swift
@inlinable var inlineCompletion: Bool { get nonmutating set }
-
inlineSelection
Extension methodReturns
true
if inline-selection mode is turned on.Declaration
Swift
@inlinable var inlineSelection: Bool { get nonmutating set }
-
minimumKeyLength
Extension methodReturns the minimum key length as set for
completion
.Declaration
Swift
@inlinable var minimumKeyLength: Int { get nonmutating set }
-
model
Extension methodUndocumented
Declaration
Swift
@inlinable var model: TreeModelRef! { get nonmutating set }
-
popupCompletion
Extension methodReturns whether the completions should be presented in a popup window.
Declaration
Swift
@inlinable var popupCompletion: Bool { get nonmutating set }
-
popupSetWidth
Extension methodReturns whether the completion popup window will be resized to the width of the entry.
Declaration
Swift
@inlinable var popupSetWidth: Bool { get nonmutating set }
-
popupSingleMatch
Extension methodReturns whether the completion popup window will appear even if there is only a single match.
Declaration
Swift
@inlinable var popupSingleMatch: Bool { get nonmutating set }
-
textColumn
Extension methodReturns the column in the model of
completion
to get strings from.Declaration
Swift
@inlinable var textColumn: Int { get nonmutating set }