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 ##### -->
22 <listitem><para>a widget for handling multi-line text entry.</para></listitem>
28 <!-- ##### STRUCT GtkEntry ##### -->
30 The #GtkEntry-struct struct contains only private data.
34 <!-- ##### FUNCTION gtk_entry_new ##### -->
36 Creates a new #GtkEntry widget.
39 @Returns: a new #GtkEntry.
42 <!-- ##### FUNCTION gtk_entry_new_with_max_length ##### -->
50 <!-- ##### FUNCTION gtk_entry_set_text ##### -->
52 Sets the text in the widget to the given
53 value, replacing the current contents.
60 <!-- ##### FUNCTION gtk_entry_append_text ##### -->
62 Appends the given text to the contents of the widget.
66 @text: the text to append.
69 <!-- ##### FUNCTION gtk_entry_prepend_text ##### -->
71 Prepends the given text to the contents of th ewidget.
75 @text: the text to prepend.
78 <!-- ##### FUNCTION gtk_entry_set_position ##### -->
80 Sets the cursor position in an entry to the given
81 value. This function is obsolete. You should use
82 gtk_editable_set_position() instead.
86 @position: the position of the cursor. The cursor is displayed
87 before the character with the given (base 0) index
88 in the widget. The value must be less than or
89 equal to the number of characters in the widget.
90 A value of -1 indicates that the position should
91 be set after the last character in the entry.
92 Note that this position is in characters, not in
96 <!-- ##### FUNCTION gtk_entry_get_text ##### -->
98 Retrieve the contents of the entry widget. The returned
99 pointer points to internally allocated storage in the
100 widget and must not be freed, modified or stored.
101 See also gtk_editable_get_chars().
105 @Returns: the pointer the the contents of the text widget as a
109 <!-- ##### FUNCTION gtk_entry_select_region ##### -->
111 Selects a region of text. The characters that
112 are selected are those characters at positions from
113 @start_pos up to, but not including @end_pos. If
114 @end_pos is negative, then the the characters selected
115 will be those characters from @start_pos to the end
116 of the text. This function is obsolete. You should
117 use gtk_editable_select_region() instead.
121 @start: the starting position.
122 @end: the end position.
125 <!-- ##### FUNCTION gtk_entry_set_visibility ##### -->
127 Sets whether the contents of the entry are visible or
128 not. When visibility is set to %FALSE, characters
129 are displayed as the invisible char, and will also appear
130 that way when the text in the entry widget is copied
134 The default invisible char is the asterisk '*', but it can
135 be changed with gtk_entry_set_invisible_char().
139 @visible: %TRUE if the contents of the entry are displayed
143 <!-- ##### FUNCTION gtk_entry_set_invisible_char ##### -->
152 <!-- ##### FUNCTION gtk_entry_set_editable ##### -->
154 Determines if the user can edit the text in the editable
155 widget or not. This function is obsolete. You should
156 use gtk_editable_set_editable() instead.
160 @editable: %TRUE if the user is allowed to edit the text
164 <!-- ##### FUNCTION gtk_entry_set_max_length ##### -->
172 <!-- ##### FUNCTION gtk_entry_get_activates_default ##### -->
181 <!-- ##### FUNCTION gtk_entry_get_has_frame ##### -->
190 <!-- ##### FUNCTION gtk_entry_get_width_chars ##### -->
199 <!-- ##### FUNCTION gtk_entry_set_activates_default ##### -->
208 <!-- ##### FUNCTION gtk_entry_set_has_frame ##### -->
217 <!-- ##### FUNCTION gtk_entry_set_width_chars ##### -->
226 <!-- ##### FUNCTION gtk_entry_get_invisible_char ##### -->
235 <!-- ##### FUNCTION gtk_entry_get_layout ##### -->
244 <!-- ##### FUNCTION gtk_entry_get_layout_offsets ##### -->
254 <!-- ##### FUNCTION gtk_entry_get_max_length ##### -->
263 <!-- ##### FUNCTION gtk_entry_get_visibility ##### -->
272 <!-- ##### SIGNAL GtkEntry::activate ##### -->
277 @entry: the object which received the signal.
279 <!-- ##### SIGNAL GtkEntry::copy-clipboard ##### -->
284 @entry: the object which received the signal.
286 <!-- ##### SIGNAL GtkEntry::cut-clipboard ##### -->
291 @entry: the object which received the signal.
293 <!-- ##### SIGNAL GtkEntry::delete-from-cursor ##### -->
298 @entry: the object which received the signal.
302 <!-- ##### SIGNAL GtkEntry::insert-at-cursor ##### -->
307 @entry: the object which received the signal.
310 <!-- ##### SIGNAL GtkEntry::move-cursor ##### -->
315 @entry: the object which received the signal.
320 <!-- ##### SIGNAL GtkEntry::paste-clipboard ##### -->
325 @entry: the object which received the signal.
327 <!-- ##### SIGNAL GtkEntry::populate-popup ##### -->
332 @entry: the object which received the signal.
335 <!-- ##### SIGNAL GtkEntry::toggle-overwrite ##### -->
340 @entry: the object which received the signal.
342 <!-- ##### ARG GtkEntry:cursor-position ##### -->
347 <!-- ##### ARG GtkEntry:selection-bound ##### -->
352 <!-- ##### ARG GtkEntry:editable ##### -->
357 <!-- ##### ARG GtkEntry:max-length ##### -->
359 Determines the maximum allowed length of the contents
360 of the widget. See gtk_entry_set_max_length().
363 <!-- ##### ARG GtkEntry:visibility ##### -->
365 Determines whether the contents of the entry widget
366 are visible or not. See gtk_entry_set_visibility().
369 <!-- ##### ARG GtkEntry:has-frame ##### -->
374 <!-- ##### ARG GtkEntry:invisible-char ##### -->
379 <!-- ##### ARG GtkEntry:activates-default ##### -->
384 <!-- ##### ARG GtkEntry:width-chars ##### -->
389 <!-- ##### ARG GtkEntry:scroll-offset ##### -->
394 <!-- ##### ARG GtkEntry:text ##### -->