pango.attr_list
Module for [AttrList] class
class AttrList
Types 1
classAttrList : gobject.boxed.Boxed
A [pango.attr_list.AttrList] represents a list of attributes that apply to a section of text.
The attributes in a [pango.attr_list.AttrList] are, in general, allowed to overlap in an arbitrary fashion. However, if the attributes are manipulated only through [pango.attr_list.AttrList.change], the overlap between properties will meet stricter criteria.
Since the [pango.attr_list.AttrList] structure is stored as a linear list, it is not suitable for storing attributes for large amounts of text. In general, you should not use a single [pango.attr_list.AttrList] for more than one paragraph of text.
Methods
void change(pango.attribute.Attribute attr)Insert the given attribute into the [pango.attr_list.AttrList].pango.attr_list.AttrList copy()Copy list and return an identical new list. Returns: the newly allocated [pango.attrlist.AttrList], with a reference count of one, which should be freed with [pango.attrlist.AttrList.unref]. Return...bool equal(pango.attr_list.AttrList otherList)Checks whether list and other_list contain the same attributes and whether those attributes apply to the same ranges.pango.attr_list.AttrList filter(pango.types.AttrFilterFunc func)Given a [pango.attr_list.AttrList] and callback function, removes any elements of list for which func returns true and inserts them into a new list.pango.attribute.Attribute[] getAttributes()Gets a list of all attributes in list. Returns: a list of all attributes in list. To free this value, call [pango.attribute.Attribute.destroy] on each value and [glib.slist.SList.free] on the list.pango.attr_iterator.AttrIterator getIterator()Create a iterator initialized to the beginning of the list.void insert(pango.attribute.Attribute attr)Insert the given attribute into the [pango.attr_list.AttrList].void insertBefore(pango.attribute.Attribute attr)Insert the given attribute into the [pango.attr_list.AttrList].void splice(pango.attr_list.AttrList other, int pos, int len)This function opens up a hole in list, fills it in with attributes from the left, and then merges other on top of the hole.string toString_()Serializes a [pango.attr_list.AttrList] to a string.void update(int pos, int remove, int add)Update indices of attributes in list for a change in the text they refer to.pango.attr_list.AttrList fromString(string text)Deserializes a [pango.attr_list.AttrList] from a string.