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 / static-nick / static-blurb)
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 / static-nick / static-blurb)
293 Text buffer object which actually stores entry text
294
295 'caps-lock-warning' (boolean : default true : readable / writable /
296 private / static-nick / static-blurb)
297 Whether password entries will show a warning when Caps Lock is on
298
299 'cursor-position' (integer : default 0 : readable / private / static-
300 nick / static-blurb)
301 The current position of the insertion cursor in chars
302
303 'editable' (boolean : default true : readable / writable / private /
304 static-nick / static-blurb)
305 Whether the entry contents can be edited
306
307 'has-frame' (boolean : default true : readable / writable / private /
308 static-nick / static-blurb)
309 FALSE removes outside bevel from entry
310
311 'im-module' (string : default undef : readable / writable / private /
312 static-nick / static-blurb)
313 Which IM module should be used
314
315 'inner-border' (Gtk2::Border : default undef : readable / writable /
316 private / static-nick / static-blurb)
317 Border between text and frame. Overrides the inner-border style
318 property
319
320 'invisible-char' (Glib::UInt : default 42 "*" : readable / writable /
321 private / static-nick / static-blurb)
322 The character to use when masking entry contents (in "password
323 mode")
324
325 'invisible-char-set' (boolean : default false : readable / writable /
326 private / static-nick / static-blurb)
327 Whether the invisible char has been set
328
329 'max-length' (integer : default 0 : readable / writable / private /
330 static-nick / static-blurb)
331 Maximum number of characters for this entry. Zero if no maximum
332
333 'overwrite-mode' (boolean : default false : readable / writable /
334 private / static-nick / static-blurb)
335 Whether new text overwrites existing text
336
337 'primary-icon-activatable' (boolean : default false : readable /
338 writable / private / static-nick / static-blurb)
339 Whether the primary icon is activatable
340
341 'primary-icon-gicon' (Glib::Object::_Unregistered::GIcon : default
342 undef : readable / writable / private / static-nick / static-blurb)
343 GIcon for primary icon
344
345 'primary-icon-name' (string : default undef : readable / writable /
346 private / static-nick / static-blurb)
347 Icon name for primary icon
348
349 'primary-icon-pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable /
350 writable / private / static-nick / static-blurb)
351 Primary pixbuf for the entry
352
353 'primary-icon-sensitive' (boolean : default true : readable / writable
354 / private / static-nick / static-blurb)
355 Whether the primary icon is sensitive
356
357 'primary-icon-stock' (string : default undef : readable / writable /
358 private / static-nick / static-blurb)
359 Stock ID for primary icon
360
361 'primary-icon-storage-type' (Gtk2::ImageType : default "empty" :
362 readable / private / static-nick / static-blurb)
363 The representation being used for primary icon
364
365 'primary-icon-tooltip-markup' (string : default undef : readable /
366 writable / private / static-nick / static-blurb)
367 The contents of the tooltip on the primary icon
368
369 'primary-icon-tooltip-text' (string : default undef : readable /
370 writable / private / static-nick / static-blurb)
371 The contents of the tooltip on the primary icon
372
373 'progress-fraction' (double : default 0 : readable / writable / private
374 / static-nick / static-blurb)
375 The current fraction of the task that's been completed
376
377 'progress-pulse-step' (double : default 0.1 : readable / writable /
378 private / static-nick / static-blurb)
379 The fraction of total entry width to move the progress bouncing
380 block for each call to gtk_entry_progress_pulse()
381
382 'scroll-offset' (integer : default 0 : readable / private / static-nick
383 / static-blurb)
384 Number of pixels of the entry scrolled off the screen to the left
385
386 'secondary-icon-activatable' (boolean : default false : readable /
387 writable / private / static-nick / static-blurb)
388 Whether the secondary icon is activatable
389
390 'secondary-icon-gicon' (Glib::Object::_Unregistered::GIcon : default
391 undef : readable / writable / private / static-nick / static-blurb)
392 GIcon for secondary icon
393
394 'secondary-icon-name' (string : default undef : readable / writable /
395 private / static-nick / static-blurb)
396 Icon name for secondary icon
397
398 'secondary-icon-pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable /
399 writable / private / static-nick / static-blurb)
400 Secondary pixbuf for the entry
401
402 'secondary-icon-sensitive' (boolean : default true : readable /
403 writable / private / static-nick / static-blurb)
404 Whether the secondary icon is sensitive
405
406 'secondary-icon-stock' (string : default undef : readable / writable /
407 private / static-nick / static-blurb)
408 Stock ID for secondary icon
409
410 'secondary-icon-storage-type' (Gtk2::ImageType : default "empty" :
411 readable / private / static-nick / static-blurb)
412 The representation being used for secondary icon
413
414 'secondary-icon-tooltip-markup' (string : default undef : readable /
415 writable / private / static-nick / static-blurb)
416 The contents of the tooltip on the secondary icon
417
418 'secondary-icon-tooltip-text' (string : default undef : readable /
419 writable / private / static-nick / static-blurb)
420 The contents of the tooltip on the secondary icon
421
422 'selection-bound' (integer : default 0 : readable / private / static-
423 nick / static-blurb)
424 The position of the opposite end of the selection from the cursor
425 in chars
426
427 'shadow-type' (Gtk2::ShadowType : default "in" : readable / writable /
428 private / static-nick / static-blurb)
429 Which kind of shadow to draw around the entry when has-frame is set
430
431 'text' (string : default "" : readable / writable / private / static-
432 nick / static-blurb)
433 The contents of the entry
434
435 'text-length' (Glib::UInt : default 0 : readable / private / static-
436 nick / static-blurb)
437 Length of the text currently in the entry
438
439 'truncate-multiline' (boolean : default false : readable / writable /
440 private / static-nick / static-blurb)
441 Whether to truncate multiline pastes to one line.
442
443 'visibility' (boolean : default true : readable / writable / private /
444 static-nick / static-blurb)
445 FALSE displays the "invisible char" instead of the actual text
446 (password mode)
447
448 'width-chars' (integer : default -1 : readable / writable / private /
449 static-nick / static-blurb)
450 Number of characters to leave space for in the entry
451
452 'xalign' (float : default 0 : readable / writable / private / static-
453 nick / static-blurb)
454 The horizontal alignment, from 0 (left) to 1 (right). Reversed for
455 RTL layouts.
456
458 'icon-prelight' (boolean : default true : readable / private / static-
459 nick / static-blurb)
460 Whether activatable icons should prelight when hovered
461
462 'inner-border' (Gtk2::Border : default undef : readable / private /
463 static-nick / static-blurb)
464 Border between text and frame.
465
466 'invisible-char' (Glib::UInt : default 0 "\0" : readable / private /
467 static-nick / static-blurb)
468 The character to use when masking entry contents (in "password
469 mode")
470
471 'progress-border' (Gtk2::Border : default undef : readable / private /
472 static-nick / static-blurb)
473 Border around the progress bar
474
475 'state-hint' (boolean : default false : readable / private / static-
476 nick / static-blurb)
477 Whether to pass a proper state when drawing shadow or background
478
480 activate (Gtk2::Entry)
481 backspace (Gtk2::Entry)
482 copy-clipboard (Gtk2::Entry)
483 cut-clipboard (Gtk2::Entry)
484 delete-from-cursor (Gtk2::Entry, Gtk2::DeleteType, integer)
485 icon-press (Gtk2::Entry, Gtk2::EntryIconPosition, Gtk2::Gdk::Event)
486 icon-release (Gtk2::Entry, Gtk2::EntryIconPosition, Gtk2::Gdk::Event)
487 insert-at-cursor (Gtk2::Entry, string)
488 move-cursor (Gtk2::Entry, Gtk2::MovementStep, integer, boolean)
489 paste-clipboard (Gtk2::Entry)
490 populate-popup (Gtk2::Entry, Gtk2::Menu)
491 preedit-changed (Gtk2::Entry, string)
492 toggle-overwrite (Gtk2::Entry)
493
495 enum Gtk2::DeleteType
496 • 'chars' / 'GTK_DELETE_CHARS'
497
498 • 'word-ends' / 'GTK_DELETE_WORD_ENDS'
499
500 • 'words' / 'GTK_DELETE_WORDS'
501
502 • 'display-lines' / 'GTK_DELETE_DISPLAY_LINES'
503
504 • 'display-line-ends' / 'GTK_DELETE_DISPLAY_LINE_ENDS'
505
506 • 'paragraph-ends' / 'GTK_DELETE_PARAGRAPH_ENDS'
507
508 • 'paragraphs' / 'GTK_DELETE_PARAGRAPHS'
509
510 • 'whitespace' / 'GTK_DELETE_WHITESPACE'
511
512 enum Gtk2::EntryIconPosition
513 • 'primary' / 'GTK_ENTRY_ICON_PRIMARY'
514
515 • 'secondary' / 'GTK_ENTRY_ICON_SECONDARY'
516
517 flags Gtk2::Gdk::DragAction
518 • 'default' / 'GDK_ACTION_DEFAULT'
519
520 • 'copy' / 'GDK_ACTION_COPY'
521
522 • 'move' / 'GDK_ACTION_MOVE'
523
524 • 'link' / 'GDK_ACTION_LINK'
525
526 • 'private' / 'GDK_ACTION_PRIVATE'
527
528 • 'ask' / 'GDK_ACTION_ASK'
529
530 enum Gtk2::ImageType
531 • 'empty' / 'GTK_IMAGE_EMPTY'
532
533 • 'pixmap' / 'GTK_IMAGE_PIXMAP'
534
535 • 'image' / 'GTK_IMAGE_IMAGE'
536
537 • 'pixbuf' / 'GTK_IMAGE_PIXBUF'
538
539 • 'stock' / 'GTK_IMAGE_STOCK'
540
541 • 'icon-set' / 'GTK_IMAGE_ICON_SET'
542
543 • 'animation' / 'GTK_IMAGE_ANIMATION'
544
545 • 'icon-name' / 'GTK_IMAGE_ICON_NAME'
546
547 • 'gicon' / 'GTK_IMAGE_GICON'
548
549 enum Gtk2::MovementStep
550 • 'logical-positions' / 'GTK_MOVEMENT_LOGICAL_POSITIONS'
551
552 • 'visual-positions' / 'GTK_MOVEMENT_VISUAL_POSITIONS'
553
554 • 'words' / 'GTK_MOVEMENT_WORDS'
555
556 • 'display-lines' / 'GTK_MOVEMENT_DISPLAY_LINES'
557
558 • 'display-line-ends' / 'GTK_MOVEMENT_DISPLAY_LINE_ENDS'
559
560 • 'paragraphs' / 'GTK_MOVEMENT_PARAGRAPHS'
561
562 • 'paragraph-ends' / 'GTK_MOVEMENT_PARAGRAPH_ENDS'
563
564 • 'pages' / 'GTK_MOVEMENT_PAGES'
565
566 • 'buffer-ends' / 'GTK_MOVEMENT_BUFFER_ENDS'
567
568 • 'horizontal-pages' / 'GTK_MOVEMENT_HORIZONTAL_PAGES'
569
570 enum Gtk2::ShadowType
571 • 'none' / 'GTK_SHADOW_NONE'
572
573 • 'in' / 'GTK_SHADOW_IN'
574
575 • 'out' / 'GTK_SHADOW_OUT'
576
577 • 'etched-in' / 'GTK_SHADOW_ETCHED_IN'
578
579 • 'etched-out' / 'GTK_SHADOW_ETCHED_OUT'
580
582 Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget
583
585 Copyright (C) 2003-2011 by the gtk2-perl team.
586
587 This software is licensed under the LGPL. See Gtk2 for a full notice.
588
589
590
591perl v5.36.0 2023-01-20 Gtk2::Entry(3)