gtk.TextAttributesan object containing the attributes set on some
textSynopsisgtk.TextAttributesgobject.GBoxedgtk.TextAttributescopycopy_valuesdestAttributes
"bg_color"ReadThe background color"fg_color"ReadThe foreground color"bg_stipple"ReadThe background stipple bitmap"fg_stipple"ReadThe foreground stipple bitmap"rise"ReadThe subscript or superscript rise"underline"ReadThe style of underline - one of:
pango.UNDERLINE_NONE,
pango.UNDERLINE_SINGLE,
pango.UNDERLINE_DOUBLE,
pango.UNDERLINE_LOW"strikethrough"ReadIf True strikethrough the text"draw_bg"ReadIf True some background attributes
are set"justification"ReadThe type of justification - one of:
gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT,
gtk.JUSTIFY_CENTER,
gtk.JUSTIFY_FILL"direction"ReadThe text direction - one of:
gtk.TEXT_DIR_NONE, gtk.TEXT_DIR_LTR,
gtk.TEXT_DIR_RTL"font"ReadA pango.FontDescription"font_scale"ReadThe scale of the font e.g. 2.5"left_margin"ReadThe width of the left margin in pixels"indent"ReadThe width of the paragraph indent in pixels"right_margin"ReadThe width of the right margin"pixels_above_lines"ReadThe number of pixels space above a paragraph"pixels_below_lines"ReadThe number of pixels space below a paragraph"pixels_inside_wrap"ReadThe number of pixels of space between wrapped lines in
a paragraph"tabs"ReadA set of tabs contained in a
pango.TabArray"wrap_mode"ReadThe wrap mode - one of: gtk.WRAP_NONE,
gtk.WRAP_CHAR,
gtk.WRAP_WORD"language"ReadThe pango.Language object
describing the text language"invisible"ReadIf True the text is hidden (Not
implemented in PyGTK2)"bg_full_height"ReadIf True the background is fit to the
full line height"editable"ReadIf True the text is editable"realized"ReadIf True the text has been
realized"pad1"Read"pad2"Read"pad3"Read"pad4"Read
DescriptionA gtk.TextAttributes
object holds a set of attributes that describe the properties of a section
of text. A gtk.TextAttributes
object is usually obtained by calling either of the gtk.TextIter.get_attributes()
or gtk.TextView.get_default_attributes()
methods to retrieve the attributes in effect.A gtk.TextAttributes
object created with gtk.TextAttributes() cannot
be applied within PyGTK because there is no way to set the attributes.
Likewise, the copy()
and copy_values()
methods can create a new copy or copy the attributes but there are no
methods in PyGTK that take a gtk.TextAttributes
object as an argument. The most effective way to use a gtk.TextAttributes
object is to read its attributes and use them to set the properties of a
gtk.TextTag.Constructorgtk.TextAttributesReturns :a new gtk.TextAttributesCreates a gtk.TextAttributes
object, that contains a set of attributes of some text.Methodsgtk.TextAttributes.copycopyReturns :a copy of the gtk.TextAttributes
objectThe copy() method copies the text
attributes and returns a new gtk.TextAttributes
object.gtk.TextAttributes.copy_valuescopy_valuesdestdest :the gtk.TextAttributes
whose attributes will be setThe copy_values() method copies the
values from the gtk.TextAttributes
object to dest so that dest
has the same values. Frees existing values in
dest.