1Gtk2::EntryBuffer(3)  User Contributed Perl Documentation Gtk2::EntryBuffer(3)
2
3
4

NAME

6       Gtk2::EntryBuffer - wrapper for GtkEntryBuffer
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::EntryBuffer
11
12       The Gtk2::EntryBuffer class contains the actual text displayed in a
13       Gtk2::Entry widget.
14
15       A single Gtk2::EntryBuffer object can be shared by multiple Gtk2::Entry
16       widgets which will then share the same text content, but not the cursor
17       position, visibility attributes, icon etc.
18
19       Gtk2::EntryBuffer may be derived from. Such a derived class might allow
20       text to be stored in an alternate location, such as non-pageable
21       memory, useful in the case of important passwords. Or a derived class
22       could integrate with an application's concept of undo/redo.
23

METHODS

25   entrybuffer = Gtk2::EntryBuffer->new ($initial_chars=undef)
26       •   $initial_chars (string)
27
28   unsigned = $buffer->get_bytes
29   integer = $buffer->delete_text ($position=0, $n_chars=-1)
30       •   $position (integer)
31
32       •   $n_chars (integer)
33
34   $buffer->emit_deleted_text ($position, $n_chars)
35       •   $position (integer)
36
37       •   $n_chars (integer)
38
39   $buffer->emit_inserted_text ($position, $chars, $n_chars)
40       •   $position (integer)
41
42       •   $chars (string)
43
44       •   $n_chars (integer)
45
46   $buffer->insert_text ($position, $chars)
47       •   $position (integer)
48
49       •   $chars (string)
50
51   integer = $buffer->get_length
52   integer = $buffer->get_max_length
53   $buffer->set_max_length ($max_length)
54       •   $max_length (integer)
55
56   string = $buffer->get_text
57   $buffer->set_text ($chars)
58       •   $chars (string)
59

PROPERTIES

61       'length' (Glib::UInt : default 0 : readable / private / static-nick /
62       static-blurb)
63           Length of the text currently in the buffer
64
65       'max-length' (integer : default 0 : readable / writable / private /
66       static-nick / static-blurb)
67           Maximum number of characters for this entry. Zero if no maximum
68
69       'text' (string : default "" : readable / writable / private / static-
70       nick / static-blurb)
71           The contents of the buffer
72

SIGNALS

74       deleted-text (Gtk2::EntryBuffer, Glib::UInt, Glib::UInt)
75       inserted-text (Gtk2::EntryBuffer, Glib::UInt, string, Glib::UInt)
76

SEE ALSO

78       Gtk2, Glib::Object
79
81       Copyright (C) 2003-2011 by the gtk2-perl team.
82
83       This software is licensed under the LGPL.  See Gtk2 for a full notice.
84
85
86
87perl v5.32.1                      2021-01-27              Gtk2::EntryBuffer(3)
Impressum