Mark

class Mark(**properties: Any)

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 using get_mark. Normally marks are created using the utility function create_source_mark.

Parameters:
  • name – Name of the Mark or None

  • 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
get_category() str

Returns the mark category.

next(category: str | None = None) Mark | None

Returns the next GtkSourceMark in the buffer or None if the mark was not added to a buffer.

If there is no next mark, None will be returned.

If category is None, 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 or None if the mark was not added to a buffer.

If there is no previous mark, None is returned.

If category is None, looks for marks of any category

Parameters:

category – a string specifying the mark category, or None.

Properties

class Mark
props.category: str

The category of the GtkSourceMark, classifies the mark and controls which pixbuf is used and with which priority it is drawn.

Fields

class Mark
parent_instance