1Gtk2::Entry(3) User Contributed Perl Documentation Gtk2::Entry(3)
2
3
4
6 Gtk2::Entry - wrapper for GtkEntry
7
9 Glib::Object
10 +----Glib::InitiallyUnowned
11 +----Gtk2::Object
12 +----Gtk2::Widget
13 +----Gtk2::Entry
14
16 Glib::Object::_Unregistered::AtkImplementorIface
17 Gtk2::Buildable
18 Gtk2::Editable
19 Gtk2::CellEditable
20
22 widget = Gtk2::Entry->new
23 widget = Gtk2::Entry->new_with_buffer ($buffer)
24 · $buffer (Gtk2::EntryBuffer)
25
26 Since: gtk+ 2.18
27
28 widget = Gtk2::Entry->new_with_max_length ($max)
29 · $max (integer)
30
31 boolean = $entry->get_activates_default
32 $entry->set_activates_default ($setting)
33 · $setting (boolean)
34
35 double = $entry->get_alignment
36 Since: gtk+ 2.4
37
38 $entry->set_alignment ($xalign)
39 · $xalign (double)
40
41 Since: gtk+ 2.4
42
43 $entry->append_text ($text)
44 · $text (string)
45
46 entrybuffer = $entry->get_buffer
47 Since: gtk+ 2.18
48
49 $entry->set_buffer ($buffer)
50 · $buffer (Gtk2::EntryBuffer)
51
52 Since: gtk+ 2.18
53
54 entrycompletion or undef = $entry->get_completion
55 Since: gtk+ 2.4
56
57 $entry->set_completion ($completion)
58 · $completion (Gtk2::EntryCompletion or undef)
59
60 Since: gtk+ 2.4
61
62 integer = $entry->get_current_icon_drag_source
63 Since: gtk+ 2.16
64
65 adjustment or undef = $entry->get_cursor_hadjustment
66 Since: gtk+ 2.12
67
68 $entry->set_cursor_hadjustment ($adjustment)
69 · $adjustment (Gtk2::Adjustment or undef)
70
71 Since: gtk+ 2.12
72
73 $entry->set_editable ($editable)
74 · $editable (boolean)
75
76 boolean = $entry->get_has_frame
77 $entry->set_has_frame ($setting)
78 · $setting (boolean)
79
80 boolean = $entry->get_icon_activatable ($icon_pos)
81 · $icon_pos (Gtk2::EntryIconPosition)
82
83 Since: gtk+ 2.16
84
85 $entry->set_icon_activatable ($icon_pos, $activatable)
86 · $icon_pos (Gtk2::EntryIconPosition)
87
88 · $activatable (boolean)
89
90 Since: gtk+ 2.16
91
92 integer = $entry->get_icon_at_pos ($x, $y)
93 · $x (integer)
94
95 · $y (integer)
96
97 Since: gtk+ 2.16
98
99 $entry->set_icon_drag_source ($icon_pos, $target_list, $actions)
100 · $icon_pos (Gtk2::EntryIconPosition)
101
102 · $target_list (Gtk2::TargetList)
103
104 · $actions (Gtk2::Gdk::DragAction)
105
106 Since: gtk+ 2.16
107
108 $entry->set_icon_from_icon_name ($icon_pos, $icon_name)
109 · $icon_pos (Gtk2::EntryIconPosition)
110
111 · $icon_name (string or undef)
112
113 Since: gtk+ 2.16
114
115 $entry->set_icon_from_pixbuf ($icon_pos, $pixbuf)
116 · $icon_pos (Gtk2::EntryIconPosition)
117
118 · $pixbuf (Gtk2::Gdk::Pixbuf or undef)
119
120 Since: gtk+ 2.16
121
122 $entry->set_icon_from_stock ($icon_pos, $stock_id)
123 · $icon_pos (Gtk2::EntryIconPosition)
124
125 · $stock_id (string or undef)
126
127 Since: gtk+ 2.16
128
129 string or undef = $entry->get_icon_name ($icon_pos)
130 · $icon_pos (Gtk2::EntryIconPosition)
131
132 Since: gtk+ 2.16
133
134 pixbuf or undef = $entry->get_icon_pixbuf ($icon_pos)
135 · $icon_pos (Gtk2::EntryIconPosition)
136
137 Since: gtk+ 2.16
138
139 boolean = $entry->get_icon_sensitive ($icon_pos)
140 · $icon_pos (Gtk2::EntryIconPosition)
141
142 Since: gtk+ 2.16
143
144 $entry->set_icon_sensitive ($icon_pos, $sensitive)
145 · $icon_pos (Gtk2::EntryIconPosition)
146
147 · $sensitive (boolean)
148
149 Since: gtk+ 2.16
150
151 string or undef = $entry->get_icon_stock ($icon_pos)
152 · $icon_pos (Gtk2::EntryIconPosition)
153
154 Since: gtk+ 2.16
155
156 imagetype = $entry->get_icon_storage_type ($icon_pos)
157 · $icon_pos (Gtk2::EntryIconPosition)
158
159 Since: gtk+ 2.16
160
161 string or undef = $entry->get_icon_tooltip_markup ($icon_pos)
162 · $icon_pos (Gtk2::EntryIconPosition)
163
164 Since: gtk+ 2.16
165
166 $entry->set_icon_tooltip_markup ($icon_pos, $tooltip)
167 · $icon_pos (Gtk2::EntryIconPosition)
168
169 · $tooltip (string or undef)
170
171 Since: gtk+ 2.16
172
173 string or undef = $entry->get_icon_tooltip_text ($icon_pos)
174 · $icon_pos (Gtk2::EntryIconPosition)
175
176 Since: gtk+ 2.16
177
178 $entry->set_icon_tooltip_text ($icon_pos, $tooltip)
179 · $icon_pos (Gtk2::EntryIconPosition)
180
181 · $tooltip (string or undef)
182
183 Since: gtk+ 2.16
184
185 window = $entry->get_icon_window ($icon_pos)
186 · $icon_pos (Gtk2::EntryIconPosition)
187
188 Since: gtk+ 2.20
189
190 boolean = $entry->im_context_filter_keypress ($event)
191 · $event (Gtk2::Gdk::Event)
192
193 Since: gtk+ 2.22
194
195 border or undef = $entry->get_inner_border
196 Since: gtk+ 2.10
197
198 $entry->set_inner_border ($border)
199 · $border (Gtk2::Border or undef)
200
201 Since: gtk+ 2.10
202
203 character = $entry->get_invisible_char
204 $entry->set_invisible_char ($ch)
205 · $ch (character)
206
207 layout = $entry->get_layout
208 integer = $entry->layout_index_to_text_index ($layout_index)
209 · $layout_index (integer)
210
211 Since: gtk+ 2.6
212
213 (x, y) = $entry->get_layout_offsets
214 integer = $entry->get_max_length
215 $entry->set_max_length ($max)
216 · $max (integer)
217
218 boolean = $entry->get_overwrite_mode
219 Since: gtk+ 2.14
220
221 $entry->set_overwrite_mode ($overwrite)
222 · $overwrite (boolean)
223
224 Since: gtk+ 2.14
225
226 $entry->set_position ($position)
227 · $position (integer)
228
229 $entry->prepend_text ($text)
230 · $text (string)
231
232 double = $entry->get_progress_fraction
233 Since: gtk+ 2.16
234
235 $entry->set_progress_fraction ($fraction)
236 · $fraction (double)
237
238 Since: gtk+ 2.16
239
240 $entry->progress_pulse
241 Since: gtk+ 2.16
242
243 double = $entry->get_progress_pulse_step
244 Since: gtk+ 2.16
245
246 $entry->set_progress_pulse_step ($fraction)
247 · $fraction (double)
248
249 Since: gtk+ 2.16
250
251 $entry->reset_im_context
252 Since: gtk+ 2.22
253
254 $entry->select_region ($start, $end)
255 · $start (integer)
256
257 · $end (integer)
258
259 string = $entry->get_text
260 integer = $entry->text_index_to_layout_index ($text_index)
261 · $text_index (integer)
262
263 Since: gtk+ 2.6
264
265 unsigned = $entry->get_text_length
266 Since: gtk+ 2.14
267
268 $entry->set_text ($text)
269 · $text (string)
270
271 window = $entry->get_text_window
272 Since: gtk+ 2.20
273
274 $entry->unset_invisible_char
275 Since: gtk+ 2.16
276
277 boolean = $entry->get_visibility
278 $entry->set_visibility ($visible)
279 · $visible (boolean)
280
281 integer = $entry->get_width_chars
282 $entry->set_width_chars ($n_chars)
283 · $n_chars (integer)
284
286 'activates-default' (boolean : default false : readable / writable /
287 private)
288 Whether to activate the default widget (such as the default button
289 in a dialog) when Enter is pressed
290
291 'buffer' (Gtk2::EntryBuffer : default undef : readable / writable /
292 construct / private)
293 Text buffer object which actually stores entry text
294
295 'caps-lock-warning' (boolean : default true : readable / writable /
296 private)
297 Whether password entries will show a warning when Caps Lock is on
298
299 'cursor-position' (integer : default 0 : readable / private)
300 The current position of the insertion cursor in chars
301
302 'editable' (boolean : default true : readable / writable / private)
303 Whether the entry contents can be edited
304
305 'has-frame' (boolean : default true : readable / writable / private)
306 FALSE removes outside bevel from entry
307
308 'im-module' (string : default undef : readable / writable / private)
309 Which IM module should be used
310
311 'inner-border' (Gtk2::Border : default undef : readable / writable /
312 private)
313 Border between text and frame. Overrides the inner-border style
314 property
315
316 'invisible-char' (Glib::UInt : default 42 "*" : readable / writable /
317 private)
318 The character to use when masking entry contents (in "password
319 mode")
320
321 'invisible-char-set' (boolean : default false : readable / writable /
322 private)
323 Whether the invisible char has been set
324
325 'max-length' (integer : default 0 : readable / writable / private)
326 Maximum number of characters for this entry. Zero if no maximum
327
328 'overwrite-mode' (boolean : default false : readable / writable /
329 private)
330 Whether new text overwrites existing text
331
332 'primary-icon-activatable' (boolean : default false : readable /
333 writable / private)
334 Whether the primary icon is activatable
335
336 'primary-icon-gicon' (Glib::Object::_Unregistered::GIcon : default
337 undef : readable / writable / private)
338 GIcon for primary icon
339
340 'primary-icon-name' (string : default undef : readable / writable /
341 private)
342 Icon name for primary icon
343
344 'primary-icon-pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable /
345 writable / private)
346 Primary pixbuf for the entry
347
348 'primary-icon-sensitive' (boolean : default true : readable / writable
349 / private)
350 Whether the primary icon is sensitive
351
352 'primary-icon-stock' (string : default undef : readable / writable /
353 private)
354 Stock ID for primary icon
355
356 'primary-icon-storage-type' (Gtk2::ImageType : default "empty" :
357 readable / private)
358 The representation being used for primary icon
359
360 'primary-icon-tooltip-markup' (string : default undef : readable /
361 writable / private)
362 The contents of the tooltip on the primary icon
363
364 'primary-icon-tooltip-text' (string : default undef : readable /
365 writable / private)
366 The contents of the tooltip on the primary icon
367
368 'progress-fraction' (double : default 0 : readable / writable /
369 private)
370 The current fraction of the task that's been completed
371
372 'progress-pulse-step' (double : default 0.1 : readable / writable /
373 private)
374 The fraction of total entry width to move the progress bouncing
375 block for each call to gtk_entry_progress_pulse()
376
377 'scroll-offset' (integer : default 0 : readable / private)
378 Number of pixels of the entry scrolled off the screen to the left
379
380 'secondary-icon-activatable' (boolean : default false : readable /
381 writable / private)
382 Whether the secondary icon is activatable
383
384 'secondary-icon-gicon' (Glib::Object::_Unregistered::GIcon : default
385 undef : readable / writable / private)
386 GIcon for secondary icon
387
388 'secondary-icon-name' (string : default undef : readable / writable /
389 private)
390 Icon name for secondary icon
391
392 'secondary-icon-pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable /
393 writable / private)
394 Secondary pixbuf for the entry
395
396 'secondary-icon-sensitive' (boolean : default true : readable /
397 writable / private)
398 Whether the secondary icon is sensitive
399
400 'secondary-icon-stock' (string : default undef : readable / writable /
401 private)
402 Stock ID for secondary icon
403
404 'secondary-icon-storage-type' (Gtk2::ImageType : default "empty" :
405 readable / private)
406 The representation being used for secondary icon
407
408 'secondary-icon-tooltip-markup' (string : default undef : readable /
409 writable / private)
410 The contents of the tooltip on the secondary icon
411
412 'secondary-icon-tooltip-text' (string : default undef : readable /
413 writable / private)
414 The contents of the tooltip on the secondary icon
415
416 'selection-bound' (integer : default 0 : readable / private)
417 The position of the opposite end of the selection from the cursor
418 in chars
419
420 'shadow-type' (Gtk2::ShadowType : default "in" : readable / writable /
421 private)
422 Which kind of shadow to draw around the entry when has-frame is set
423
424 'text' (string : default "" : readable / writable / private)
425 The contents of the entry
426
427 'text-length' (Glib::UInt : default 0 : readable / private)
428 Length of the text currently in the entry
429
430 'truncate-multiline' (boolean : default false : readable / writable /
431 private)
432 Whether to truncate multiline pastes to one line.
433
434 'visibility' (boolean : default true : readable / writable / private)
435 FALSE displays the "invisible char" instead of the actual text
436 (password mode)
437
438 'width-chars' (integer : default -1 : readable / writable / private)
439 Number of characters to leave space for in the entry
440
441 'xalign' (float : default 0 : readable / writable / private)
442 The horizontal alignment, from 0 (left) to 1 (right). Reversed for
443 RTL layouts.
444
446 'icon-prelight' (boolean : default true : readable / private)
447 Whether activatable icons should prelight when hovered
448
449 'inner-border' (Gtk2::Border : default undef : readable / private)
450 Border between text and frame.
451
452 'invisible-char' (Glib::UInt : default 0 "\0" : readable / private)
453 The character to use when masking entry contents (in "password
454 mode")
455
456 'progress-border' (Gtk2::Border : default undef : readable / private)
457 Border around the progress bar
458
459 'state-hint' (boolean : default false : readable / private)
460 Whether to pass a proper state when drawing shadow or background
461
463 activate (Gtk2::Entry)
464 backspace (Gtk2::Entry)
465 copy-clipboard (Gtk2::Entry)
466 cut-clipboard (Gtk2::Entry)
467 delete-from-cursor (Gtk2::Entry, Gtk2::DeleteType, integer)
468 icon-press (Gtk2::Entry, Gtk2::EntryIconPosition, Gtk2::Gdk::Event)
469 icon-release (Gtk2::Entry, Gtk2::EntryIconPosition, Gtk2::Gdk::Event)
470 insert-at-cursor (Gtk2::Entry, string)
471 move-cursor (Gtk2::Entry, Gtk2::MovementStep, integer, boolean)
472 paste-clipboard (Gtk2::Entry)
473 populate-popup (Gtk2::Entry, Gtk2::Menu)
474 preedit-changed (Gtk2::Entry, string)
475 toggle-overwrite (Gtk2::Entry)
476
478 enum Gtk2::DeleteType
479 · 'chars' / 'GTK_DELETE_CHARS'
480
481 · 'word-ends' / 'GTK_DELETE_WORD_ENDS'
482
483 · 'words' / 'GTK_DELETE_WORDS'
484
485 · 'display-lines' / 'GTK_DELETE_DISPLAY_LINES'
486
487 · 'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS'
488
489 · 'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS'
490
491 · 'paragraphs' / 'GTK_DELETE_PARAGRAPHS'
492
493 · 'whitespace' / 'GTK_DELETE_WHITESPACE'
494
495 enum Gtk2::EntryIconPosition
496 · 'primary' / 'GTK_ENTRY_ICON_PRIMARY'
497
498 · 'secondary' / 'GTK_ENTRY_ICON_SECONDARY'
499
500 flags Gtk2::Gdk::DragAction
501 · 'default' / 'GDK_ACTION_DEFAULT'
502
503 · 'copy' / 'GDK_ACTION_COPY'
504
505 · 'move' / 'GDK_ACTION_MOVE'
506
507 · 'link' / 'GDK_ACTION_LINK'
508
509 · 'private' / 'GDK_ACTION_PRIVATE'
510
511 · 'ask' / 'GDK_ACTION_ASK'
512
513 enum Gtk2::ImageType
514 · 'empty' / 'GTK_IMAGE_EMPTY'
515
516 · 'pixmap' / 'GTK_IMAGE_PIXMAP'
517
518 · 'image' / 'GTK_IMAGE_IMAGE'
519
520 · 'pixbuf' / 'GTK_IMAGE_PIXBUF'
521
522 · 'stock' / 'GTK_IMAGE_STOCK'
523
524 · 'icon-set' / 'GTK_IMAGE_ICON_SET'
525
526 · 'animation' / 'GTK_IMAGE_ANIMATION'
527
528 · 'icon-name' / 'GTK_IMAGE_ICON_NAME'
529
530 · 'gicon' / 'GTK_IMAGE_GICON'
531
532 enum Gtk2::MovementStep
533 · 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
534
535 · 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
536
537 · 'words' / 'GTK_MOVEMENT_WORDS'
538
539 · 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
540
541 · 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
542
543 · 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
544
545 · 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
546
547 · 'pages' / 'GTK_MOVEMENT_PAGES'
548
549 · 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
550
551 · 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
552
553 enum Gtk2::ShadowType
554 · 'none' / 'GTK_SHADOW_NONE'
555
556 · 'in' / 'GTK_SHADOW_IN'
557
558 · 'out' / 'GTK_SHADOW_OUT'
559
560 · 'etched-in' / 'GTK_SHADOW_ETCHED_IN'
561
562 · 'etched-out' / 'GTK_SHADOW_ETCHED_OUT'
563
565 Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget
566
568 Copyright (C) 2003-2011 by the gtk2-perl team.
569
570 This software is licensed under the LGPL. See Gtk2 for a full notice.
571
572
573
574perl v5.28.0 2018-07-18 Gtk2::Entry(3)