<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkText">
<refmeta>
<refentrytitle role="top_of_page" id="GtkText.top_of_page">GtkText</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkText</refname>
<refpurpose>A simple single-line text entry field</refpurpose>
</refnamediv>

<refsect1 id="GtkText.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-new">gtk_text_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-new-with-buffer">gtk_text_new_with_buffer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-buffer">gtk_text_set_buffer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkEntryBuffer"><returnvalue>GtkEntryBuffer</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-get-buffer">gtk_text_get_buffer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-visibility">gtk_text_set_visibility</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-visibility">gtk_text_get_visibility</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-invisible-char">gtk_text_set_invisible_char</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gunichar"><returnvalue>gunichar</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-invisible-char">gtk_text_get_invisible_char</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-unset-invisible-char">gtk_text_unset_invisible_char</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-overwrite-mode">gtk_text_set_overwrite_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-overwrite-mode">gtk_text_get_overwrite_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-max-length">gtk_text_set_max_length</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-max-length">gtk_text_get_max_length</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint16"><returnvalue>guint16</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-text-length">gtk_text_get_text_length</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-activates-default">gtk_text_set_activates_default</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-activates-default">gtk_text_get_activates_default</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-placeholder-text">gtk_text_set_placeholder_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-get-placeholder-text">gtk_text_get_placeholder_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-input-purpose">gtk_text_set_input_purpose</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkInputPurpose"><returnvalue>GtkInputPurpose</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-input-purpose">gtk_text_get_input_purpose</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-input-hints">gtk_text_set_input_hints</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkInputHints"><returnvalue>GtkInputHints</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-get-input-hints">gtk_text_get_input_hints</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-attributes">gtk_text_set_attributes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoAttrList"><returnvalue>PangoAttrList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-get-attributes">gtk_text_get_attributes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-tabs">gtk_text_set_tabs</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoTabArray"><returnvalue>PangoTabArray</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-get-tabs">gtk_text_get_tabs</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-grab-focus-without-selecting">gtk_text_grab_focus_without_selecting</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-text-set-extra-menu">gtk_text_set_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-text-get-extra-menu">gtk_text_get_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkText.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--activates-default">activates-default</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="PangoAttrList"><type>PangoAttrList</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--attributes">attributes</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--buffer">buffer</link></entry><entry role="property_flags">Read / Write / Construct</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--enable-emoji-completion">enable-emoji-completion</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--extra-menu">extra-menu</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--im-module">im-module</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkInputHints"><type>GtkInputHints</type></link></entry><entry role="property_name"><link linkend="GtkText--input-hints">input-hints</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkInputPurpose"><type>GtkInputPurpose</type></link></entry><entry role="property_name"><link linkend="GtkText--input-purpose">input-purpose</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GtkText--invisible-char">invisible-char</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--invisible-char-set">invisible-char-set</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkText--max-length">max-length</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--overwrite-mode">overwrite-mode</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--placeholder-text">placeholder-text</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--propagate-text-width">propagate-text-width</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkText--scroll-offset">scroll-offset</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="PangoTabArray"><type>PangoTabArray</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkText--tabs">tabs</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--truncate-multiline">truncate-multiline</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkText--visibility">visibility</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkText.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-activate">activate</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-backspace">backspace</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-copy-clipboard">copy-clipboard</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-cut-clipboard">cut-clipboard</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-delete-from-cursor">delete-from-cursor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-insert-at-cursor">insert-at-cursor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-insert-emoji">insert-emoji</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-move-cursor">move-cursor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-paste-clipboard">paste-clipboard</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-preedit-changed">preedit-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkText-toggle-overwrite">toggle-overwrite</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkText.actions" role="actions">
<title role="actions.title">Actions</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="actions_none" colwidth="150px"/>
<colspec colname="actions_name" colwidth="300px"/>
<colspec colname="actions_param" colwidth="200px"/>
<tbody>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|menu.popup">menu.popup</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|text.redo">text.redo</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|text.undo">text.undo</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|misc.toggle-visibility">misc.toggle-visibility</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|misc.insert-emoji">misc.insert-emoji</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|selection.select-all">selection.select-all</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|selection.delete">selection.delete</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|clipboard.paste">clipboard.paste</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|clipboard.copy">clipboard.copy</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkText|clipboard.cut">clipboard.cut</link></entry><entry role="parameter_type"></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkText.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkText-struct">GtkText</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkTextClass">GtkTextClass</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkText.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkText
</screen>
</refsect1>
<refsect1 id="GtkText.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkText implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkEditable">GtkEditable</link>.</para>

</refsect1>

