Package: gtk

Function gtk-text-buffer-insert-range

Lambda List

gtk-text-buffer-insert-range (buffer iter start end &key interactive editable)

Syntax

(gtk-text-buffer-insert-range buffer iter start end) => t
(gtk-text-buffer-insert-range buffer iter start end :interactive t) => t
(gtk-text-buffer-insert-range buffer iter start end :interactive t :editable t) => t

Arguments

buffer -- a gtk-text-buffer object
iter -- a gtk-text-iter position in text buffer
start -- a gtk-text-iter start position
end -- a gtk-text-iter end position
interactive -- a boolean whether the deletion is caused by user interaction
editable -- a boolean whether buffer is editable by default

Return Value

A boolean whether an insertion was possible.

Details

Copies text, tags, and pixbufs between the start and end iterators, the order of start and end does not matter, and inserts the copy at the iter iterator.

Used instead of simply getting/inserting text because it preserves images and tags. If start and end are in a different text buffer from buffer, the two buffers must share the same tag table.

The interactive keyword argument with the true value is the same, but does nothing if the insertion point is not editable. The editable keyword argument indicates whether the text is editable at the iterator if no tags enclosing the iterator affect editability. Typically the result of the gtk-text-view-editable function is appropriate here.

Implemented via emissions of the "insert-text" and "apply-tag" signals, so expect those.

Note

The Lisp implementation combines the two gtk_text_buffer_insert_range() and gtk_text_buffer_insert_range_interactive() functions. The second function is not exported in the Lisp implementation,
 

See also

2021-11-16