Tag

class Tag(**properties: Any)

Superclasses: TextTag, Object

A tag that can be applied to text in a Buffer.

GtkSourceTag is a subclass of TextTag that adds properties useful for the GtkSourceView library.

If, for a certain tag, TextTag is sufficient, it’s better that you create a TextTag, not a Tag.

Constructors

class Tag
classmethod new(name: str | None = None) TextTag

Creates a GtkSourceTag.

Configure the tag using object arguments, i.e. using set.

For usual cases, create_source_tag is more convenient to use.

Parameters:

name – tag name, or None.

Properties

class Tag
props.draw_spaces: bool

Whether to draw white spaces.

This property takes precedence over the value defined by the SpaceDrawer’s matrix property (only where the tag is applied).

Setting this property also changes draw_spaces_set to True.

props.draw_spaces_set: bool

Whether the draw_spaces property is set and must be taken into account.

Fields

class Tag
parent_instance