PgAttributeIterator

The #PangoAttrIterator structure is used to represent an iterator through a #PangoAttrList. A new iterator is created with pango_attr_list_get_iterator(). Once the iterator is created, it can be advanced through the style changes in the text using pango_attr_iterator_next(). At each style change, the range of the current style segment and the attributes currently in effect can be queried.

Constructors

this
this(PangoAttrIterator* pangoAttrIterator, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

copy
PgAttributeIterator copy()

Copy a #PangoAttrIterator

destroy
void destroy()

Destroy a #PangoAttrIterator and free all associated memory.

get
PgAttribute get(PangoAttrType type)

Find the current attribute of a particular type at the iterator location. When multiple attributes of the same type overlap, the attribute whose range starts closest to the current location is used.

getAttrs
ListSG getAttrs()

Gets a list of all attributes at the current position of the iterator.

getFont
void getFont(PgFontDescription desc, PgLanguage language, ListSG extraAttrs)

Get the font and other attributes at the current iterator position.

getPgAttributeIteratorStruct
PangoAttrIterator* getPgAttributeIteratorStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

next
bool next()

Advance the iterator until the next change of style.

range
void range(int start, int end)

Get the range of the current segment. Note that the stored return values are signed, not unsigned like the values in #PangoAttribute. To deal with this API oversight, stored return values that wouldn't fit into a signed integer are clamped to %G_MAXINT.

Variables

ownedRef
bool ownedRef;
Undocumented in source.
pangoAttrIterator
PangoAttrIterator* pangoAttrIterator;

the main Gtk struct

Meta