]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkentry.sgml
2.11.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtkentry.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkEntry
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A single line text entry field
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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
13 position is visible. 
14 </para>
15
16 <!-- ##### SECTION See_Also ##### -->
17 <para>
18 <variablelist>
19
20 <varlistentry>
21 <term>#GtkTextView</term>
22 <listitem><para>a widget for handling multi-line text entry.</para></listitem>
23 </varlistentry>
24
25 </variablelist>
26 </para>
27
28 <!-- ##### SECTION Stability_Level ##### -->
29
30
31 <!-- ##### STRUCT GtkEntry ##### -->
32 <para>
33 The #GtkEntry-struct struct contains only private data.
34 </para>
35
36
37 <!-- ##### SIGNAL GtkEntry::activate ##### -->
38 <para>
39
40 </para>
41
42 @entry: the object which received the signal.
43
44 <!-- ##### SIGNAL GtkEntry::backspace ##### -->
45 <para>
46
47 </para>
48
49 @entry: the object which received the signal.
50
51 <!-- ##### SIGNAL GtkEntry::copy-clipboard ##### -->
52 <para>
53
54 </para>
55
56 @entry: the object which received the signal.
57
58 <!-- ##### SIGNAL GtkEntry::cut-clipboard ##### -->
59 <para>
60
61 </para>
62
63 @entry: the object which received the signal.
64
65 <!-- ##### SIGNAL GtkEntry::delete-from-cursor ##### -->
66 <para>
67
68 </para>
69
70 @entry: the object which received the signal.
71 @arg1: 
72 @arg2: 
73
74 <!-- ##### SIGNAL GtkEntry::insert-at-cursor ##### -->
75 <para>
76
77 </para>
78
79 @entry: the object which received the signal.
80 @arg1: 
81
82 <!-- ##### SIGNAL GtkEntry::move-cursor ##### -->
83 <para>
84
85 </para>
86
87 @entry: the object which received the signal.
88 @arg1: 
89 @arg2: 
90 @arg3: 
91
92 <!-- ##### SIGNAL GtkEntry::paste-clipboard ##### -->
93 <para>
94
95 </para>
96
97 @entry: the object which received the signal.
98
99 <!-- ##### SIGNAL GtkEntry::populate-popup ##### -->
100 <para>
101
102 </para>
103
104 @entry: the object which received the signal.
105 @arg1: 
106
107 <!-- ##### SIGNAL GtkEntry::toggle-overwrite ##### -->
108 <para>
109
110 </para>
111
112 @entry: the object which received the signal.
113
114 <!-- ##### ARG GtkEntry:activates-default ##### -->
115 <para>
116
117 </para>
118
119 <!-- ##### ARG GtkEntry:cursor-position ##### -->
120 <para>
121
122 </para>
123
124 <!-- ##### ARG GtkEntry:editable ##### -->
125 <para>
126
127 </para>
128
129 <!-- ##### ARG GtkEntry:has-frame ##### -->
130 <para>
131
132 </para>
133
134 <!-- ##### ARG GtkEntry:inner-border ##### -->
135 <para>
136
137 </para>
138
139 <!-- ##### ARG GtkEntry:invisible-char ##### -->
140 <para>
141
142 </para>
143
144 <!-- ##### ARG GtkEntry:max-length ##### -->
145 <para>
146
147 </para>
148
149 <!-- ##### ARG GtkEntry:scroll-offset ##### -->
150 <para>
151
152 </para>
153
154 <!-- ##### ARG GtkEntry:selection-bound ##### -->
155 <para>
156
157 </para>
158
159 <!-- ##### ARG GtkEntry:shadow-type ##### -->
160 <para>
161
162 </para>
163
164 <!-- ##### ARG GtkEntry:text ##### -->
165 <para>
166
167 </para>
168
169 <!-- ##### ARG GtkEntry:truncate-multiline ##### -->
170 <para>
171
172 </para>
173
174 <!-- ##### ARG GtkEntry:visibility ##### -->
175 <para>
176
177 </para>
178
179 <!-- ##### ARG GtkEntry:width-chars ##### -->
180 <para>
181
182 </para>
183
184 <!-- ##### ARG GtkEntry:xalign ##### -->
185 <para>
186
187 </para>
188
189 <para>
190 Creates a new #GtkEntry widget.
191 </para>
192
193 <!-- ##### ARG GtkEntry:inner-border ##### -->
194 <para>
195
196 </para>
197
198 <!-- ##### FUNCTION gtk_entry_new ##### -->
199 <para>
200
201 </para>
202
203 @Returns: 
204
205
206 <!-- ##### FUNCTION gtk_entry_new_with_max_length ##### -->
207 <para>
208 </para>
209
210 @max: 
211 @Returns: 
212
213
214 <!-- ##### FUNCTION gtk_entry_set_text ##### -->
215 <para>
216 Sets the text in the widget to the given
217 value, replacing the current contents.
218 </para>
219
220 @entry: a #GtkEntry.
221 @text: the new text.
222
223
224 <!-- ##### FUNCTION gtk_entry_append_text ##### -->
225 <para>
226 Appends the given text to the contents of the widget.
227 </para>
228
229 @entry: a #GtkEntry.
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()
233    instead.
234
235
236 <!-- ##### FUNCTION gtk_entry_prepend_text ##### -->
237 <para>
238 Prepends the given text to the contents of the widget.
239 </para>
240
241 @entry: a #GtkEntry.
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()
245    instead.
246
247
248 <!-- ##### FUNCTION gtk_entry_set_position ##### -->
249 <para>
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.
253 </para>
254
255 @entry: a #GtkEntry.
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
263            bytes.
264
265
266 <!-- ##### FUNCTION gtk_entry_get_text ##### -->
267 <para>
268
269 </para>
270
271 @entry: 
272 @Returns: 
273
274
275 <!-- ##### FUNCTION gtk_entry_select_region ##### -->
276 <para>
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.
284 </para>
285
286 @entry: a #GtkEntry.
287 @start: the starting position.
288 @end: the end position.
289
290
291 <!-- ##### FUNCTION gtk_entry_set_visibility ##### -->
292 <para>
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
297 elsewhere.
298 </para>
299 <para>
300 The default invisible char is the asterisk '*', but it can
301 be changed with gtk_entry_set_invisible_char().
302 </para>
303
304 @entry: a #GtkEntry.
305 @visible: %TRUE if the contents of the entry are displayed
306           as plaintext.
307
308
309 <!-- ##### FUNCTION gtk_entry_set_invisible_char ##### -->
310 <para>
311
312 </para>
313
314 @entry: 
315 @ch: 
316
317
318 <!-- ##### FUNCTION gtk_entry_set_editable ##### -->
319 <para>
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.
323 </para>
324
325 @entry: a #GtkEntry.
326 @editable: %TRUE if the user is allowed to edit the text
327   in the widget.
328
329
330 <!-- ##### FUNCTION gtk_entry_set_max_length ##### -->
331 <para>
332 </para>
333
334 @entry: 
335 @max: 
336
337
338 <!-- ##### FUNCTION gtk_entry_get_activates_default ##### -->
339 <para>
340
341 </para>
342
343 @entry: 
344 @Returns: 
345
346
347 <!-- ##### FUNCTION gtk_entry_get_has_frame ##### -->
348 <para>
349
350 </para>
351
352 @entry: 
353 @Returns: 
354
355
356 <!-- ##### FUNCTION gtk_entry_get_inner_border ##### -->
357 <para>
358
359 </para>
360
361 @entry: 
362 @Returns: 
363
364
365 <!-- ##### FUNCTION gtk_entry_get_width_chars ##### -->
366 <para>
367
368 </para>
369
370 @entry: 
371 @Returns: 
372
373
374 <!-- ##### FUNCTION gtk_entry_set_activates_default ##### -->
375 <para>
376
377 </para>
378
379 @entry: 
380 @setting: 
381
382
383 <!-- ##### FUNCTION gtk_entry_set_has_frame ##### -->
384 <para>
385
386 </para>
387
388 @entry: 
389 @setting: 
390
391
392 <!-- ##### FUNCTION gtk_entry_set_inner_border ##### -->
393 <para>
394
395 </para>
396
397 @entry: 
398 @border: 
399
400
401 <!-- ##### FUNCTION gtk_entry_set_width_chars ##### -->
402 <para>
403
404 </para>
405
406 @entry: 
407 @n_chars: 
408
409
410 <!-- ##### FUNCTION gtk_entry_get_invisible_char ##### -->
411 <para>
412
413 </para>
414
415 @entry: 
416 @Returns: 
417
418
419 <!-- ##### FUNCTION gtk_entry_set_alignment ##### -->
420 <para>
421
422 </para>
423
424 @entry: 
425 @xalign: 
426
427
428 <!-- ##### FUNCTION gtk_entry_get_alignment ##### -->
429 <para>
430
431 </para>
432
433 @entry: 
434 @Returns: 
435
436
437 <!-- ##### FUNCTION gtk_entry_get_layout ##### -->
438 <para>
439
440 </para>
441
442 @entry: 
443 @Returns: 
444
445
446 <!-- ##### FUNCTION gtk_entry_get_layout_offsets ##### -->
447 <para>
448
449 </para>
450
451 @entry: 
452 @x: 
453 @y: 
454
455
456 <!-- ##### FUNCTION gtk_entry_layout_index_to_text_index ##### -->
457 <para>
458
459 </para>
460
461 @entry: 
462 @layout_index: 
463 @Returns: 
464
465
466 <!-- ##### FUNCTION gtk_entry_text_index_to_layout_index ##### -->
467 <para>
468
469 </para>
470
471 @entry: 
472 @text_index: 
473 @Returns: 
474
475
476 <!-- ##### FUNCTION gtk_entry_get_max_length ##### -->
477 <para>
478
479 </para>
480
481 @entry: 
482 @Returns: 
483
484
485 <!-- ##### FUNCTION gtk_entry_get_visibility ##### -->
486 <para>
487
488 </para>
489
490 @entry: 
491 @Returns: 
492
493
494 <!-- ##### FUNCTION gtk_entry_set_completion ##### -->
495 <para>
496
497 </para>
498
499 @entry: 
500 @completion: 
501
502
503 <!-- ##### FUNCTION gtk_entry_get_completion ##### -->
504 <para>
505
506 </para>
507
508 @entry: 
509 @Returns: 
510
511
512 <!-- ##### FUNCTION gtk_entry_set_cursor_hadjustment ##### -->
513 <para>
514
515 </para>
516
517 @entry: 
518 @adjustment: 
519
520
521 <!-- ##### FUNCTION gtk_entry_get_cursor_hadjustment ##### -->
522 <para>
523
524 </para>
525
526 @entry: 
527 @Returns: 
528
529