1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A single line text entry field
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkEntry widget is a single line text entry
10 widget. A fairly large set of key bindings are supported
11 by default. If the entered text is longer than the allocation
12 of the widget, the widget will scroll so that the cursor
16 <!-- ##### SECTION See_Also ##### -->
21 <term>#GtkTextView</term>
22 <listitem><para>a widget for handling multi-line text entry.</para></listitem>
28 <!-- ##### SECTION Stability_Level ##### -->
31 <!-- ##### STRUCT GtkEntry ##### -->
33 The #GtkEntry-struct struct contains only private data.
37 <!-- ##### SIGNAL GtkEntry::activate ##### -->
42 @entry: the object which received the signal.
44 <!-- ##### SIGNAL GtkEntry::backspace ##### -->
49 @entry: the object which received the signal.
51 <!-- ##### SIGNAL GtkEntry::copy-clipboard ##### -->
56 @entry: the object which received the signal.
58 <!-- ##### SIGNAL GtkEntry::cut-clipboard ##### -->
63 @entry: the object which received the signal.
65 <!-- ##### SIGNAL GtkEntry::delete-from-cursor ##### -->
70 @entry: the object which received the signal.
74 <!-- ##### SIGNAL GtkEntry::insert-at-cursor ##### -->
79 @entry: the object which received the signal.
82 <!-- ##### SIGNAL GtkEntry::move-cursor ##### -->
87 @entry: the object which received the signal.
92 <!-- ##### SIGNAL GtkEntry::paste-clipboard ##### -->
97 @entry: the object which received the signal.
99 <!-- ##### SIGNAL GtkEntry::populate-popup ##### -->
104 @entry: the object which received the signal.
107 <!-- ##### SIGNAL GtkEntry::toggle-overwrite ##### -->
112 @entry: the object which received the signal.
114 <!-- ##### ARG GtkEntry:activates-default ##### -->
119 <!-- ##### ARG GtkEntry:cursor-position ##### -->
124 <!-- ##### ARG GtkEntry:editable ##### -->
129 <!-- ##### ARG GtkEntry:has-frame ##### -->
134 <!-- ##### ARG GtkEntry:inner-border ##### -->
139 <!-- ##### ARG GtkEntry:invisible-char ##### -->
144 <!-- ##### ARG GtkEntry:max-length ##### -->
149 <!-- ##### ARG GtkEntry:scroll-offset ##### -->
154 <!-- ##### ARG GtkEntry:selection-bound ##### -->
159 <!-- ##### ARG GtkEntry:shadow-type ##### -->
164 <!-- ##### ARG GtkEntry:text ##### -->
169 <!-- ##### ARG GtkEntry:truncate-multiline ##### -->
174 <!-- ##### ARG GtkEntry:visibility ##### -->
179 <!-- ##### ARG GtkEntry:width-chars ##### -->
184 <!-- ##### ARG GtkEntry:xalign ##### -->
190 Creates a new #GtkEntry widget.
193 <!-- ##### ARG GtkEntry:inner-border ##### -->
198 <!-- ##### FUNCTION gtk_entry_new ##### -->
206 <!-- ##### FUNCTION gtk_entry_new_with_max_length ##### -->
214 <!-- ##### FUNCTION gtk_entry_set_text ##### -->
216 Sets the text in the widget to the given
217 value, replacing the current contents.
224 <!-- ##### FUNCTION gtk_entry_append_text ##### -->
226 Appends the given text to the contents of the widget.
230 @text: the text to append.
231 @Deprecated: gtk_entry_append_text() is deprecated and should not
232 be used in newly-written code. Use gtk_editable_insert_text()
236 <!-- ##### FUNCTION gtk_entry_prepend_text ##### -->
238 Prepends the given text to the contents of the widget.
242 @text: the text to prepend.
243 @Deprecated: gtk_entry_prepend_text() is deprecated and should not
244 be used in newly-written code. Use gtk_editable_insert_text()
248 <!-- ##### FUNCTION gtk_entry_set_position ##### -->
250 Sets the cursor position in an entry to the given
251 value. This function is obsolete. You should use
252 gtk_editable_set_position() instead.
256 @position: the position of the cursor. The cursor is displayed
257 before the character with the given (base 0) index
258 in the widget. The value must be less than or
259 equal to the number of characters in the widget.
260 A value of -1 indicates that the position should
261 be set after the last character in the entry.
262 Note that this position is in characters, not in
266 <!-- ##### FUNCTION gtk_entry_get_text ##### -->
275 <!-- ##### FUNCTION gtk_entry_select_region ##### -->
277 Selects a region of text. The characters that
278 are selected are those characters at positions from
279 @start_pos up to, but not including @end_pos. If
280 @end_pos is negative, then the the characters selected
281 will be those characters from @start_pos to the end
282 of the text. This function is obsolete. You should
283 use gtk_editable_select_region() instead.
287 @start: the starting position.
288 @end: the end position.
291 <!-- ##### FUNCTION gtk_entry_set_visibility ##### -->
293 Sets whether the contents of the entry are visible or
294 not. When visibility is set to %FALSE, characters
295 are displayed as the invisible char, and will also appear
296 that way when the text in the entry widget is copied
300 The default invisible char is the asterisk '*', but it can
301 be changed with gtk_entry_set_invisible_char().
305 @visible: %TRUE if the contents of the entry are displayed
309 <!-- ##### FUNCTION gtk_entry_set_invisible_char ##### -->
318 <!-- ##### FUNCTION gtk_entry_set_editable ##### -->
320 Determines if the user can edit the text in the editable
321 widget or not. This function is obsolete. You should
322 use gtk_editable_set_editable() instead.
326 @editable: %TRUE if the user is allowed to edit the text
330 <!-- ##### FUNCTION gtk_entry_set_max_length ##### -->
338 <!-- ##### FUNCTION gtk_entry_get_activates_default ##### -->
347 <!-- ##### FUNCTION gtk_entry_get_has_frame ##### -->
356 <!-- ##### FUNCTION gtk_entry_get_inner_border ##### -->
365 <!-- ##### FUNCTION gtk_entry_get_width_chars ##### -->
374 <!-- ##### FUNCTION gtk_entry_set_activates_default ##### -->
383 <!-- ##### FUNCTION gtk_entry_set_has_frame ##### -->
392 <!-- ##### FUNCTION gtk_entry_set_inner_border ##### -->
401 <!-- ##### FUNCTION gtk_entry_set_width_chars ##### -->
410 <!-- ##### FUNCTION gtk_entry_get_invisible_char ##### -->
419 <!-- ##### FUNCTION gtk_entry_set_alignment ##### -->
428 <!-- ##### FUNCTION gtk_entry_get_alignment ##### -->
437 <!-- ##### FUNCTION gtk_entry_get_layout ##### -->
446 <!-- ##### FUNCTION gtk_entry_get_layout_offsets ##### -->
456 <!-- ##### FUNCTION gtk_entry_layout_index_to_text_index ##### -->
466 <!-- ##### FUNCTION gtk_entry_text_index_to_layout_index ##### -->
476 <!-- ##### FUNCTION gtk_entry_get_max_length ##### -->
485 <!-- ##### FUNCTION gtk_entry_get_visibility ##### -->
494 <!-- ##### FUNCTION gtk_entry_set_completion ##### -->
503 <!-- ##### FUNCTION gtk_entry_get_completion ##### -->
512 <!-- ##### FUNCTION gtk_entry_set_cursor_hadjustment ##### -->
521 <!-- ##### FUNCTION gtk_entry_get_cursor_hadjustment ##### -->