|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkEntryCompletion</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="prev" href="GtkEntry.html" title="GtkEntry">
<link rel="next" href="GtkHScale.html" title="GtkHScale">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="NumericEntry.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkHScale.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2939534" class="shortcut">Top</a>
 | 
<a href="#id2940581" class="shortcut">Description</a>
 | 
<a href="#id2940247" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id2940272" class="shortcut">Implemented Interfaces</a>
 | 
<a href="#id2940295" class="shortcut">Properties</a>
 | 
<a href="#id2940434" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkEntryCompletion"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2939534"></a><span class="refentrytitle">GtkEntryCompletion</span>
</h2>
<p>GtkEntryCompletion — Completion functionality for GtkEntry</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
<a href="GtkEntryCompletion.html#GtkEntryCompletion-struct">GtkEntryCompletion</a>;
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (<a href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc">*GtkEntryCompletionMatchFunc</a>) (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);
<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a>* <a href="GtkEntryCompletion.html#gtk-entry-completion-new">gtk_entry_completion_new</a>
(void);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkEntryCompletion.html#gtk-entry-completion-get-entry">gtk_entry_completion_get_entry</a> (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-model">gtk_entry_completion_set_model</a> (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *model);
<a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a>* <a href="GtkEntryCompletion.html#gtk-entry-completion-get-model">gtk_entry_completion_get_model</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func">gtk_entry_completion_set_match_func</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc">GtkEntryCompletionMatchFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> func_notify);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-minimum-key-length">gtk_entry_completion_set_minimum_key_length</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-minimum-key-length">gtk_entry_completion_get_minimum_key_length</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-complete">gtk_entry_completion_complete</a> (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-insert-prefix">gtk_entry_completion_insert_prefix</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-text">gtk_entry_completion_insert_action_text</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-markup">gtk_entry_completion_insert_action_markup</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *markup);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-delete-action">gtk_entry_completion_delete_action</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-text-column">gtk_entry_completion_set_text_column</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> column);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-text-column">gtk_entry_completion_get_text_column</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-inline-completion">gtk_entry_completion_set_inline_completion</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> inline_completion);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-inline-completion">gtk_entry_completion_get_inline_completion</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-completion">gtk_entry_completion_set_popup_completion</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_completion);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-completion">gtk_entry_completion_get_popup_completion</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-set-width">gtk_entry_completion_set_popup_set_width</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_set_width);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-set-width">gtk_entry_completion_get_popup_set_width</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
void <a href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-single-match">gtk_entry_completion_set_popup_single_match</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_single_match);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-single-match">gtk_entry_completion_get_popup_single_match</a>
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2940247"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----GtkEntryCompletion
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2940272"></a><h2>Implemented Interfaces</h2>
<p>
GtkEntryCompletion implements
<a href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2940295"></a><h2>Properties</h2>
<pre class="synopsis">
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion">inline-completion</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--minimum-key-length">minimum-key-length</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--model">model</a>" <a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--popup-completion">popup-completion</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--popup-set-width">popup-set-width</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--popup-single-match">popup-single-match</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkEntryCompletion.html#GtkEntryCompletion--text-column">text-column</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2940434"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="GtkEntryCompletion.html#GtkEntryCompletion-action-activated">action-activated</a>"
void user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last
"<a href="GtkEntryCompletion.html#GtkEntryCompletion-insert-prefix">insert-prefix</a>"
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *prefix,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last
"<a href="GtkEntryCompletion.html#GtkEntryCompletion-match-selected">match-selected</a>"
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *model,
<a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2940581"></a><h2>Description</h2>
<p>
<a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> is an auxiliary object to be used in conjunction with
<a href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> to provide the completion functionality. It implements the
<a href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> interface, to allow the user to add extra cells to the
<a href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> with completion matches.
</p>
<p>
"Completion functionality" means that when the user modifies the text
in the entry, <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> 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
<a href="GtkEntryCompletion.html#gtk-entry-completion-set-text-column"><code class="function">gtk_entry_completion_set_text_column()</code></a>), but this can be overridden with
a custom match function (see <a href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func"><code class="function">gtk_entry_completion_set_match_func()</code></a>).
</p>
<p>
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 ::match-selected signal
and updating the entry in the signal handler. Note that you should return
<a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> from the signal handler to suppress the default behaviour.
</p>
<p>
To add completion functionality to an entry, use <a href="GtkEntry.html#gtk-entry-set-completion"><code class="function">gtk_entry_set_completion()</code></a>.
</p>
<p>
In addition to regular completion matches, which will be inserted into the
entry when they are selected, <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> also allows to display
"actions" in the popup window. Their appearance is similar to menuitems,
to differentiate them clearly from completion strings. When an action is
selected, the ::action-activated signal is emitted.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2940724"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2940734"></a><h3>
<a name="GtkEntryCompletion-struct"></a>GtkEntryCompletion</h3>
<a class="indexterm" name="id2940748"></a><pre class="programlisting">typedef struct _GtkEntryCompletion GtkEntryCompletion;</pre>
<p>
The GtkEntryCompletion struct contains only private data.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2940764"></a><h3>
<a name="GtkEntryCompletionMatchFunc"></a>GtkEntryCompletionMatchFunc ()</h3>
<a class="indexterm" name="id2940777"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (*GtkEntryCompletionMatchFunc) (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *key,
<a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data);</pre>
<p>
A function which decides whether the row indicated by <em class="parameter"><code>iter</code></em> matches a given
<em class="parameter"><code>key</code></em>, and should be displayed as a possible completion for <em class="parameter"><code>key</code></em>. Note that
<em class="parameter"><code>key</code></em> is normalized and case-folded (see <a
href="../glib/glib-Unicode-Manipulation.html#g-utf8-normalize"
><code class="function">g_utf8_normalize()</code></a> and
<a
href="../glib/glib-Unicode-Manipulation.html#g-utf8-casefold"
><code class="function">g_utf8_casefold()</code></a>). If this is not appropriate, match functions have access
to the unmodified key via <code class="literal">gtk_entry_get_text (GTK_ENTRY (gtk_entry_completion_get_entry ()))</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td>the <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>the string to match, normalized and case-folded
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em> :</span></td>
<td>a <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> indicating the row to match
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data given to <a href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func"><code class="function">gtk_entry_completion_set_match_func()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
<a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>iter</code></em> should be displayed as a possible completion for <em class="parameter"><code>key</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941008"></a><h3>
<a name="gtk-entry-completion-new"></a>gtk_entry_completion_new ()</h3>
<a class="indexterm" name="id2941023"></a><pre class="programlisting"><a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a>* gtk_entry_completion_new
(void);</pre>
<p>
Creates a new <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A newly created <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object.
</td>
</tr></tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941085"></a><h3>
<a name="gtk-entry-completion-get-entry"></a>gtk_entry_completion_get_entry ()</h3>
<a class="indexterm" name="id2941100"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_entry_completion_get_entry (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Gets the entry <em class="parameter"><code>completion</code></em> has been attached to.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> The entry <em class="parameter"><code>completion</code></em> has been attached to.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941186"></a><h3>
<a name="gtk-entry-completion-set-model"></a>gtk_entry_completion_set_model ()</h3>
<a class="indexterm" name="id2941201"></a><pre class="programlisting">void gtk_entry_completion_set_model (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *model);</pre>
<p>
Sets the model for a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>. If <em class="parameter"><code>completion</code></em> already has
a model set, it will remove it before setting the new model.
If model is <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, then it will unset the model.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>model</code></em> :</span></td>
<td> The <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941320"></a><h3>
<a name="gtk-entry-completion-get-model"></a>gtk_entry_completion_get_model ()</h3>
<a class="indexterm" name="id2941336"></a><pre class="programlisting"><a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a>* gtk_entry_completion_get_model
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns the model the <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> is using as data source.
Returns <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if the model is unset.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> A <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none is currently being used.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941449"></a><h3>
<a name="gtk-entry-completion-set-match-func"></a>gtk_entry_completion_set_match_func ()</h3>
<a class="indexterm" name="id2941465"></a><pre class="programlisting">void gtk_entry_completion_set_match_func
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc">GtkEntryCompletionMatchFunc</a> func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> func_data,
<a
href="../glib/glib-Datasets.html#GDestroyNotify"
>GDestroyNotify</a> func_notify);</pre>
<p>
Sets the match function for <em class="parameter"><code>completion</code></em> to be <em class="parameter"><code>func</code></em>. The match function
is used to determine if a row should or should not be in the completion
list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func</code></em> :</span></td>
<td> The <a href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc"><span class="type">GtkEntryCompletionMatchFunc</span></a> to use.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func_data</code></em> :</span></td>
<td> The user data for <em class="parameter"><code>func</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>func_notify</code></em> :</span></td>
<td> Destroy notifier for <em class="parameter"><code>func_data</code></em>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941628"></a><h3>
<a name="gtk-entry-completion-set-minimum-key-length"></a>gtk_entry_completion_set_minimum_key_length ()</h3>
<a class="indexterm" name="id2941646"></a><pre class="programlisting">void gtk_entry_completion_set_minimum_key_length
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);</pre>
<p>
Requires the length of the search key for <em class="parameter"><code>completion</code></em> to be at least
<em class="parameter"><code>length</code></em>. 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).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> The minimum length of the key in order to start completing.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941746"></a><h3>
<a name="gtk-entry-completion-get-minimum-key-length"></a>gtk_entry_completion_get_minimum_key_length ()</h3>
<a class="indexterm" name="id2941763"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gtk_entry_completion_get_minimum_key_length
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns the minimum key length as set for <em class="parameter"><code>completion</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> The currently used minimum key length.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941843"></a><h3>
<a name="gtk-entry-completion-complete"></a>gtk_entry_completion_complete ()</h3>
<a class="indexterm" name="id2941859"></a><pre class="programlisting">void gtk_entry_completion_complete (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Requests 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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr></tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2941924"></a><h3>
<a name="gtk-entry-completion-insert-prefix"></a>gtk_entry_completion_insert_prefix ()</h3>
<a class="indexterm" name="id2941941"></a><pre class="programlisting">void gtk_entry_completion_insert_prefix
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Requests a prefix insertion.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr></tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942004"></a><h3>
<a name="gtk-entry-completion-insert-action-text"></a>gtk_entry_completion_insert_action_text ()</h3>
<a class="indexterm" name="id2942020"></a><pre class="programlisting">void gtk_entry_completion_insert_action_text
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text);</pre>
<p>
Inserts an action in <em class="parameter"><code>completion</code></em>'s action item list at position <em class="parameter"><code>index_</code></em>
with text <em class="parameter"><code>text</code></em>. If you want the action item to have markup, use
<a href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-markup"><code class="function">gtk_entry_completion_insert_action_markup()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>index_</code></em> :</span></td>
<td> The index of the item to insert.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> Text of the item to insert.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942159"></a><h3>
<a name="gtk-entry-completion-insert-action-markup"></a>gtk_entry_completion_insert_action_markup ()</h3>
<a class="indexterm" name="id2942176"></a><pre class="programlisting">void gtk_entry_completion_insert_action_markup
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *markup);</pre>
<p>
Inserts an action in <em class="parameter"><code>completion</code></em>'s action item list at position <em class="parameter"><code>index_</code></em>
with markup <em class="parameter"><code>markup</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>index_</code></em> :</span></td>
<td> The index of the item to insert.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>markup</code></em> :</span></td>
<td> Markup of the item to insert.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942301"></a><h3>
<a name="gtk-entry-completion-delete-action"></a>gtk_entry_completion_delete_action ()</h3>
<a class="indexterm" name="id2942318"></a><pre class="programlisting">void gtk_entry_completion_delete_action
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index_);</pre>
<p>
Deletes the action at <em class="parameter"><code>index_</code></em> from <em class="parameter"><code>completion</code></em>'s action list.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>index_</code></em> :</span></td>
<td> The index of the item to Delete.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942415"></a><h3>
<a name="gtk-entry-completion-set-text-column"></a>gtk_entry_completion_set_text_column ()</h3>
<a class="indexterm" name="id2942431"></a><pre class="programlisting">void gtk_entry_completion_set_text_column
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> column);</pre>
<p>
Convenience function for setting up the most used case of this code: a
completion list with just strings. This function will set up <em class="parameter"><code>completion</code></em>
to have a list displaying all (and just) strings in the completion list,
and to get those strings from <em class="parameter"><code>column</code></em> in the model of <em class="parameter"><code>completion</code></em>.
</p>
<p>
This functions creates and adds a <a href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> for the selected
column. If you need to set the text column, but don't want the cell
renderer, use <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-set"
><code class="function">g_object_set()</code></a> to set the ::text_column property directly.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> A <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>column</code></em> :</span></td>
<td> The column in the model of <em class="parameter"><code>completion</code></em> to get strings from.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942571"></a><h3>
<a name="gtk-entry-completion-get-text-column"></a>gtk_entry_completion_get_text_column ()</h3>
<a class="indexterm" name="id2942587"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gtk_entry_completion_get_text_column
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns the column in the model of <em class="parameter"><code>completion</code></em> to get strings from.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the column containing the strings
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942668"></a><h3>
<a name="gtk-entry-completion-set-inline-completion"></a>gtk_entry_completion_set_inline_completion ()</h3>
<a class="indexterm" name="id2942686"></a><pre class="programlisting">void gtk_entry_completion_set_inline_completion
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> inline_completion);</pre>
<p>
Sets whether the common prefix of the possible completions should
be automatically inserted in the entry.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>inline_completion</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to do inline completion
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942782"></a><h3>
<a name="gtk-entry-completion-get-inline-completion"></a>gtk_entry_completion_get_inline_completion ()</h3>
<a class="indexterm" name="id2942799"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_entry_completion_get_inline_completion
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns whether the common prefix of the possible completions should
be automatically inserted in the entry.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if inline completion is turned on
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942885"></a><h3>
<a name="gtk-entry-completion-set-popup-completion"></a>gtk_entry_completion_set_popup_completion ()</h3>
<a class="indexterm" name="id2942902"></a><pre class="programlisting">void gtk_entry_completion_set_popup_completion
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_completion);</pre>
<p>
Sets whether the completions should be presented in a popup window.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>popup_completion</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to do popup completion
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2942998"></a><h3>
<a name="gtk-entry-completion-get-popup-completion"></a>gtk_entry_completion_get_popup_completion ()</h3>
<a class="indexterm" name="id2943015"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_entry_completion_get_popup_completion
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns whether the completions should be presented in a popup window.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if popup completion is turned on
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943099"></a><h3>
<a name="gtk-entry-completion-set-popup-set-width"></a>gtk_entry_completion_set_popup_set_width ()</h3>
<a class="indexterm" name="id2943116"></a><pre class="programlisting">void gtk_entry_completion_set_popup_set_width
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_set_width);</pre>
<p>
Sets whether the completion popup window will be resized to be the same
width as the entry.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>popup_set_width</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to make the width of the popup the same as the entry
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943213"></a><h3>
<a name="gtk-entry-completion-get-popup-set-width"></a>gtk_entry_completion_get_popup_set_width ()</h3>
<a class="indexterm" name="id2943230"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_entry_completion_get_popup_set_width
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns whether the completion popup window will be resized to the
width of the entry.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the popup window will be resized to the width of
the entry
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943316"></a><h3>
<a name="gtk-entry-completion-set-popup-single-match"></a>gtk_entry_completion_set_popup_single_match ()</h3>
<a class="indexterm" name="id2943333"></a><pre class="programlisting">void gtk_entry_completion_set_popup_single_match
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> popup_single_match);</pre>
<p>
Sets whether the completion popup window will appear even if there is
only a single match. You may want to set this to <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if you
are using <a href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion">inline
completion</a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>popup_single_match</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the popup should appear even for a single
match
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943449"></a><h3>
<a name="gtk-entry-completion-get-popup-single-match"></a>gtk_entry_completion_get_popup_single_match ()</h3>
<a class="indexterm" name="id2943465"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_entry_completion_get_popup_single_match
(<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *completion);</pre>
<p>
Returns whether the completion popup window will appear even if there is
only a single match.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>completion</code></em> :</span></td>
<td> a <a href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the popup window will appear regardless of the
number of matches.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.8
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2943552"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2943563"></a><h3>
<a name="GtkEntryCompletion--inline-completion"></a>The "<code class="literal">inline-completion</code>" property</h3>
<a class="indexterm" name="id2943580"></a><pre class="programlisting"> "inline-completion" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>
Determines whether the common prefix of the possible completions
should be inserted automatically in the entry. Note that this
requires text-column to be set, even if you are using a custom
match function.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943618"></a><h3>
<a name="GtkEntryCompletion--minimum-key-length"></a>The "<code class="literal">minimum-key-length</code>" property</h3>
<a class="indexterm" name="id2943635"></a><pre class="programlisting"> "minimum-key-length" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write</pre>
<p>Minimum length of the search key in order to look up matches.</p>
<p>Allowed values: >= 0</p>
<p>Default value: 1</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943666"></a><h3>
<a name="GtkEntryCompletion--model"></a>The "<code class="literal">model</code>" property</h3>
<a class="indexterm" name="id2943682"></a><pre class="programlisting"> "model" <a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> : Read / Write</pre>
<p>The model to find matches in.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943706"></a><h3>
<a name="GtkEntryCompletion--popup-completion"></a>The "<code class="literal">popup-completion</code>" property</h3>
<a class="indexterm" name="id2943723"></a><pre class="programlisting"> "popup-completion" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>
Determines whether the possible completions should be
shown in a popup window.</p>
<p>
</p>
<p>Default value: TRUE</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943760"></a><h3>
<a name="GtkEntryCompletion--popup-set-width"></a>The "<code class="literal">popup-set-width</code>" property</h3>
<a class="indexterm" name="id2943777"></a><pre class="programlisting"> "popup-set-width" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>
Determines whether the completions popup window will be
resized to the width of the entry.</p>
<p>
</p>
<p>Default value: TRUE</p>
<p>Since 2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943813"></a><h3>
<a name="GtkEntryCompletion--popup-single-match"></a>The "<code class="literal">popup-single-match</code>" property</h3>
<a class="indexterm" name="id2943830"></a><pre class="programlisting"> "popup-single-match" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>
Determines whether the completions popup window will shown
for a single possible completion. You probably want to set
this to <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> if you are using
<a href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion">inline
completion</a>.</p>
<p>
</p>
<p>Default value: TRUE</p>
<p>Since 2.8
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2943886"></a><h3>
<a name="GtkEntryCompletion--text-column"></a>The "<code class="literal">text-column</code>" property</h3>
<a class="indexterm" name="id2943903"></a><pre class="programlisting"> "text-column" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write</pre>
<p>
The column of the model containing the strings.</p>
<p>
</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p>Since 2.6
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2943944"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id2943954"></a><h3>
<a name="GtkEntryCompletion-action-activated"></a>The "action-activated" signal</h3>
<a class="indexterm" name="id2943965"></a><pre class="programlisting">void user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> index,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last</pre>
<p>
Gets emitted when an action is activated.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>index</code></em> :</span></td>
<td> the index of the activated action
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2944063"></a><h3>
<a name="GtkEntryCompletion-insert-prefix"></a>The "insert-prefix" signal</h3>
<a class="indexterm" name="id2944074"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *prefix,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last</pre>
<p>
Gets 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.
</p>
<p>
Applications may connect to this signal in order to insert only a
smaller part of the <em class="parameter"><code>prefix</code></em> into the entry - e.g. the entry used in
the <a href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> inserts only the part of the prefix up to the
next '/'.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prefix</code></em> :</span></td>
<td> the common prefix of all possible completions
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the signal has been handled
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2944217"></a><h3>
<a name="GtkEntryCompletion-match-selected"></a>The "match-selected" signal</h3>
<a class="indexterm" name="id2944228"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a> *widget,
<a href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *model,
<a href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last</pre>
<p>
Gets 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 <em class="parameter"><code>iter</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the object which received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>model</code></em> :</span></td>
<td> the <a href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> containing the matches
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>iter</code></em> :</span></td>
<td> a <a href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> positioned at the selected match
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the signal has been handled
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.4
</p>
</div>
</div>
</div>
</body>
</html>