GtkSource.Annotation

g GObject.Object GObject.Object GtkSource.Annotation GtkSource.Annotation GObject.Object->GtkSource.Annotation

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (description, icon, line, style)

get_description ()

get_icon ()

get_line ()

get_style ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

description

str

r

icon

Gio.Icon

r

line

int

r

style

GtkSource.AnnotationStyle

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class GtkSource.Annotation(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GtkSource.AnnotationClass

Represents an annotation added to [class`View`], it has a [property`Annotation`:py:data::line<GtkSource.Annotation.props.line>] property, [property`Annotation`:py:data::description<GtkSource.Annotation.props.description>], icon and a style.

It will be displayed always at the end of a line.

If the style is GtkSource.AnnotationStyle.NONE it will use the same color as [class`SpaceDrawer`].

New in version 5.18.

classmethod new(description, icon, line, style)
Parameters:
Returns:

a new [class`Annotation`]

Return type:

GtkSource.Annotation

get_description()
Returns:

the description text displayed

Return type:

str

get_icon()
Returns:

a Gio.Icon or None

Return type:

Gio.Icon or None

get_line()
Returns:

the line number.

Return type:

int

get_style()
Returns:

the style of the annotation

Return type:

GtkSource.AnnotationStyle

Property Details

GtkSource.Annotation.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE

The text description displayed at [property`Annotation`:py:data::line<GtkSource.Annotation.props.line>]

New in version 5.18.

GtkSource.Annotation.props.icon
Name:

icon

Type:

Gio.Icon

Default Value:

None

Flags:

READABLE

The icon displayed at [property`Annotation`:py:data::line<GtkSource.Annotation.props.line>]

It will be displayed before the text description

New in version 5.18.

GtkSource.Annotation.props.line
Name:

line

Type:

int

Default Value:

1

Flags:

READABLE

The line where to display the annotation

New in version 5.18.

GtkSource.Annotation.props.style
Name:

style

Type:

GtkSource.AnnotationStyle

Default Value:

GtkSource.AnnotationStyle.NONE

Flags:

READABLE

The style of the annotation

New in version 5.18.