1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Completion functionality for GtkEntry
7 <!-- ##### SECTION Long_Description ##### -->
9 #GtkEntryCompletion is an auxiliary object to be used in conjunction with
10 #GtkEntry to provide the completion functionality. It implements the
11 #GtkCellLayout interface, to allow the user to add extra cells to the
12 #GtkTreeView with completion matches.
15 "Completion functionality" means that when the user modifies the text
16 in the entry, #GtkEntryCompletion checks which rows in the model match
17 the current content of the entry, and displays a list of matches.
18 By default, the matching is done by comparing the entry text
19 case-insensitively against the text column of the model (see
20 gtk_entry_completion_set_text_column()), but this can be overridden with
21 a custom match function (see gtk_entry_completion_set_match_func()).
24 When the user selects a completion, the content of the entry is updated.
25 By default, the content of the entry is replaced by the text column of the
26 model, but this can be overridden by connecting to the ::match-selected signal
27 and updating the entry in the signal handler. Note that you should return
28 %TRUE from the signal handler to suppress the default behaviour.
31 To add completion functionality to an entry, use gtk_entry_set_completion().
34 In addition to regular completion matches, which will be inserted into the
35 entry when they are selected, #GtkEntryCompletion also allows to display
36 "actions" in the popup window. Their appearance is similar to menuitems,
37 to differentiate them clearly from completion strings. When an action is
38 selected, the ::action-activated signal is emitted.
41 <!-- ##### SECTION See_Also ##### -->
46 <!-- ##### SECTION Stability_Level ##### -->
49 <!-- ##### SECTION Image ##### -->
52 <!-- ##### STRUCT GtkEntryCompletion ##### -->
54 The GtkEntryCompletion struct contains only private data.
58 <!-- ##### SIGNAL GtkEntryCompletion::action-activated ##### -->
63 @entrycompletion: the object which received the signal.
66 <!-- ##### SIGNAL GtkEntryCompletion::cursor-on-match ##### -->
71 @entrycompletion: the object which received the signal.
76 <!-- ##### SIGNAL GtkEntryCompletion::insert-prefix ##### -->
81 @entrycompletion: the object which received the signal.
85 <!-- ##### SIGNAL GtkEntryCompletion::match-selected ##### -->
90 @entrycompletion: the object which received the signal.
95 <!-- ##### ARG GtkEntryCompletion:inline-completion ##### -->
100 <!-- ##### ARG GtkEntryCompletion:inline-selection ##### -->
105 <!-- ##### ARG GtkEntryCompletion:minimum-key-length ##### -->
110 <!-- ##### ARG GtkEntryCompletion:model ##### -->
115 <!-- ##### ARG GtkEntryCompletion:popup-completion ##### -->
120 <!-- ##### ARG GtkEntryCompletion:popup-set-width ##### -->
125 <!-- ##### ARG GtkEntryCompletion:popup-single-match ##### -->
130 <!-- ##### ARG GtkEntryCompletion:text-column ##### -->
135 <!-- ##### USER_FUNCTION GtkEntryCompletionMatchFunc ##### -->
137 A function which decides whether the row indicated by @iter matches a given
138 @key, and should be displayed as a possible completion for @key. Note that
139 @key is normalized and case-folded (see g_utf8_normalize() and
140 g_utf8_casefold()). If this is not appropriate, match functions have access
141 to the unmodified key via <literal>gtk_entry_get_text (GTK_ENTRY (gtk_entry_completion_get_entry (<!-- -->)))</literal>.
144 @completion: the #GtkEntryCompletion
145 @key: the string to match, normalized and case-folded
146 @iter: a #GtkTreeIter indicating the row to match
147 @user_data: user data given to gtk_entry_completion_set_match_func()
148 @Returns: %TRUE if @iter should be displayed as a possible completion for @key
151 <!-- ##### FUNCTION gtk_entry_completion_new ##### -->
160 <!-- ##### FUNCTION gtk_entry_completion_get_entry ##### -->
169 <!-- ##### FUNCTION gtk_entry_completion_set_model ##### -->
178 <!-- ##### FUNCTION gtk_entry_completion_get_model ##### -->
187 <!-- ##### FUNCTION gtk_entry_completion_set_match_func ##### -->
198 <!-- ##### FUNCTION gtk_entry_completion_set_minimum_key_length ##### -->
207 <!-- ##### FUNCTION gtk_entry_completion_get_minimum_key_length ##### -->
216 <!-- ##### FUNCTION gtk_entry_completion_complete ##### -->
224 <!-- ##### FUNCTION gtk_entry_completion_get_completion_prefix ##### -->
233 <!-- ##### FUNCTION gtk_entry_completion_insert_prefix ##### -->
241 <!-- ##### FUNCTION gtk_entry_completion_insert_action_text ##### -->
251 <!-- ##### FUNCTION gtk_entry_completion_insert_action_markup ##### -->
261 <!-- ##### FUNCTION gtk_entry_completion_delete_action ##### -->
270 <!-- ##### FUNCTION gtk_entry_completion_set_text_column ##### -->
279 <!-- ##### FUNCTION gtk_entry_completion_get_text_column ##### -->
288 <!-- ##### FUNCTION gtk_entry_completion_set_inline_completion ##### -->
297 <!-- ##### FUNCTION gtk_entry_completion_get_inline_completion ##### -->
306 <!-- ##### FUNCTION gtk_entry_completion_set_inline_selection ##### -->
315 <!-- ##### FUNCTION gtk_entry_completion_get_inline_selection ##### -->
324 <!-- ##### FUNCTION gtk_entry_completion_set_popup_completion ##### -->
333 <!-- ##### FUNCTION gtk_entry_completion_get_popup_completion ##### -->
342 <!-- ##### FUNCTION gtk_entry_completion_set_popup_set_width ##### -->
351 <!-- ##### FUNCTION gtk_entry_completion_get_popup_set_width ##### -->
360 <!-- ##### FUNCTION gtk_entry_completion_set_popup_single_match ##### -->
369 <!-- ##### FUNCTION gtk_entry_completion_get_popup_single_match ##### -->