EntryBuffer
Object Hierarchy:
Gtk.EntryBuffer
Gtk.EntryBuffer
Gtk.EntryBuffer
GLib.Object
GLib.Object
GLib.Object->Gtk.EntryBuffer
Description:
[ CCode ( type_id = "gtk_entry_buffer_get_type ()" ) ] [ Version ( since = "2.18" ) ]public class EntryBuffer : Object
The EntryBuffer class contains the actual text displayed in a Entry
widget.
A single EntryBuffer object can be shared by multiple Entry widgets
which will then share the same text content, but not the cursor position, visibility attributes, icon etc.
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.
Content:
Properties:
public uint length { get ; }
The length (in characters) of the text in buffer.
public int max_length { get ; set ; }
The maximum length (in characters) of the text in the buffer.
public string text { get ; set ; }
The contents of the buffer.
Creation methods:
Methods:
public virtual uint delete_text (uint position, uint n_chars)
Deletes a sequence of characters from the buffer.
public void emit_deleted_text (uint position, uint n_chars)
Used when subclassing EntryBuffer
public void emit_inserted_text (uint position, uint8 [] chars)
Used when subclassing EntryBuffer
public size_t get_bytes ()
Retrieves the length in bytes of the buffer.
public virtual uint get_length ()
Retrieves the length in characters of the buffer.
public int get_max_length ()
Retrieves the maximum allowed length of the text in
this .
public unowned string get_text ()
Retrieves the contents of the buffer.
public virtual unowned string get_text_internal (out size_t n_bytes = null )
public virtual uint insert_text (uint position, uint8 [] chars)
Inserts n_chars
characters of chars
into the
contents of the buffer, at position position
.
public void set_max_length (int max_length)
Sets the maximum allowed length of the contents of the buffer.
public void set_text (uint8 [] chars)
Sets the text in the buffer.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref