GtkSource.Style

Fields

Name

Type

Access

Description

background_color

Gdk.RGBA

r/w

Equivalent to Gtk.TextTag :background-rgba.

bold

int

r/w

For Gtk.TextTag :weight.

foreground_color

Gdk.RGBA

r/w

Equivalent to Gtk.TextTag :foreground-rgba.

italic

int

r/w

For Gtk.TextTag :style.

ref_count

int

r

scale

float

r/w

Equivalent to Gtk.TextTag :scale.

strikethrough

int

r/w

Equivalent to Gtk.TextTag :strikethrough.

underline

Pango.Underline

r/w

Equivalent to Gtk.TextTag :underline.

underline_color

Gdk.RGBA

r/w

Equivalent to Gtk.TextTag :underline-rgba.

use_background_color

int

r/w

Whether background_color can be taken into account.

use_bold

int

r/w

Whether bold can be taken into account.

use_foreground_color

int

r/w

Whether foreground_color can be taken into account.

use_italic

int

r/w

Whether italic can be taken into account.

use_scale

int

r/w

Whether scale can be taken into account.

use_strikethrough

int

r/w

Whether strikethrough can be taken into account.

use_underline

int

r/w

Whether underline can be taken into account.

use_underline_color

int

r/w

Whether underline_color can be taken into account.

Methods

class

new ()

apply (tag)

ref ()

unref ()

Details

class GtkSource.Style

Before using the value of a certain field, check the boolean value of the corresponding “use_” field.

New in version 299.2.

classmethod new()
Returns:

a new GtkSource.Style with a reference count of one.

Return type:

GtkSource.Style

Creates a new GtkSource.Style with initially all the “use_” fields set to False.

New in version 299.2.

apply(tag)
Parameters:

tag (Gtk.TextTag) – a Gtk.TextTag to apply styles to.

This function modifies the Gtk.TextTag properties that are related to the GtkSource.Style attributes. Other Gtk.TextTag properties are left untouched.

If self is non-None, applies self to tag.

If self is None, the related *-set properties of Gtk.TextTag are set to False.

New in version 3.22.

ref()
Returns:

the passed in self.

Return type:

GtkSource.Style

Increases the reference count of self by one.

New in version 299.2.

unref()

Decreases the reference count of self by one. If the reference count drops to 0, self is freed.

New in version 299.2.