Gtk.TextAttributes

Fields

Name

Type

Access

Description

appearance

Gtk.TextAppearance

r/w

Gtk.TextAppearance for text.

bg_full_height

int

r/w

Background is fit to full line height rather than baseline +/- ascent/descent (font height).

direction

Gtk.TextDirection

r/w

Gtk.TextDirection for text.

editable

int

r/w

Can edit this text.

font

Pango.FontDescription

r/w

Pango.FontDescription for text.

font_scale

float

r/w

Font scale factor.

indent

int

r/w

Amount to indent the paragraph, in pixels.

invisible

int

r/w

Hide the text.

justification

Gtk.Justification

r/w

Gtk.Justification for text.

language

Pango.Language

r/w

Pango.Language for text.

left_margin

int

r/w

Width of the left margin in pixels.

letter_spacing

int

r/w

Extra space to insert between graphemes, in Pango units

no_fallback

int

r/w

Whether to disable font fallback.

pg_bg_color

Gdk.Color

r

pg_bg_rgba

Gdk.RGBA

r

pixels_above_lines

int

r/w

Pixels of blank space above paragraphs.

pixels_below_lines

int

r/w

Pixels of blank space below paragraphs.

pixels_inside_wrap

int

r/w

Pixels of blank space between wrapped lines in a paragraph.

refcount

int

r

right_margin

int

r/w

Width of the right margin in pixels.

tabs

Pango.TabArray

r/w

Custom Pango.TabArray for this text.

wrap_mode

Gtk.WrapMode

r/w

Gtk.WrapMode for text.

Methods

class

new ()

copy ()

copy_values (dest)

ref ()

unref ()

Details

class Gtk.TextAttributes

Using Gtk.TextAttributes directly should rarely be necessary. It’s primarily useful with Gtk.TextIter.get_attributes(). As with most GTK+ structs, the fields in this struct should only be read, never modified directly.

classmethod new()[source]
Returns:

a new Gtk.TextAttributes, free with Gtk.TextAttributes.unref().

Return type:

Gtk.TextAttributes

Creates a Gtk.TextAttributes, which describes a set of properties on some text.

copy()[source]
Returns:

a copy of self, free with Gtk.TextAttributes.unref()

Return type:

Gtk.TextAttributes

Copies self and returns a new Gtk.TextAttributes.

copy_values(dest)[source]
Parameters:

dest (Gtk.TextAttributes) – another Gtk.TextAttributes

Copies the values from self to dest so that dest has the same values as self. Frees existing values in dest.

ref()[source]
Returns:

the Gtk.TextAttributes that were passed in

Return type:

Gtk.TextAttributes

Increments the reference count on self.

unref()[source]

Decrements the reference count on self, freeing the structure if the reference count reaches 0.