Package: gtk

Function gtk:text-buffer-insert-child-anchor

Lambda List

gtk:text-buffer-insert-child-anchor (buffer pos &optional anchor)

Arguments

buffer -- a gtk:text-buffer object
pos -- a gtk:text-iter iterator with the position to insert the anchor
anchor -- an optional gtk:text-child-anchor object

Return Value

The gtk:text-child-anchor child widget anchor.

Details

Inserts a child widget anchor into the text buffer at pos. The anchor will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode "object replacement character" 0xFFFC. Note that the "slice" variants for obtaining portions of the text buffer as a string include this character for anchors, but the "text" variants do not, for example, see the gtk:text-buffer-get-slice and gtk:text-buffer-get-text functions. Consider the gtk:text-buffer-create-child-anchor function as a more convenient alternative to this function. The text buffer will add a reference to the anchor, so you can unref it after insertion.

If the anchor argument is nil creates an anchor with the gtk:text-child-anchor-new function and inserts it into buffer with the gtk:text-buffer-insert-child-anchor function. The new anchor is owned by the text buffer.
 

See also

2024-7-3