Mark
Superclasses: TextMark
, Object
- Constructors:
Mark(**properties)
new(name:str=None, category:str) -> GtkSource.Mark
Constructors
- class Mark
- classmethod new(name: str | None, category: str) Mark
Creates a text mark.
Add it to a buffer using
add_mark
. If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name usingget_mark
. Normally marks are created using the utility functioncreate_source_mark
.- Parameters:
name – Name of the
Mark
orNone
category – is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could belong to the “bookmark” category, or all the marks representing a compilation error could belong to “error” category).
Methods
- class Mark
-
- next(category: str | None = None) Mark | None
Returns the next
GtkSourceMark
in the buffer orNone
if the mark was not added to a buffer.If there is no next mark,
None
will be returned.If
category
isNone
, looks for marks of any category.- Parameters:
category – a string specifying the mark category, or
None
.
- prev(category: str | None = None) Mark | None
Returns the previous
GtkSourceMark
in the buffer orNone
if the mark was not added to a buffer.If there is no previous mark,
None
is returned.If
category
isNone
, looks for marks of any category- Parameters:
category – a string specifying the mark category, or
None
.
Properties
Fields
- class Mark
- parent_instance