PgAttributeList

Description Attributed text is used in a number of places in Pango. It is used as the input to the itemization process and also when creating a PangoLayout. The data types and functions in this section are used to represent and manipulate sets of attributes applied to a portion of text.

Constructors

this
this(PangoAttrList* pangoAttrList)

Sets our main struct and passes it to the parent class

this
this()

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

Members

Functions

change
void change(PgAttribute attr)

Insert the given attribute into the PangoAttrList. It will replace any attributes of the same type on that segment and be merged with any adjoining attributes that are identical. This function is slower than pango_attr_list_insert() for creating a attribute list in order (potentially much slower for large lists). However, pango_attr_list_insert() is not suitable for continually changing a set of attributes since it never removes or combines existing attributes.

copy
PgAttributeList copy()

Copy list and return an identical new list.

doref
PgAttributeList doref()

Increase the reference count of the given attribute list by one. Since 1.10

filter
PgAttributeList filter(PangoAttrFilterFunc func, void* data)

Given a PangoAttrList and callback function, removes any elements of list for which func returns TRUE and inserts them into a new list. Since 1.2

getIterator
PgAttributeIterator getIterator()

Create a iterator initialized to the beginning of the list. list must not be modified until this iterator is freed.

getPgAttributeListStruct
PangoAttrList* getPgAttributeListStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

insert
void insert(PgAttribute attr)

Insert the given attribute into the PangoAttrList. It will be inserted after all other attributes with a matching start_index.

insertBefore
void insertBefore(PgAttribute attr)

Insert the given attribute into the PangoAttrList. It will be inserted before all other attributes with a matching start_index.

splice
void splice(PgAttributeList 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. This operation is equivalent to stretching every attribute that applies at position pos in list by an amount len, and then calling pango_attr_list_change() with a copy of each attribute in other in sequence (offset in position by pos). This operation proves useful for, for instance, inserting a pre-edit string in the middle of an edit buffer.

unref
void unref()

Decrease the reference count of the given attribute list by one. If the result is zero, free the attribute list and the attributes it contains.

Variables

pangoAttrList
PangoAttrList* pangoAttrList;

the main Gtk struct

Meta