Class

GtkEntryBuffer

Description [src]

class Gtk.EntryBuffer : GObject.Object {
  parent_instance: GObject
}

The GtkEntryBuffer class contains the actual text displayed in a GtkEntry widget.

A single GtkEntryBuffer object can be shared by multiple GtkEntry widgets which will then share the same text content, but not the cursor position, visibility attributes, icon etc.

GtkEntryBuffer 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.

Available since:2.18

Hierarchy

hierarchy this GtkEntryBuffer ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

gtk_entry_buffer_new

Create a new GtkEntryBuffer object.

Available since: 2.18

Instance methods

gtk_entry_buffer_delete_text

Deletes a sequence of characters from the buffer. n_chars characters are deleted starting at position. If n_chars is negative, then all characters until the end of the text are deleted.

Available since: 2.18

gtk_entry_buffer_emit_deleted_text

Used when subclassing GtkEntryBuffer.

Available since: 2.18

gtk_entry_buffer_emit_inserted_text

Used when subclassing GtkEntryBuffer.

Available since: 2.18

gtk_entry_buffer_get_bytes

Retrieves the length in bytes of the buffer. See gtk_entry_buffer_get_length().

Available since: 2.18

gtk_entry_buffer_get_length

Retrieves the length in characters of the buffer.

Available since: 2.18

gtk_entry_buffer_get_max_length

Retrieves the maximum allowed length of the text in buffer. See gtk_entry_buffer_set_max_length().

Available since: 2.18

gtk_entry_buffer_get_text

Retrieves the contents of the buffer.

Available since: 2.18

gtk_entry_buffer_insert_text

Inserts n_chars characters of chars into the contents of the buffer, at position position.

Available since: 2.18

gtk_entry_buffer_set_max_length

Sets the maximum allowed length of the contents of the buffer. If the current contents are longer than the given length, then they will be truncated to fit.

Available since: 2.18

gtk_entry_buffer_set_text

Sets the text in the buffer.

Available since: 2.18

Methods inherited from GObject (42)

Properties

Gtk.EntryBuffer:length

The length (in characters) of the text in buffer.

Available since: 2.18

Gtk.EntryBuffer:max-length

The maximum length (in characters) of the text in the buffer.

Available since: 2.18

Gtk.EntryBuffer:text

The contents of the buffer.

Available since: 2.18

Signals

Gtk.EntryBuffer::deleted-text

This signal is emitted after text is deleted from the buffer.

Available since: 2.18

Gtk.EntryBuffer::inserted-text

This signal is emitted after text is inserted into the buffer.

Available since: 2.18

Signals inherited from GObject (1)

Class structure

struct GtkEntryBufferClass {
  GObjectClass parent_class;
  void (* inserted_text) (
    GtkEntryBuffer* buffer,
    guint position,
    const gchar* chars,
    guint n_chars
  );
  void (* deleted_text) (
    GtkEntryBuffer* buffer,
    guint position,
    guint n_chars
  );
  const gchar* (* get_text) (
    GtkEntryBuffer* buffer,
    gsize* n_bytes
  );
  guint (* get_length) (
    GtkEntryBuffer* buffer
  );
  guint (* insert_text) (
    GtkEntryBuffer* buffer,
    guint position,
    const gchar* chars,
    guint n_chars
  );
  guint (* delete_text) (
    GtkEntryBuffer* buffer,
    guint position,
    guint n_chars
  );
  void (* _gtk_reserved1) (
void
  );
  void (* _gtk_reserved2) (
void
  );
  void (* _gtk_reserved3) (
void
  );
  void (* _gtk_reserved4) (
void
  );
  void (* _gtk_reserved5) (
void
  );
  void (* _gtk_reserved6) (
void
  );
  void (* _gtk_reserved7) (
void
  );
  void (* _gtk_reserved8) (
void
  );
  
}
Class members
parent_class
GObjectClass
  No description available.
inserted_text
void (* inserted_text) (
    GtkEntryBuffer* buffer,
    guint position,
    const gchar* chars,
    guint n_chars
  )
  No description available.
deleted_text
void (* deleted_text) (
    GtkEntryBuffer* buffer,
    guint position,
    guint n_chars
  )
  No description available.
get_text
const gchar* (* get_text) (
    GtkEntryBuffer* buffer,
    gsize* n_bytes
  )
  No description available.
get_length
guint (* get_length) (
    GtkEntryBuffer* buffer
  )
  No description available.
insert_text
guint (* insert_text) (
    GtkEntryBuffer* buffer,
    guint position,
    const gchar* chars,
    guint n_chars
  )
  No description available.
delete_text
guint (* delete_text) (
    GtkEntryBuffer* buffer,
    guint position,
    guint n_chars
  )
  No description available.
_gtk_reserved1
void (* _gtk_reserved1) (
void
  )
  No description available.
_gtk_reserved2
void (* _gtk_reserved2) (
void
  )
  No description available.
_gtk_reserved3
void (* _gtk_reserved3) (
void
  )
  No description available.
_gtk_reserved4
void (* _gtk_reserved4) (
void
  )
  No description available.
_gtk_reserved5
void (* _gtk_reserved5) (
void
  )
  No description available.
_gtk_reserved6
void (* _gtk_reserved6) (
void
  )
  No description available.
_gtk_reserved7
void (* _gtk_reserved7) (
void
  )
  No description available.
_gtk_reserved8
void (* _gtk_reserved8) (
void
  )
  No description available.

Virtual methods

Gtk.EntryBufferClass.delete_text

Deletes a sequence of characters from the buffer. n_chars characters are deleted starting at position. If n_chars is negative, then all characters until the end of the text are deleted.

Available since: 2.18

Gtk.EntryBufferClass.deleted_text
No description available.
Gtk.EntryBufferClass.get_length

Retrieves the length in characters of the buffer.

Available since: 2.18

Gtk.EntryBufferClass.get_text
No description available.
Gtk.EntryBufferClass.insert_text

Inserts n_chars characters of chars into the contents of the buffer, at position position.

Available since: 2.18

Gtk.EntryBufferClass.inserted_text
No description available.