27
27
<link linkend="GtkEntry-struct">GtkEntry</link>;
28
28
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gtk-entry-new">gtk_entry_new</link> (void);
29
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gtk-entry-new-with-buffer">gtk_entry_new_with_buffer</link> (<link linkend="GtkEntryBuffer">GtkEntryBuffer</link> *buffer);
29
30
<link linkend="GtkWidget">GtkWidget</link>* <link linkend="gtk-entry-new-with-max-length">gtk_entry_new_with_max_length</link> (<link linkend="gint">gint</link> max);
31
<link linkend="GtkEntryBuffer">GtkEntryBuffer</link>* <link linkend="gtk-entry-get-buffer">gtk_entry_get_buffer</link> (<link linkend="GtkEntry">GtkEntry</link> *entry);
32
<link linkend="void">void</link> <link linkend="gtk-entry-set-buffer">gtk_entry_set_buffer</link> (<link linkend="GtkEntry">GtkEntry</link> *entry,
33
<link linkend="GtkEntryBuffer">GtkEntryBuffer</link> *buffer);
30
34
<link linkend="void">void</link> <link linkend="gtk-entry-set-text">gtk_entry_set_text</link> (<link linkend="GtkEntry">GtkEntry</link> *entry,
31
35
const <link linkend="gchar">gchar</link> *text);
32
36
<link linkend="void">void</link> <link linkend="gtk-entry-append-text">gtk_entry_append_text</link> (<link linkend="GtkEntry">GtkEntry</link> *entry,
174
178
<title role="properties.title">Properties</title>
176
180
"<link linkend="GtkEntry--activates-default">activates-default</link>" <link linkend="gboolean">gboolean</link> : Read / Write
181
"<link linkend="GtkEntry--buffer">buffer</link>" <link linkend="GtkEntryBuffer">GtkEntryBuffer</link>* : Read / Write / Construct
177
182
"<link linkend="GtkEntry--caps-lock-warning">caps-lock-warning</link>" <link linkend="gboolean">gboolean</link> : Read / Write
178
183
"<link linkend="GtkEntry--cursor-position">cursor-position</link>" <link linkend="gint">gint</link> : Read
179
184
"<link linkend="GtkEntry--editable">editable</link>" <link linkend="gboolean">gboolean</link> : Read / Write
221
226
"<link linkend="GtkEntry--s-icon-prelight">icon-prelight</link>" <link linkend="gboolean">gboolean</link> : Read
222
227
"<link linkend="GtkEntry--s-inner-border">inner-border</link>" <link linkend="GtkBorder">GtkBorder</link>* : Read
228
"<link linkend="GtkEntry--s-invisible-char">invisible-char</link>" <link linkend="guint">guint</link> : Read
223
229
"<link linkend="GtkEntry--s-progress-border">progress-border</link>" <link linkend="GtkBorder">GtkBorder</link>* : Read
224
230
"<link linkend="GtkEntry--s-state-hint">state-hint</link>" <link linkend="gboolean">gboolean</link> : Read
307
313
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkEntry"><type>GtkEntry</type></link>.
308
314
</simpara></listitem></varlistentry>
309
315
</variablelist></refsect2>
316
<refsect2 id="gtk-entry-new-with-buffer" role="function" condition="since:2.18">
317
<title>gtk_entry_new_with_buffer ()</title>
318
<indexterm zone="gtk-entry-new-with-buffer" role="2.18"><primary sortas="entry_new_with_buffer">gtk_entry_new_with_buffer</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gtk_entry_new_with_buffer (<link linkend="GtkEntryBuffer">GtkEntryBuffer</link> *buffer);</programlisting>
320
Creates a new entry with the specified text buffer.</para>
322
</para><variablelist role="params">
323
<varlistentry><term><parameter>buffer</parameter> :</term>
324
<listitem><simpara> The buffer to use for the new <link linkend="GtkEntry"><type>GtkEntry</type></link>.
325
</simpara></listitem></varlistentry>
326
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a new <link linkend="GtkEntry"><type>GtkEntry</type></link>
328
</simpara></listitem></varlistentry>
329
</variablelist><para role="since">Since 2.18</para></refsect2>
310
330
<refsect2 id="gtk-entry-new-with-max-length" role="function" condition="deprecated:Use gtk_entry_set_max_length() instead.">
311
331
<title>gtk_entry_new_with_max_length ()</title>
312
332
<indexterm zone="gtk-entry-new-with-max-length" role="deprecated"><primary sortas="entry_new_with_max_length">gtk_entry_new_with_max_length</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>* gtk_entry_new_with_max_length (<link linkend="gint">gint</link> max);</programlisting>
325
345
</simpara></listitem></varlistentry>
326
346
</variablelist></refsect2>
347
<refsect2 id="gtk-entry-get-buffer" role="function" condition="since:2.18">
348
<title>gtk_entry_get_buffer ()</title>
349
<indexterm zone="gtk-entry-get-buffer" role="2.18"><primary sortas="entry_get_buffer">gtk_entry_get_buffer</primary></indexterm><programlisting><link linkend="GtkEntryBuffer">GtkEntryBuffer</link>* gtk_entry_get_buffer (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
351
Get the <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object which holds the text for
354
</para><variablelist role="params">
355
<varlistentry><term><parameter>entry</parameter> :</term>
356
<listitem><simpara> a <link linkend="GtkEntry"><type>GtkEntry</type></link>
357
</simpara></listitem></varlistentry>
358
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object.
359
</simpara></listitem></varlistentry>
360
</variablelist><para role="since">Since 2.18</para></refsect2>
361
<refsect2 id="gtk-entry-set-buffer" role="function" condition="since:2.18">
362
<title>gtk_entry_set_buffer ()</title>
363
<indexterm zone="gtk-entry-set-buffer" role="2.18"><primary sortas="entry_set_buffer">gtk_entry_set_buffer</primary></indexterm><programlisting><link linkend="void">void</link> gtk_entry_set_buffer (<link linkend="GtkEntry">GtkEntry</link> *entry,
364
<link linkend="GtkEntryBuffer">GtkEntryBuffer</link> *buffer);</programlisting>
366
Set the <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link> object which holds the text for
369
</para><variablelist role="params">
370
<varlistentry><term><parameter>entry</parameter> :</term>
371
<listitem><simpara> a <link linkend="GtkEntry"><type>GtkEntry</type></link>
372
</simpara></listitem></varlistentry>
373
<varlistentry><term><parameter>buffer</parameter> :</term>
374
<listitem><simpara> a <link linkend="GtkEntryBuffer"><type>GtkEntryBuffer</type></link>
375
</simpara></listitem></varlistentry>
376
</variablelist><para role="since">Since 2.18</para></refsect2>
327
377
<refsect2 id="gtk-entry-set-text" role="function">
328
378
<title>gtk_entry_set_text ()</title>
329
379
<indexterm zone="gtk-entry-set-text"><primary sortas="entry_set_text">gtk_entry_set_text</primary></indexterm><programlisting><link linkend="void">void</link> gtk_entry_set_text (<link linkend="GtkEntry">GtkEntry</link> *entry,
330
380
const <link linkend="gchar">gchar</link> *text);</programlisting>
332
382
Sets the text in the widget to the given
333
value, replacing the current contents.</para>
383
value, replacing the current contents.
386
See <link linkend="gtk-entry-buffer-set-text"><function>gtk_entry_buffer_set_text()</function></link>.</para>
335
388
</para><variablelist role="params">
336
389
<varlistentry><term><parameter>entry</parameter> :</term>
398
451
<indexterm zone="gtk-entry-get-text"><primary sortas="entry_get_text">gtk_entry_get_text</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gtk_entry_get_text (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
400
453
Retrieves the contents of the entry widget.
401
See also <link linkend="gtk-editable-get-chars"><function>gtk_editable_get_chars()</function></link>.</para>
454
See also <link linkend="gtk-editable-get-chars"><function>gtk_editable_get_chars()</function></link>.
457
This is equivalent to:
460
<informalexample><programlisting>
461
gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
462
</programlisting></informalexample></para>
403
464
</para><variablelist role="params">
404
465
<varlistentry><term><parameter>entry</parameter> :</term>
415
476
<indexterm zone="gtk-entry-get-text-length" role="2.14"><primary sortas="entry_get_text_length">gtk_entry_get_text_length</primary></indexterm><programlisting><link linkend="guint16">guint16</link> gtk_entry_get_text_length (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
417
478
Retrieves the current length of the text in
418
<parameter>entry</parameter>.</para>
479
<parameter>entry</parameter>.
482
This is equivalent to:
485
<informalexample><programlisting>
486
gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
487
</programlisting></informalexample></para>
420
489
</para><variablelist role="params">
421
490
<varlistentry><term><parameter>entry</parameter> :</term>
534
603
Sets the maximum allowed length of the contents of the widget. If
535
604
the current contents are longer than the given length, then they
536
will be truncated to fit.</para>
605
will be truncated to fit.
608
This is equivalent to:
611
<informalexample><programlisting>
612
gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
613
</programlisting></informalexample></para>
538
615
</para><variablelist role="params">
539
616
<varlistentry><term><parameter>entry</parameter> :</term>
864
941
<indexterm zone="gtk-entry-get-max-length"><primary sortas="entry_get_max_length">gtk_entry_get_max_length</primary></indexterm><programlisting><link linkend="gint">gint</link> gtk_entry_get_max_length (<link linkend="GtkEntry">GtkEntry</link> *entry);</programlisting>
866
943
Retrieves the maximum allowed length of the text in
867
<parameter>entry</parameter>. See <link linkend="gtk-entry-set-max-length"><function>gtk_entry_set_max_length()</function></link>.</para>
944
<parameter>entry</parameter>. See <link linkend="gtk-entry-set-max-length"><function>gtk_entry_set_max_length()</function></link>.
947
This is equivalent to:
950
<informalexample><programlisting>
951
gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
952
</programlisting></informalexample></para>
869
954
</para><variablelist role="params">
870
955
<varlistentry><term><parameter>entry</parameter> :</term>
1522
1607
<indexterm zone="GtkEntry--activates-default"><primary sortas="Entry:activates-default">GtkEntry:activates-default</primary></indexterm><programlisting> "activates-default" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
1523
1608
<para>Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.</para><para>Default value: FALSE</para>
1610
<refsect2 id="GtkEntry--buffer" role="property"><title>The <literal>"buffer"</literal> property</title>
1611
<indexterm zone="GtkEntry--buffer"><primary sortas="Entry:buffer">GtkEntry:buffer</primary></indexterm><programlisting> "buffer" <link linkend="GtkEntryBuffer">GtkEntryBuffer</link>* : Read / Write / Construct</programlisting>
1612
<para>Text buffer object which actually stores entry text.</para></refsect2>
1525
1613
<refsect2 id="GtkEntry--caps-lock-warning" role="property"><title>The <literal>"caps-lock-warning"</literal> property</title>
1526
1614
<indexterm zone="GtkEntry--caps-lock-warning" role="2.16"><primary sortas="Entry:caps-lock-warning">GtkEntry:caps-lock-warning</primary></indexterm><programlisting> "caps-lock-warning" <link linkend="gboolean">gboolean</link> : Read / Write</programlisting>
1883
1971
</para><para>Since 2.10</para>
1973
<refsect2 id="GtkEntry--s-invisible-char" role="property"><title>The <literal>"invisible-char"</literal> style property</title>
1974
<indexterm zone="GtkEntry--s-invisible-char"><primary sortas="Entry:invisible-char">GtkEntry:invisible-char</primary></indexterm><programlisting> "invisible-char" <link linkend="guint">guint</link> : Read</programlisting>
1975
<para>The character to use when masking entry contents (in "password mode").</para><para>Default value: 0</para>
1885
1977
<refsect2 id="GtkEntry--s-progress-border" role="property"><title>The <literal>"progress-border"</literal> style property</title>
1886
1978
<indexterm zone="GtkEntry--s-progress-border"><primary sortas="Entry:progress-border">GtkEntry:progress-border</primary></indexterm><programlisting> "progress-border" <link linkend="GtkBorder">GtkBorder</link>* : Read</programlisting>
1887
1979
<para>Border around the progress bar.</para></refsect2>