<refsect1 id="GtkText.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkText.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkText"><type>GtkText</type></link> widget is a single line text entry widget.</para>
<para>A fairly large set of key bindings are supported by default. If the
entered text is longer than the allocation of the widget, the widget
will scroll so that the cursor position is visible.</para>
<para>When using an entry for passwords and other sensitive information,
it can be put into “password mode” using <link linkend="gtk-text-set-visibility"><function>gtk_text_set_visibility()</function></link>.
In this mode, entered text is displayed using a “invisible” character.
By default, GTK picks the best invisible character that is available
in the current font, but it can be changed with <link linkend="gtk-text-set-invisible-char"><function>gtk_text_set_invisible_char()</function></link>.</para>
<para>If you are looking to add icons or progress display in an entry, look
at <link linkend="GtkEntry"><type>GtkEntry</type></link>. There other alternatives for more specialized use cases,
such as <link linkend="GtkSearchEntry"><type>GtkSearchEntry</type></link>.</para>
<para>If you need multi-line editable text, look at <link linkend="GtkTextView"><type>GtkTextView</type></link>.</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
text[.read-only]
├── placeholder
├── undershoot.left
├── undershoot.right
├── [selection]
├── [block-cursor]
╰── [window.popup]
]]></programlisting></informalexample>
<para></para>
<para>GtkText has a main node with the name text. Depending on the properties
of the widget, the .read-only style class may appear.</para>
<para>When the entry has a selection, it adds a subnode with the name selection.</para>
<para>When the entry is in overwrite mode, it adds a subnode with the name block-cursor
that determines how the block cursor is drawn.</para>
<para>The CSS node for a context menu is added as a subnode below text as well.</para>
<para>The undershoot nodes are used to draw the underflow indication when content
is scrolled out of view. These nodes get the .left and .right style classes
added depending on where the indication is drawn.</para>
<para>When touch is used and touch selection handles are shown, they are using
CSS nodes with name cursor-handle. They get the .top or .bottom style class
depending on where they are shown in relation to the selection. If there is
just a single handle for the text cursor, it gets the style class .insertion-cursor.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkText.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-text-new" role="function">
<title>gtk_text_new&#160;()</title>
<indexterm zone="gtk-text-new"><primary>gtk_text_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_text_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new self.</para>
<refsect3 id="gtk-text-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkText"><type>GtkText</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-new-with-buffer" role="function">
<title>gtk_text_new_with_buffer&#160;()</title>
<indexterm zone="gtk-text-new-with-buffer"><primary>gtk_text_new_with_buffer</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_text_new_with_buffer (<parameter><link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Creates a new self with the specified text buffer.</para>
<refsect3 id="gtk-text-new-with-buffer.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>The buffer to use for the new <link linkend="GtkText"><type>GtkText</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-new-with-buffer.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkText"><type>GtkText</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-buffer" role="function">
<title>gtk_text_set_buffer&#160;()</title>
<indexterm zone="gtk-text-set-buffer"><primary>gtk_text_set_buffer</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_buffer (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                     <parameter><link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> *buffer</parameter>);</programlisting>
<para>Set the <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object which holds the text for
this widget.</para>
<refsect3 id="gtk-text-set-buffer.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>buffer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-buffer" role="function">
<title>gtk_text_get_buffer&#160;()</title>
<indexterm zone="gtk-text-get-buffer"><primary>gtk_text_get_buffer</primary></indexterm>
<programlisting language="C"><link linkend="GtkEntryBuffer"><returnvalue>GtkEntryBuffer</returnvalue></link>&#160;*
gtk_text_get_buffer (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Get the <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object which holds the text for
this self.</para>
<refsect3 id="gtk-text-get-buffer.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-buffer.returns" role="returns">
<title>Returns</title>
<para>A <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-visibility" role="function">
<title>gtk_text_set_visibility&#160;()</title>
<indexterm zone="gtk-text-set-visibility"><primary>gtk_text_set_visibility</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_visibility (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                         <parameter><link linkend="gboolean"><type>gboolean</type></link> visible</parameter>);</programlisting>
<para>Sets whether the contents of the self are visible or not.
When visibility is set to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>, characters are displayed
as the invisible char, and will also appear that way when
the text in the self widget is copied to the clipboard.</para>
<para>By default, GTK picks the best invisible character available
in the current font, but it can be changed with
<link linkend="gtk-text-set-invisible-char"><function>gtk_text_set_invisible_char()</function></link>.</para>
<para>Note that you probably want to set <link linkend="GtkText--input-purpose"><type>“input-purpose”</type></link>
to <link linkend="GTK-INPUT-PURPOSE-PASSWORD:CAPS"><literal>GTK_INPUT_PURPOSE_PASSWORD</literal></link> or <link linkend="GTK-INPUT-PURPOSE-PIN:CAPS"><literal>GTK_INPUT_PURPOSE_PIN</literal></link> to
inform input methods about the purpose of this self,
in addition to setting visibility to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
<refsect3 id="gtk-text-set-visibility.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>visible</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the contents of the self are displayed
as plaintext</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-visibility" role="function">
<title>gtk_text_get_visibility&#160;()</title>
<indexterm zone="gtk-text-get-visibility"><primary>gtk_text_get_visibility</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_get_visibility (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves whether the text in <parameter>self</parameter>
 is visible.
See <link linkend="gtk-text-set-visibility"><function>gtk_text_set_visibility()</function></link>.</para>
<refsect3 id="gtk-text-get-visibility.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-visibility.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the text is currently visible</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-invisible-char" role="function">
<title>gtk_text_set_invisible_char&#160;()</title>
<indexterm zone="gtk-text-set-invisible-char"><primary>gtk_text_set_invisible_char</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_invisible_char (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                             <parameter><link linkend="gunichar"><type>gunichar</type></link> ch</parameter>);</programlisting>
<para>Sets the character to use in place of the actual text when
<link linkend="gtk-text-set-visibility"><function>gtk_text_set_visibility()</function></link> has been called to set text visibility
to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>. i.e. this is the character used in “password mode” to
show the user how many characters have been typed.</para>
<para>By default, GTK picks the best invisible char available in the
current font. If you set the invisible char to 0, then the user
will get no feedback at all; there will be no text on the screen
as they type.</para>
<refsect3 id="gtk-text-set-invisible-char.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ch</para></entry>
<entry role="parameter_description"><para>a Unicode character</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-invisible-char" role="function">
<title>gtk_text_get_invisible_char&#160;()</title>
<indexterm zone="gtk-text-get-invisible-char"><primary>gtk_text_get_invisible_char</primary></indexterm>
<programlisting language="C"><link linkend="gunichar"><returnvalue>gunichar</returnvalue></link>
gtk_text_get_invisible_char (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves the character displayed in place of the real characters
for entries with visibility set to false.
See <link linkend="gtk-text-set-invisible-char"><function>gtk_text_set_invisible_char()</function></link>.</para>
<refsect3 id="gtk-text-get-invisible-char.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-invisible-char.returns" role="returns">
<title>Returns</title>
<para> the current invisible char, or 0, if the self does not
show invisible text at all. </para>
</refsect3></refsect2>
<refsect2 id="gtk-text-unset-invisible-char" role="function">
<title>gtk_text_unset_invisible_char&#160;()</title>
<indexterm zone="gtk-text-unset-invisible-char"><primary>gtk_text_unset_invisible_char</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_unset_invisible_char (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Unsets the invisible char previously set with
<link linkend="gtk-text-set-invisible-char"><function>gtk_text_set_invisible_char()</function></link>. So that the
default invisible char is used again.</para>
<refsect3 id="gtk-text-unset-invisible-char.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-overwrite-mode" role="function">
<title>gtk_text_set_overwrite_mode&#160;()</title>
<indexterm zone="gtk-text-set-overwrite-mode"><primary>gtk_text_set_overwrite_mode</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_overwrite_mode (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                             <parameter><link linkend="gboolean"><type>gboolean</type></link> overwrite</parameter>);</programlisting>
<para>Sets whether the text is overwritten when typing in the <link linkend="GtkText"><type>GtkText</type></link>.</para>
<refsect3 id="gtk-text-set-overwrite-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>overwrite</para></entry>
<entry role="parameter_description"><para>new value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-overwrite-mode" role="function">
<title>gtk_text_get_overwrite_mode&#160;()</title>
<indexterm zone="gtk-text-get-overwrite-mode"><primary>gtk_text_get_overwrite_mode</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_get_overwrite_mode (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-text-set-overwrite-mode"><function>gtk_text_set_overwrite_mode()</function></link>.</para>
<refsect3 id="gtk-text-get-overwrite-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-overwrite-mode.returns" role="returns">
<title>Returns</title>
<para> whether the text is overwritten when typing.</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-max-length" role="function">
<title>gtk_text_set_max_length&#160;()</title>
<indexterm zone="gtk-text-set-max-length"><primary>gtk_text_set_max_length</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_max_length (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                         <parameter><link linkend="int"><type>int</type></link> length</parameter>);</programlisting>
<para>Sets the maximum allowed length of the contents of the widget.</para>
<para>If the current contents are longer than the given length, then
they will be truncated to fit.</para>
<para>This is equivalent to getting <parameter>self</parameter>
's <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> and
calling <link linkend="gtk-entry-buffer-set-max-length"><function>gtk_entry_buffer_set_max_length()</function></link> on it.
]|</para>
<refsect3 id="gtk-text-set-max-length.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the maximum length of the self, or 0 for no maximum.
(other than the maximum length of entries.) The value passed in will
be clamped to the range 0-65536.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-max-length" role="function">
<title>gtk_text_get_max_length&#160;()</title>
<indexterm zone="gtk-text-get-max-length"><primary>gtk_text_get_max_length</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_text_get_max_length (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves the maximum allowed length of the text in
<parameter>self</parameter>
. See <link linkend="gtk-text-set-max-length"><function>gtk_text_set_max_length()</function></link>.</para>
<para>This is equivalent to getting <parameter>self</parameter>
's <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> and
calling <link linkend="gtk-entry-buffer-get-max-length"><function>gtk_entry_buffer_get_max_length()</function></link> on it.</para>
<refsect3 id="gtk-text-get-max-length.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-max-length.returns" role="returns">
<title>Returns</title>
<para> the maximum allowed number of characters
in <link linkend="GtkText"><type>GtkText</type></link>, or 0 if there is no maximum.</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-text-length" role="function">
<title>gtk_text_get_text_length&#160;()</title>
<indexterm zone="gtk-text-get-text-length"><primary>gtk_text_get_text_length</primary></indexterm>
<programlisting language="C"><link linkend="guint16"><returnvalue>guint16</returnvalue></link>
gtk_text_get_text_length (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves the current length of the text in
<parameter>self</parameter>
. </para>
<para>This is equivalent to getting <parameter>self</parameter>
's <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> and
calling <link linkend="gtk-entry-buffer-get-length"><function>gtk_entry_buffer_get_length()</function></link> on it.</para>
<refsect3 id="gtk-text-get-text-length.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-text-length.returns" role="returns">
<title>Returns</title>
<para> the current number of characters
in <link linkend="GtkText"><type>GtkText</type></link>, or 0 if there are none.</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-activates-default" role="function">
<title>gtk_text_set_activates_default&#160;()</title>
<indexterm zone="gtk-text-set-activates-default"><primary>gtk_text_set_activates_default</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_activates_default (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> activates</parameter>);</programlisting>
<para>If <parameter>activates</parameter>
 is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, pressing Enter in the <parameter>self</parameter>
 will activate the default
widget for the window containing the self. This usually means that
the dialog box containing the self will be closed, since the default
widget is usually one of the dialog buttons.</para>
<refsect3 id="gtk-text-set-activates-default.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>activates</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to activate window’s default widget on Enter keypress</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-activates-default" role="function">
<title>gtk_text_get_activates_default&#160;()</title>
<indexterm zone="gtk-text-get-activates-default"><primary>gtk_text_get_activates_default</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_get_activates_default (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves the value set by <link linkend="gtk-text-set-activates-default"><function>gtk_text_set_activates_default()</function></link>.</para>
<refsect3 id="gtk-text-get-activates-default.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-activates-default.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the self will activate the default widget</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-placeholder-text" role="function">
<title>gtk_text_set_placeholder_text&#160;()</title>
<indexterm zone="gtk-text-set-placeholder-text"><primary>gtk_text_set_placeholder_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_placeholder_text (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>);</programlisting>
<para>Sets text to be displayed in <parameter>self</parameter>
 when it is empty.</para>
<para>This can be used to give a visual hint of the expected
contents of the self.</para>
<refsect3 id="gtk-text-set-placeholder-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>a string to be displayed when <parameter>self</parameter>
is empty and unfocused, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-placeholder-text" role="function">
<title>gtk_text_get_placeholder_text&#160;()</title>
<indexterm zone="gtk-text-get-placeholder-text"><primary>gtk_text_get_placeholder_text</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_text_get_placeholder_text (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Retrieves the text that will be displayed when <parameter>self</parameter>
 is empty and unfocused</para>
<refsect3 id="gtk-text-get-placeholder-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-placeholder-text.returns" role="returns">
<title>Returns</title>
<para>a pointer to the placeholder text as a string.
This string points to internally allocated storage in the widget and must
not be freed, modified or stored. If no placeholder text has been set,
<link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-input-purpose" role="function">
<title>gtk_text_set_input_purpose&#160;()</title>
<indexterm zone="gtk-text-set-input-purpose"><primary>gtk_text_set_input_purpose</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_input_purpose (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                            <parameter><link linkend="GtkInputPurpose"><type>GtkInputPurpose</type></link> purpose</parameter>);</programlisting>
<para>Sets the <link linkend="GtkText--input-purpose"><type>“input-purpose”</type></link> property which
can be used by on-screen keyboards and other input
methods to adjust their behaviour.</para>
<refsect3 id="gtk-text-set-input-purpose.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>purpose</para></entry>
<entry role="parameter_description"><para>the purpose</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-input-purpose" role="function">
<title>gtk_text_get_input_purpose&#160;()</title>
<indexterm zone="gtk-text-get-input-purpose"><primary>gtk_text_get_input_purpose</primary></indexterm>
<programlisting language="C"><link linkend="GtkInputPurpose"><returnvalue>GtkInputPurpose</returnvalue></link>
gtk_text_get_input_purpose (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the value of the <link linkend="GtkText--input-purpose"><type>“input-purpose”</type></link> property.</para>
<refsect3 id="gtk-text-get-input-purpose.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-input-hints" role="function">
<title>gtk_text_set_input_hints&#160;()</title>
<indexterm zone="gtk-text-set-input-hints"><primary>gtk_text_set_input_hints</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_input_hints (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                          <parameter><link linkend="GtkInputHints"><type>GtkInputHints</type></link> hints</parameter>);</programlisting>
<para>Sets the <link linkend="GtkText--input-hints"><type>“input-hints”</type></link> property, which
allows input methods to fine-tune their behaviour.</para>
<refsect3 id="gtk-text-set-input-hints.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>hints</para></entry>
<entry role="parameter_description"><para>the hints</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-input-hints" role="function">
<title>gtk_text_get_input_hints&#160;()</title>
<indexterm zone="gtk-text-get-input-hints"><primary>gtk_text_get_input_hints</primary></indexterm>
<programlisting language="C"><link linkend="GtkInputHints"><returnvalue>GtkInputHints</returnvalue></link>
gtk_text_get_input_hints (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the value of the <link linkend="GtkText--input-hints"><type>“input-hints”</type></link> property.</para>
<refsect3 id="gtk-text-get-input-hints.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-attributes" role="function">
<title>gtk_text_set_attributes&#160;()</title>
<indexterm zone="gtk-text-set-attributes"><primary>gtk_text_set_attributes</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_attributes (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                         <parameter><link linkend="PangoAttrList"><type>PangoAttrList</type></link> *attrs</parameter>);</programlisting>
<para>Sets a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>; the attributes in the list are applied to the
text.</para>
<refsect3 id="gtk-text-set-attributes.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>attrs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoAttrList"><type>PangoAttrList</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-attributes" role="function">
<title>gtk_text_get_attributes&#160;()</title>
<indexterm zone="gtk-text-get-attributes"><primary>gtk_text_get_attributes</primary></indexterm>
<programlisting language="C"><link linkend="PangoAttrList"><returnvalue>PangoAttrList</returnvalue></link>&#160;*
gtk_text_get_attributes (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the attribute list that was set on the self using
<link linkend="gtk-text-set-attributes"><function>gtk_text_set_attributes()</function></link>, if any.</para>
<refsect3 id="gtk-text-get-attributes.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-attributes.returns" role="returns">
<title>Returns</title>
<para>the attribute list, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if none was set. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-tabs" role="function">
<title>gtk_text_set_tabs&#160;()</title>
<indexterm zone="gtk-text-set-tabs"><primary>gtk_text_set_tabs</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_tabs (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                   <parameter><link linkend="PangoTabArray"><type>PangoTabArray</type></link> *tabs</parameter>);</programlisting>
<para>Sets a <link linkend="PangoTabArray"><type>PangoTabArray</type></link>; the tabstops in the array are applied to the self
text.</para>
<refsect3 id="gtk-text-set-tabs.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tabs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoTabArray"><type>PangoTabArray</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-tabs" role="function">
<title>gtk_text_get_tabs&#160;()</title>
<indexterm zone="gtk-text-get-tabs"><primary>gtk_text_get_tabs</primary></indexterm>
<programlisting language="C"><link linkend="PangoTabArray"><returnvalue>PangoTabArray</returnvalue></link>&#160;*
gtk_text_get_tabs (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the tabstops that were set on the self using <link linkend="gtk-text-set-tabs"><function>gtk_text_set_tabs()</function></link>, if
any.</para>
<refsect3 id="gtk-text-get-tabs.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-tabs.returns" role="returns">
<title>Returns</title>
<para>the tabstops, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none was set. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-text-grab-focus-without-selecting" role="function">
<title>gtk_text_grab_focus_without_selecting&#160;()</title>
<indexterm zone="gtk-text-grab-focus-without-selecting"><primary>gtk_text_grab_focus_without_selecting</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_text_grab_focus_without_selecting (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Causes <parameter>self</parameter>
 to have keyboard focus.</para>
<para>It behaves like <link linkend="gtk-widget-grab-focus"><function>gtk_widget_grab_focus()</function></link>,
except that it doesn't select the contents of the self.
You only want to call this on some special entries
which the user usually doesn't want to replace all text in,
such as search-as-you-type entries.</para>
<refsect3 id="gtk-text-grab-focus-without-selecting.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-grab-focus-without-selecting.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if focus is now inside <parameter>self</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-text-set-extra-menu" role="function">
<title>gtk_text_set_extra_menu&#160;()</title>
<indexterm zone="gtk-text-set-extra-menu"><primary>gtk_text_set_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_text_set_extra_menu (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>,
                         <parameter><link linkend="GMenuModel"><type>GMenuModel</type></link> *model</parameter>);</programlisting>
<para>Sets a menu model to add when constructing
the context menu for <parameter>self</parameter>
.</para>
<refsect3 id="gtk-text-set-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GMenuModel"><type>GMenuModel</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-text-get-extra-menu" role="function">
<title>gtk_text_get_extra_menu&#160;()</title>
<indexterm zone="gtk-text-get-extra-menu"><primary>gtk_text_get_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
gtk_text_get_extra_menu (<parameter><link linkend="GtkText"><type>GtkText</type></link> *self</parameter>);</programlisting>
<para>Gets the menu model set with <link linkend="gtk-text-set-extra-menu"><function>gtk_text_set_extra_menu()</function></link>.</para>
<refsect3 id="gtk-text-get-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkText"><type>GtkText</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-text-get-extra-menu.returns" role="returns">
<title>Returns</title>
<para>(nullable): the menu model. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkText.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkText-struct" role="struct">
<title>struct GtkText</title>
<indexterm zone="GtkText-struct"><primary>GtkText</primary></indexterm>
<programlisting language="C">struct GtkText;</programlisting>
</refsect2>
<refsect2 id="GtkTextClass" role="struct">
<title>struct GtkTextClass</title>
<indexterm zone="GtkTextClass"><primary>GtkTextClass</primary></indexterm>
<programlisting language="C">struct GtkTextClass {
  GtkWidgetClass parent_class;

  /* Action signals
   */
  void (* activate)           (GtkText         *self);
  void (* move_cursor)        (GtkText         *self,
                               GtkMovementStep  step,
                               gint             count,
                               gboolean         extend);
  void (* insert_at_cursor)   (GtkText         *self,
                               const gchar     *str);
  void (* delete_from_cursor) (GtkText         *self,
                               GtkDeleteType    type,
                               gint             count);
  void (* backspace)          (GtkText         *self);
  void (* cut_clipboard)      (GtkText         *self);
  void (* copy_clipboard)     (GtkText         *self);
  void (* paste_clipboard)    (GtkText         *self);
  void (* toggle_overwrite)   (GtkText         *self);
  void (* insert_emoji)       (GtkText         *self);
  void (* undo)               (GtkText         *self);
  void (* redo)               (GtkText         *self);
};
</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkText.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkText--activates-default" role="property"><title>The <literal>“activates-default”</literal> property</title>
<indexterm zone="GtkText--activates-default"><primary>GtkText:activates-default</primary></indexterm>
<programlisting>  “activates-default”        <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--attributes" role="property"><title>The <literal>“attributes”</literal> property</title>
<indexterm zone="GtkText--attributes"><primary>GtkText:attributes</primary></indexterm>
<programlisting>  “attributes”               <link linkend="PangoAttrList"><type>PangoAttrList</type></link>&#160;*</programlisting>
<para>A list of Pango attributes to apply to the text of the self.</para>
<para>This is mainly useful to change the size or weight of the text.</para>
<para>The <link linkend="PangoAttribute"><type>PangoAttribute</type></link>'s <parameter>start_index</parameter>
 and <parameter>end_index</parameter>
 must refer to the
<link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> text, i.e. without the preedit string.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkText--buffer" role="property"><title>The <literal>“buffer”</literal> property</title>
<indexterm zone="GtkText--buffer"><primary>GtkText:buffer</primary></indexterm>
<programlisting>  “buffer”                   <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link>&#160;*</programlisting>
<para>Text buffer object which actually stores self text.</para><para>Owner: GtkText</para>
<para>Flags: Read / Write / Construct</para>
</refsect2>
<refsect2 id="GtkText--enable-emoji-completion" role="property"><title>The <literal>“enable-emoji-completion”</literal> property</title>
<indexterm zone="GtkText--enable-emoji-completion"><primary>GtkText:enable-emoji-completion</primary></indexterm>
<programlisting>  “enable-emoji-completion”  <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether to suggest Emoji replacements.</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--extra-menu" role="property"><title>The <literal>“extra-menu”</literal> property</title>
<indexterm zone="GtkText--extra-menu"><primary>GtkText:extra-menu</primary></indexterm>
<programlisting>  “extra-menu”               <link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</programlisting>
<para>A menu model whose contents will be appended to
the context menu.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkText--im-module" role="property"><title>The <literal>“im-module”</literal> property</title>
<indexterm zone="GtkText--im-module"><primary>GtkText:im-module</primary></indexterm>
<programlisting>  “im-module”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Which IM (input method) module should be used for this self.
See <link linkend="GtkIMContext"><type>GtkIMContext</type></link>.</para>
<para>Setting this to a non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> value overrides the
system-wide IM module setting. See the GtkSettings
<link linkend="GtkSettings--gtk-im-module"><type>“gtk-im-module”</type></link> property.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkText--input-hints" role="property"><title>The <literal>“input-hints”</literal> property</title>
<indexterm zone="GtkText--input-hints"><primary>GtkText:input-hints</primary></indexterm>
<programlisting>  “input-hints”              <link linkend="GtkInputHints"><type>GtkInputHints</type></link></programlisting>
<para>Additional hints (beyond <link linkend="GtkText--input-purpose"><type>“input-purpose”</type></link>) that
allow input methods to fine-tune their behaviour.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkText--input-purpose" role="property"><title>The <literal>“input-purpose”</literal> property</title>
<indexterm zone="GtkText--input-purpose"><primary>GtkText:input-purpose</primary></indexterm>
<programlisting>  “input-purpose”            <link linkend="GtkInputPurpose"><type>GtkInputPurpose</type></link></programlisting>
<para>The purpose of this text field.</para>
<para>This property can be used by on-screen keyboards and other input
methods to adjust their behaviour.</para>
<para>Note that setting the purpose to <link linkend="GTK-INPUT-PURPOSE-PASSWORD:CAPS"><literal>GTK_INPUT_PURPOSE_PASSWORD</literal></link> or
<link linkend="GTK-INPUT-PURPOSE-PIN:CAPS"><literal>GTK_INPUT_PURPOSE_PIN</literal></link> is independent from setting
<link linkend="GtkText--visibility"><type>“visibility”</type></link>.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_INPUT_PURPOSE_FREE_FORM</para>
</refsect2>
<refsect2 id="GtkText--invisible-char" role="property"><title>The <literal>“invisible-char”</literal> property</title>
<indexterm zone="GtkText--invisible-char"><primary>GtkText:invisible-char</primary></indexterm>
<programlisting>  “invisible-char”           <link linkend="guint"><type>guint</type></link></programlisting>
<para>The character to use when masking self contents (in “password mode”).</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: '*'</para>
</refsect2>
<refsect2 id="GtkText--invisible-char-set" role="property"><title>The <literal>“invisible-char-set”</literal> property</title>
<indexterm zone="GtkText--invisible-char-set"><primary>GtkText:invisible-char-set</primary></indexterm>
<programlisting>  “invisible-char-set”       <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the invisible char has been set for the <link linkend="GtkText"><type>GtkText</type></link>.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--max-length" role="property"><title>The <literal>“max-length”</literal> property</title>
<indexterm zone="GtkText--max-length"><primary>GtkText:max-length</primary></indexterm>
<programlisting>  “max-length”               <link linkend="gint"><type>gint</type></link></programlisting>
<para>Maximum number of characters for this self. Zero if no maximum.</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,65535]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkText--overwrite-mode" role="property"><title>The <literal>“overwrite-mode”</literal> property</title>
<indexterm zone="GtkText--overwrite-mode"><primary>GtkText:overwrite-mode</primary></indexterm>
<programlisting>  “overwrite-mode”           <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If text is overwritten when typing in the <link linkend="GtkText"><type>GtkText</type></link>.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--placeholder-text" role="property"><title>The <literal>“placeholder-text”</literal> property</title>
<indexterm zone="GtkText--placeholder-text"><primary>GtkText:placeholder-text</primary></indexterm>
<programlisting>  “placeholder-text”         <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The text that will be displayed in the <link linkend="GtkText"><type>GtkText</type></link> when it is empty
and unfocused.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkText--propagate-text-width" role="property"><title>The <literal>“propagate-text-width”</literal> property</title>
<indexterm zone="GtkText--propagate-text-width"><primary>GtkText:propagate-text-width</primary></indexterm>
<programlisting>  “propagate-text-width”     <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the entry should grow and shrink with the content.</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--scroll-offset" role="property"><title>The <literal>“scroll-offset”</literal> property</title>
<indexterm zone="GtkText--scroll-offset"><primary>GtkText:scroll-offset</primary></indexterm>
<programlisting>  “scroll-offset”            <link linkend="gint"><type>gint</type></link></programlisting>
<para>Number of pixels of the self scrolled off the screen to the left.</para><para>Owner: GtkText</para>
<para>Flags: Read</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkText--tabs" role="property"><title>The <literal>“tabs”</literal> property</title>
<indexterm zone="GtkText--tabs"><primary>GtkText:tabs</primary></indexterm>
<programlisting>  “tabs”                     <link linkend="PangoTabArray"><type>PangoTabArray</type></link>&#160;*</programlisting>
<para>A list of tabstops to apply to the text of the self.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkText--truncate-multiline" role="property"><title>The <literal>“truncate-multiline”</literal> property</title>
<indexterm zone="GtkText--truncate-multiline"><primary>GtkText:truncate-multiline</primary></indexterm>
<programlisting>  “truncate-multiline”       <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>When <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, pasted multi-line text is truncated to the first line.</para>
<para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkText--visibility" role="property"><title>The <literal>“visibility”</literal> property</title>
<indexterm zone="GtkText--visibility"><primary>GtkText:visibility</primary></indexterm>
<programlisting>  “visibility”               <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>FALSE displays the “invisible char” instead of the actual text (password mode).</para><para>Owner: GtkText</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkText.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkText-activate" role="signal"><title>The <literal>“activate”</literal> signal</title>
<indexterm zone="GtkText-activate"><primary>GtkText::activate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::activate signal is emitted when the user hits
the Enter key.</para>
<para>The default bindings for this signal are all forms of the Enter key.</para>
<refsect3 id="GtkText-activate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The self on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-backspace" role="signal"><title>The <literal>“backspace”</literal> signal</title>
<indexterm zone="GtkText-backspace"><primary>GtkText::backspace</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::backspace signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user asks for it.</para>
<para>The default bindings for this signal are
Backspace and Shift-Backspace.</para>
<refsect3 id="GtkText-backspace.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-copy-clipboard" role="signal"><title>The <literal>“copy-clipboard”</literal> signal</title>
<indexterm zone="GtkText-copy-clipboard"><primary>GtkText::copy-clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::copy-clipboard signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to copy the selection to the clipboard.</para>
<para>The default bindings for this signal are
Ctrl-c and Ctrl-Insert.</para>
<refsect3 id="GtkText-copy-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-cut-clipboard" role="signal"><title>The <literal>“cut-clipboard”</literal> signal</title>
<indexterm zone="GtkText-cut-clipboard"><primary>GtkText::cut-clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::cut-clipboard signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to cut the selection to the clipboard.</para>
<para>The default bindings for this signal are
Ctrl-x and Shift-Delete.</para>
<refsect3 id="GtkText-cut-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-delete-from-cursor" role="signal"><title>The <literal>“delete-from-cursor”</literal> signal</title>
<indexterm zone="GtkText-delete-from-cursor"><primary>GtkText::delete-from-cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link>      *self,
               <link linkend="GtkDeleteType"><type>GtkDeleteType</type></link> type,
               <link linkend="gint"><type>gint</type></link>          count,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>The ::delete-from-cursor signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user initiates a text deletion.</para>
<para>If the <parameter>type</parameter>
 is <link linkend="GTK-DELETE-CHARS:CAPS"><literal>GTK_DELETE_CHARS</literal></link>, GTK deletes the selection
if there is one, otherwise it deletes the requested number
of characters.</para>
<para>The default bindings for this signal are
Delete for deleting a character and Ctrl-Delete for
deleting a word.</para>
<refsect3 id="GtkText-delete-from-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>the granularity of the deletion, as a <link linkend="GtkDeleteType"><type>GtkDeleteType</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>count</para></entry>
<entry role="parameter_description"><para>the number of <parameter>type</parameter>
units to delete</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-insert-at-cursor" role="signal"><title>The <literal>“insert-at-cursor”</literal> signal</title>
<indexterm zone="GtkText-insert-at-cursor"><primary>GtkText::insert-at-cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gchar"><type>gchar</type></link>   *string,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::insert-at-cursor signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user initiates the insertion of a
fixed string at the cursor.</para>
<para>This signal has no default bindings.</para>
<refsect3 id="GtkText-insert-at-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>the string to insert</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-insert-emoji" role="signal"><title>The <literal>“insert-emoji”</literal> signal</title>
<indexterm zone="GtkText-insert-emoji"><primary>GtkText::insert-emoji</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::insert-emoji signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to present the Emoji chooser for the <parameter>self</parameter>
.</para>
<para>The default bindings for this signal are Ctrl-. and Ctrl-;</para>
<refsect3 id="GtkText-insert-emoji.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-move-cursor" role="signal"><title>The <literal>“move-cursor”</literal> signal</title>
<indexterm zone="GtkText-move-cursor"><primary>GtkText::move-cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link>        *self,
               <link linkend="GtkMovementStep"><type>GtkMovementStep</type></link> step,
               <link linkend="gint"><type>gint</type></link>            count,
               <link linkend="gboolean"><type>gboolean</type></link>        extend,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>The ::move-cursor signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user initiates a cursor movement.
If the cursor is not visible in <parameter>self</parameter>
, this signal causes
the viewport to be moved instead.</para>
<para>Applications should not connect to it, but may emit it with
<link linkend="g-signal-emit-by-name"><function>g_signal_emit_by_name()</function></link> if they need to control the cursor
programmatically.</para>
<para>The default bindings for this signal come in two variants,
the variant with the Shift modifier extends the selection,
the variant without the Shift modifer does not.
There are too many key combinations to list them all here.</para>
<itemizedlist>
<listitem><para>Arrow keys move by individual characters/lines</para></listitem>
<listitem><para>Ctrl-arrow key combinations move by words/paragraphs</para></listitem>
<listitem><para>Home/End keys move to the ends of the buffer</para></listitem>
</itemizedlist>
<refsect3 id="GtkText-move-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>step</para></entry>
<entry role="parameter_description"><para>the granularity of the move, as a <link linkend="GtkMovementStep"><type>GtkMovementStep</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>count</para></entry>
<entry role="parameter_description"><para>the number of <parameter>step</parameter>
units to move</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>extend</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the move should extend the selection</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-paste-clipboard" role="signal"><title>The <literal>“paste-clipboard”</literal> signal</title>
<indexterm zone="GtkText-paste-clipboard"><primary>GtkText::paste-clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::paste-clipboard signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to paste the contents of the clipboard
into the text view.</para>
<para>The default bindings for this signal are
Ctrl-v and Shift-Insert.</para>
<refsect3 id="GtkText-paste-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-preedit-changed" role="signal"><title>The <literal>“preedit-changed”</literal> signal</title>
<indexterm zone="GtkText-preedit-changed"><primary>GtkText::preedit-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gchar"><type>gchar</type></link>   *preedit,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>If an input method is used, the typed text will not immediately
be committed to the buffer. So if you are interested in the text,
connect to this signal.</para>
<refsect3 id="GtkText-preedit-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>preedit</para></entry>
<entry role="parameter_description"><para>the current preedit string</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkText-toggle-overwrite" role="signal"><title>The <literal>“toggle-overwrite”</literal> signal</title>
<indexterm zone="GtkText-toggle-overwrite"><primary>GtkText::toggle-overwrite</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkText"><type>GtkText</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link> user_data)</programlisting>
<para>The ::toggle-overwrite signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to toggle the overwrite mode of the self.</para>
<para>The default bindings for this signal is Insert.</para>
<refsect3 id="GtkText-toggle-overwrite.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkText.action-details" role="action_details">
<title role="action_details.title">Action Details</title>
<refsect2 id="GtkText|menu.popup" role="action"><title>The <literal>“menu.popup”</literal> action</title>
<indexterm zone="GtkText|menu.popup"><primary>GtkText|menu.popup</primary></indexterm>
<para>Opens the context menu.</para>
</refsect2>
<refsect2 id="GtkText|text.redo" role="action"><title>The <literal>“text.redo”</literal> action</title>
<indexterm zone="GtkText|text.redo"><primary>GtkText|text.redo</primary></indexterm>
<para>Redoes the last change to the contents.</para>
</refsect2>
<refsect2 id="GtkText|text.undo" role="action"><title>The <literal>“text.undo”</literal> action</title>
<indexterm zone="GtkText|text.undo"><primary>GtkText|text.undo</primary></indexterm>
<para>Undoes the last change to the contents.</para>
</refsect2>
<refsect2 id="GtkText|misc.toggle-visibility" role="action"><title>The <literal>“misc.toggle-visibility”</literal> action</title>
<indexterm zone="GtkText|misc.toggle-visibility"><primary>GtkText|misc.toggle-visibility</primary></indexterm>
<para>Toggles the <link linkend="GtkText--visibility"><type>“visibility”</type></link> property.</para>
</refsect2>
<refsect2 id="GtkText|misc.insert-emoji" role="action"><title>The <literal>“misc.insert-emoji”</literal> action</title>
<indexterm zone="GtkText|misc.insert-emoji"><primary>GtkText|misc.insert-emoji</primary></indexterm>
<para>Opens the Emoji chooser.</para>
</refsect2>
<refsect2 id="GtkText|selection.select-all" role="action"><title>The <literal>“selection.select-all”</literal> action</title>
<indexterm zone="GtkText|selection.select-all"><primary>GtkText|selection.select-all</primary></indexterm>
<para>Selects all of the widgets content.</para>
</refsect2>
<refsect2 id="GtkText|selection.delete" role="action"><title>The <literal>“selection.delete”</literal> action</title>
<indexterm zone="GtkText|selection.delete"><primary>GtkText|selection.delete</primary></indexterm>
<para>Deletes the current selection.</para>
</refsect2>
<refsect2 id="GtkText|clipboard.paste" role="action"><title>The <literal>“clipboard.paste”</literal> action</title>
<indexterm zone="GtkText|clipboard.paste"><primary>GtkText|clipboard.paste</primary></indexterm>
<para>Inserts the contents of the clipboard into the widget.</para>
</refsect2>
<refsect2 id="GtkText|clipboard.copy" role="action"><title>The <literal>“clipboard.copy”</literal> action</title>
<indexterm zone="GtkText|clipboard.copy"><primary>GtkText|clipboard.copy</primary></indexterm>
<para>Copies the contents to the clipboard.</para>
</refsect2>
<refsect2 id="GtkText|clipboard.cut" role="action"><title>The <literal>“clipboard.cut”</literal> action</title>
<indexterm zone="GtkText|clipboard.cut"><primary>GtkText|clipboard.cut</primary></indexterm>
<para>Copies the contents to the clipboard and deletes it from the widget.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkText.see-also">
<title>See Also</title>
<para><link linkend="GtkEntry"><type>GtkEntry</type></link>, <link linkend="GtkTextView"><type>GtkTextView</type></link></para>

</refsect1>

</refentry>
