AttrList
Object Hierarchy:
Pango.AttrList
Pango.AttrList
Pango.AttrList
Description:
[ CCode ( ref_function = "pango_attr_list_ref" , type_id = "pango_attr_list_get_type ()" , unref_function = "pango_attr_list_unref" ) ] [ Compact ]public class AttrList
A `PangoAttrList` represents a list of attributes that apply to a section of text.
The attributes in a `PangoAttrList` are, in general, allowed to overlap in an arbitrary fashion. However, if the attributes are manipulated
only through [method@Pango.AttrList.change], the overlap between properties will meet stricter criteria.
Since the `PangoAttrList` 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 `PangoAttrList` for more than one paragraph of text.
Content:
Static methods:
Creation methods:
Methods:
public unowned AttrList @ref ()
Increase the reference count of the given attribute list by one.
public void change (owned Attribute attr)
Insert the given attribute into the `PangoAttrList`.
public AttrList ? copy ()
Copy this and return an identical new
list.
public bool equal (AttrList other_list)
Checks whether this and other_list
contain the same attributes and whether those attributes apply to the same ranges.
public AttrList ? filter (AttrFilterFunc func)
Given a `PangoAttrList` and callback function, removes any elements of
this for which func
returns true and inserts them into a
new list.
public SList <Attribute > get_attributes ()
Gets a list of all attributes in this .
public AttrIterator get_iterator ()
Create a iterator initialized to the beginning of the list.
public void insert (owned Attribute attr)
Insert the given attribute into the `PangoAttrList`.
public void insert_before (owned Attribute attr)
Insert the given attribute into the `PangoAttrList`.
public void splice (AttrList other, int pos, int len)
This function opens up a hole in this ,
fills it in with attributes from the left, and then merges other
on top of the hole.
public string to_string ()
Serializes a `PangoAttrList` to a string.
public void unref ()
Decrease the reference count of the given attribute list by one.
public void update (int pos, int remove, int add)
Update indices of attributes in this for a
change in the text they refer to.