like a bookmark in a textbuffer - it preserves a position in the text. You
can get an iterator corresponding to a textmark by using the
method. Unlike iterators, textmarks remain valid across buffer modifications
(e.g. when text is inserted or deleted). When text containing a textmark is
deleted, the textmark remains in the position originally occupied by the
deleted text. When text is inserted at a textmark, a textmark with left
gravity will be moved to the beginning of the newly-inserted text, and a
textmark with right gravity will be moved to the end. Textmarks optionally
have names that can be used to avoid passing the
object around. Textmarks are typically created using the
has two built-in
selection_bound which refer to the insertion point and
the boundary of the selection (these may refer to the same location).
set_visible() method sets the
visibility of the textmark to the value specified by
True the textmark will be visible as a vertical bar. The
insertion point is normally visible but most textmarks are not visible by
default. The text widget uses a visible textmark to indicate where a drop
will occur when dragging-and-dropping text.
get_visible() method returns
True if the textmark is visible (i.e. a vertical bar is
displayed for it)
|the textmark name or
get_name() method returns the
textmark name or
None if the textmark is
get_deleted() method returns
True if the textmark has been removed from its textbuffer
Textmarks can't be used once deleted.
|the textmark's |
get_buffer() method returns the
object the textmark is located inside, or
None if the
textmark is deleted.
© manpagez.com 2000-2019 Individual documents may contain additional copyright information.