:right-sidebar: True Annotation =================================================================== .. currentmodule:: gi.repository.GtkSource .. versionadded:: 5.18 .. class:: Annotation(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Represents an annotation added to :obj:`~gi.repository.GtkSource.View`\, it has a :obj:`~gi.repository.GtkSource.Annotation.props.line` property, :obj:`~gi.repository.GtkSource.Annotation.props.description`\, icon and a style. It will be displayed always at the end of a line. If the style is GTK_SOURCE_ANNOTATION_STYLE_NONE it will use the same color as :obj:`~gi.repository.GtkSource.SpaceDrawer`\. Constructors ------------ .. rst-class:: interim-class .. class:: Annotation :no-index: .. classmethod:: new(description: str | None, icon: ~gi.repository.Gio.Icon | None, line: int, style: ~gi.repository.GtkSource.AnnotationStyle) -> ~gi.repository.GtkSource.Annotation :param description: the text to display or :const:`None`. :param icon: the icon name to display or :const:`None`. :param line: the line where to display the annotation. :param style: :obj:`~gi.repository.GtkSource.AnnotationStyle` Methods ------- .. rst-class:: interim-class .. class:: Annotation :no-index: .. method:: get_description() -> str .. method:: get_icon() -> ~gi.repository.Gio.Icon | None .. method:: get_line() -> int .. method:: get_style() -> ~gi.repository.GtkSource.AnnotationStyle Properties ---------- .. rst-class:: interim-class .. class:: Annotation :no-index: .. attribute:: props.description :type: str The type of the None singleton. .. versionadded:: 5.18 .. attribute:: props.icon :type: ~gi.repository.Gio.Icon The type of the None singleton. .. versionadded:: 5.18 .. attribute:: props.line :type: int The type of the None singleton. .. versionadded:: 5.18 .. attribute:: props.style :type: ~gi.repository.GtkSource.AnnotationStyle The type of the None singleton. .. versionadded:: 5.18