Method

GtkTextBufferset_text

Declaration [src]

void
gtk_text_buffer_set_text (
  GtkTextBuffer* buffer,
  const char* text,
  int len
)

Description [src]

Deletes current contents of buffer, and inserts text instead. This is automatically marked as an irreversible action in the undo stack. If you wish to mark this action as part of a larger undo operation, call gtk_text_buffer_delete() and gtk_text_buffer_insert() directly instead.

If len is -1, text must be nul-terminated. text must be valid UTF-8.

Sets propertyGtk.TextBuffer:text

Parameters

text

Type: const char*

UTF-8 text to insert.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
len

Type: int

Length of text in bytes.