AttrList

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.

Constructors

this
this()

Create a new empty attribute list with a reference count of one.

Members

Functions

change
void change(pango.attribute.Attribute attr)

Insert the given attribute into the pango.attr_list.AttrList.

copy
pango.attr_list.AttrList copy()

Copy list and return an identical new list.

equal
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.

filter
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.

getAttributes
pango.attribute.Attribute[] getAttributes()

Gets a list of all attributes in list.

getIterator
pango.attr_iterator.AttrIterator getIterator()

Create a iterator initialized to the beginning of the list.

insert
void insert(pango.attribute.Attribute attr)

Insert the given attribute into the pango.attr_list.AttrList.

insertBefore
void insertBefore(pango.attribute.Attribute attr)

Insert the given attribute into the pango.attr_list.AttrList.

splice
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.

toString_
string toString_()

Serializes a pango.attr_list.AttrList to a string.

update
void update(int pos, int remove, int add)

Update indices of attributes in list for a change in the text they refer to.

Static functions

fromString
pango.attr_list.AttrList fromString(string text)

Deserializes a pango.attr_list.AttrList from a string.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.