EntryCompletion

open class EntryCompletion(    val gtkEntryCompletionPointer: <Error class: unknown class><<Error class: unknown class>>) : Buildable, CellLayout(source)

⚠️ Deprecated ⚠️

This is deprecated since version 4.10.

---

GtkEntryCompletion is an auxiliary object to provide completion functionality for GtkEntry.

It implements the iface@Gtk.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 method@Gtk.EntryCompletion.set_text_column), but this can be overridden with a custom match function (see method@Gtk.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 signal@Gtk.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 method@Gtk.Entry.set_completion.

GtkEntryCompletion uses a class@Gtk.TreeModelFilter model to represent the subset of the entire model that is currently matching. While the GtkEntryCompletion signals signal@Gtk.EntryCompletion::match-selected and signal@Gtk.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 signal@Gtk.CellArea::apply-attributes) will generally take the filter model as argument. As long as you are only calling method@Gtk.TreeModel.get, this will make no difference to you. If for some reason, you need the original model, use method@Gtk.TreeModelFilter.get_model. Don’t forget to use method@Gtk.TreeModelFilter.convert_iter_to_child_iter to obtain a matching iter.

Skipped during bindings generation

  • method cell-area: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor()

This is deprecated since version 4.10.

constructor(area: CellArea)

This is deprecated since version 4.10.

constructor(gtkEntryCompletionPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkCellLayoutPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtkEntryCompletionPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard

Determines whether the common prefix of the possible completions should be inserted automatically in the entry.

Link copied to clipboard

Determines whether the possible completions on the popup will appear in the entry as you navigate through them.

Link copied to clipboard
open var minimumKeyLength: <Error class: unknown class>

The minimum key length as set for completion.

Link copied to clipboard
open var model: TreeModel?

The model used as data source.

Link copied to clipboard

Determines whether the possible completions should be shown in a popup window.

Link copied to clipboard

Determines whether the completions popup window will be resized to the width of the entry.

Link copied to clipboard

Determines whether the completions popup window will shown for a single possible completion.

Link copied to clipboard
open var textColumn: <Error class: unknown class>

The column of the model containing the strings.

Functions

Link copied to clipboard
open fun addAttribute(cell: CellRenderer, attribute: String, column: <Error class: unknown class>)

This is deprecated since version 4.10.

---

Link copied to clipboard
open fun clear()

This is deprecated since version 4.10.

---

Link copied to clipboard

This is deprecated since version 4.10.

---

Link copied to clipboard
open fun complete()

This is deprecated since version 4.10.

Link copied to clipboard
open fun computePrefix(key: String): String?

This is deprecated since version 4.10.

Link copied to clipboard

Emits the "no-matches" signal. See onNoMatches.

Link copied to clipboard
open fun getArea(): CellArea?

This is deprecated since version 4.10.

---

Link copied to clipboard
open fun getBuildableId(): String?

Gets the ID of the @buildable object.

Link copied to clipboard
open fun getCells(): <Error class: unknown class>

This is deprecated since version 4.10.

---

Link copied to clipboard

This is deprecated since version 4.10.

Link copied to clipboard
open fun getEntry(): Widget

This is deprecated since version 4.10.

Link copied to clipboard
open fun insertPrefix()

This is deprecated since version 4.10.

Link copied to clipboard
fun onCursorOnMatch(    connectFlags: <Error class: unknown class> = ConnectFlags(0u),     handler: (model: TreeModel, iter: TreeIter) -> Boolean): <Error class: unknown class>

Emitted when a match from the cursor is on a match of the list.

Link copied to clipboard
fun onInsertPrefix(    connectFlags: <Error class: unknown class> = ConnectFlags(0u),     handler: (prefix: String) -> Boolean): <Error class: unknown class>

Emitted when the inline autocompletion is triggered.

Link copied to clipboard
fun onMatchSelected(    connectFlags: <Error class: unknown class> = ConnectFlags(0u),     handler: (model: TreeModel, iter: TreeIter) -> Boolean): <Error class: unknown class>

Emitted when a match from the list is selected.

Link copied to clipboard
fun onNoMatches(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the filter model has zero number of rows in completion_complete method.

Link copied to clipboard
open fun packEnd(cell: CellRenderer, expand: Boolean)

This is deprecated since version 4.10.

---

Link copied to clipboard
open fun packStart(cell: CellRenderer, expand: Boolean)

This is deprecated since version 4.10.

---

Link copied to clipboard
open fun reorder(cell: CellRenderer, position: <Error class: unknown class>)

This is deprecated since version 4.10.

---

Link copied to clipboard

This is deprecated since version 4.10.

---

Link copied to clipboard

This is deprecated since version 4.10.