TextBuffer.insertInteractive

Like gtk_text_buffer_insert(), but the insertion will not occur if iter is at a non-editable location in the buffer. Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive). default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it. Typically the result of gtk_text_view_get_editable() is appropriate here.

  1. int insertInteractive(TextIter iter, string text, int defaultEditable)
  2. int insertInteractive(TextIter iter, string text, int len, int defaultEditable)
    class TextBuffer
    int
    insertInteractive

Parameters

iter TextIter

a position in buffer

text string

some UTF-8 text

len int

length of text in bytes, or -1

defaultEditable int

default editability of buffer

Return Value

Type: int

whether text was actually inserted

Meta