GtkSource.Tag

g GObject.Object GObject.Object Gtk.TextTag Gtk.TextTag GObject.Object->Gtk.TextTag GtkSource.Tag GtkSource.Tag Gtk.TextTag->GtkSource.Tag

Subclasses:

None

Methods

Inherited:

Gtk.TextTag (4), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gtk.TextTag (89)

Name

Type

Flags

Short Description

draw-spaces

bool

r/w/en

draw-spaces-set

bool

r/w/en

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.TextTag

r

Class Details

class GtkSource.Tag(**kwargs)
Bases:

Gtk.TextTag

Abstract:

No

Structure:

GtkSource.TagClass

A tag that can be applied to text in a [class`Buffer`].

GtkSourceTag is a subclass of [class`Gtk`.TextTag] that adds properties useful for the GtkSource.View library.

If, for a certain tag, [class`Gtk`.TextTag] is sufficient, it’s better that you create a [class`Gtk`.TextTag], not a [class`Tag`].

classmethod new(name)
Parameters:

name (str or None) – tag name, or None.

Returns:

a new GtkSourceTag.

Return type:

Gtk.TextTag

Creates a GtkSourceTag.

Configure the tag using object arguments, i.e. using [method`GObject`.Object.set].

For usual cases, [method`Buffer`.create_source_tag] is more convenient to use.

Property Details

GtkSource.Tag.props.draw_spaces
Name:

draw-spaces

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether to draw white spaces.

This property takes precedence over the value defined by the [class`SpaceDrawer`]’s [property`SpaceDrawer`:py:data::matrix<GtkSource.Tag.props.matrix>] property (only where the tag is applied).

Setting this property also changes [property`Tag`:py:data::draw-spaces-set<GtkSource.Tag.props.draw_spaces_set>] to True.

GtkSource.Tag.props.draw_spaces_set
Name:

draw-spaces-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the [property`Tag`:py:data::draw-spaces<GtkSource.Tag.props.draw_spaces>] property is set and must be taken into account.