GtkSource.Style

g GObject.Object GObject.Object GtkSource.Style GtkSource.Style GObject.Object->GtkSource.Style

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

apply (tag)

copy ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

background

str

r/w/co

Background color

background-set

bool

r/w/co

Whether background color is set

bold

bool

r/w/co

Bold

bold-set

bool

r/w/co

Whether bold attribute is set

foreground

str

r/w/co

Foreground color

foreground-set

bool

r/w/co

Whether foreground color is set

italic

bool

r/w/co

Italic

italic-set

bool

r/w/co

Whether italic attribute is set

line-background

str

r/w/co

Line background color

line-background-set

bool

r/w/co

Whether line background color is set

pango-underline

Pango.Underline

r/w/co

Pango Underline

scale

str

r/w/co

Text scale factor

scale-set

bool

r/w/co

Whether scale attribute is set

strikethrough

bool

r/w/co

Strikethrough

strikethrough-set

bool

r/w/co

Whether strikethrough attribute is set

underline-color

str

r/w/co

Underline color

underline-color-set

bool

r/w/co

Whether underline color attribute is set

underline-set

bool

r/w/co

Whether underline attribute is set

weight

Pango.Weight

r/w/co

Text weight

weight-set

bool

r/w/co

Whether weight attribute is set

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class GtkSource.Style(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GtkSource.StyleClass

Represents a style.

The GtkSourceStyle structure is used to describe text attributes which are set when given style is used.

apply(tag)
Parameters:

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

This function modifies the [class`Gtk`.TextTag] properties that are related to the GtkSource.Style properties. Other [class`Gtk`.TextTag] properties are left untouched.

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

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

copy()
Returns:

copy of self, call GObject.Object.unref() when you are done with it.

Return type:

GtkSource.Style

Creates a copy of self, that is a new GtkSource.Style instance which has the same attributes set.

Property Details

GtkSource.Style.props.background
Name:

background

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Background color

GtkSource.Style.props.background_set
Name:

background-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether background color is set

GtkSource.Style.props.bold
Name:

bold

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Bold

GtkSource.Style.props.bold_set
Name:

bold-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether bold attribute is set

GtkSource.Style.props.foreground
Name:

foreground

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Foreground color

GtkSource.Style.props.foreground_set
Name:

foreground-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether foreground color is set

GtkSource.Style.props.italic
Name:

italic

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Italic

GtkSource.Style.props.italic_set
Name:

italic-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether italic attribute is set

GtkSource.Style.props.line_background
Name:

line-background

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Line background color

GtkSource.Style.props.line_background_set
Name:

line-background-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether line background color is set

GtkSource.Style.props.pango_underline
Name:

pango-underline

Type:

Pango.Underline

Default Value:

Pango.Underline.NONE

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Pango Underline

GtkSource.Style.props.scale
Name:

scale

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Text scale factor

GtkSource.Style.props.scale_set
Name:

scale-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether scale attribute is set

GtkSource.Style.props.strikethrough
Name:

strikethrough

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Strikethrough

GtkSource.Style.props.strikethrough_set
Name:

strikethrough-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether strikethrough attribute is set

GtkSource.Style.props.underline_color
Name:

underline-color

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Underline color

GtkSource.Style.props.underline_color_set
Name:

underline-color-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether underline color attribute is set

GtkSource.Style.props.underline_set
Name:

underline-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether underline attribute is set

GtkSource.Style.props.weight
Name:

weight

Type:

Pango.Weight

Default Value:

Pango.Weight.NORMAL

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Text weight

GtkSource.Style.props.weight_set
Name:

weight-set

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether weight attribute is set