Package: gtk

Class gtk-text-mark

Superclasses

g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

left-gravity
The left-gravity property of type :boolean (Read / Write / Construct)
Whether the text mark has left gravity.
Default value: false
name
The name property of type :string (Read / Write / Construct)
The name of the text mark.
Default value: nil

Details

A gtk-text-mark object is like a bookmark in a text buffer. It preserves a position in the text.

You can convert the text mark to an iterator using the function gtk-text-buffer-iter-at-mark. Unlike iterators, text marks remain valid across buffer mutations, because their behavior is defined when text is inserted or deleted. When text containing a text mark is deleted, the text mark remains in the position originally occupied by the deleted text. When text is inserted at a text mark, a text mark with left gravity will be moved to the beginning of the newly inserted text, and a text mark with right gravity will be moved to the end.

Note that "left" and "right" here refer to logical direction. Left is toward the start of the buffer. In some languages such as Hebrew the logically leftmost text is not actually on the left when displayed.

Text marks are reference counted, but the reference count only controls the validity of the memory. Text marks can be deleted from the buffer at any time with the function gtk-text-buffer-delete-mark. Once deleted from the buffer, a text mark is essentially useless.

Text marks optionally have names. These can be convenient to avoid passing the gtk-text-mark object around. Text marks are typically created using the function gtk-text-buffer-create-mark.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-2-11