Gtk2::EntryBuffer3pm
Wrapper for gtkentrybuffer
Hierarchy
Glib::Object+----Gtk2::EntryBuffer
The Gtk2::EntryBuffer class contains the actual text displayed in a Gtk2::Entry widget.
A single Gtk2::EntryBuffer object can be shared by multiple Gtk2::Entry widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.
Gtk2::EntryBuffer may be derived from. Such a derived class might allow text to be stored in an alternate location, such as non-pageable memory, useful in the case of important passwords. Or a derived class could integrate with an application's concept of undo/redo.
Methods
entrybuffer = Gtk2::EntryBuffer->new ($initial_chars=undef)
- •
-
$initial_chars(string)
unsigned = $buffer->get_bytes
integer = $buffer->delete_text ($position=0, $n_chars=-1)
•
|
|
|---|---|
•
|
|
$buffer->emit_deleted_text ($position, $n_chars)
•
|
|
|---|---|
•
|
|
$buffer->emit_inserted_text ($position, $chars, $n_chars)
•
|
|
|---|---|
•
|
|
•
|
|
$buffer->insert_text ($position, $chars)
•
|
|
|---|---|
•
|
|
integer = $buffer->get_length
integer = $buffer->get_max_length
$buffer->set_max_length ($max_length)
- •
-
$max_length(integer)
string = $buffer->get_text
$buffer->set_text ($chars)
- •
-
$chars(string)
Properties
'length' (Glib::UInt : default 0 : readable / private)
|
Length of the text currently in the buffer |
|---|---|
'max-length' (integer : default 0 : readable / writable / private)
|
Maximum number of characters for this entry. Zero if no maximum |
'text' (string : default "" : readable / writable / private)
|
The contents of the buffer |
Signals
deleted-text(Gtk2::EntryBuffer, Glib::UInt, Glib::UInt)
inserted-text(Gtk2::EntryBuffer, Glib::UInt, string, Glib::UInt)
Releases
3 releases since Debian 7 (Wheezy); the text changed 2 times.