:right-sidebar: True Mark =================================================================== .. currentmodule:: gi.repository.GtkSource .. class:: Mark(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.TextMark`, :class:`~gi.repository.GObject.Object` :Constructors: :: Mark(**properties) new(name:str=None, category:str) -> GtkSource.Mark Constructors ------------ .. rst-class:: interim-class .. class:: Mark :no-index: .. classmethod:: new(name: str | None, category: str) -> ~gi.repository.GtkSource.Mark Creates a text mark. Add it to a buffer using :obj:`~gi.repository.Gtk.TextBuffer.add_mark`. If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using :obj:`~gi.repository.Gtk.TextBuffer.get_mark`. Normally marks are created using the utility function :obj:`~gi.repository.Buffer.create_source_mark`. :param name: Name of the :obj:`~gi.repository.GtkSource.Mark` or :const:`None` :param 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 ------- .. rst-class:: interim-class .. class:: Mark :no-index: .. method:: get_category() -> str Returns the mark category. .. method:: next(category: str | None = None) -> ~gi.repository.GtkSource.Mark | None Returns the next ``GtkSourceMark`` in the buffer or :const:`None` if the mark was not added to a buffer. If there is no next mark, :const:`None` will be returned. If ``category`` is :const:`None`, looks for marks of any category. :param category: a string specifying the mark category, or :const:`None`. .. method:: prev(category: str | None = None) -> ~gi.repository.GtkSource.Mark | None Returns the previous ``GtkSourceMark`` in the buffer or :const:`None` if the mark was not added to a buffer. If there is no previous mark, :const:`None` is returned. If ``category`` is :const:`None`, looks for marks of any category :param category: a string specifying the mark category, or :const:`None`. Properties ---------- .. rst-class:: interim-class .. class:: Mark :no-index: .. attribute:: props.category :type: str The category of the ``GtkSourceMark``, classifies the mark and controls which pixbuf is used and with which priority it is drawn. Fields ------ .. rst-class:: interim-class .. class:: Mark :no-index: .. attribute:: parent_instance