Class (GI Struct)

Pango-1.0PangoAttrIteratorAbstract

A Pango.AttrIterator is used to iterate through a Pango.AttrList.

A new iterator is created with Pango.AttrList.get_iterator. Once the iterator is created, it can be advanced through the style changes in the text using Pango.AttrIterator.next. At each style change, the range of the current style segment and the attributes currently in effect can be queried.

Index

Constructors

Properties

Methods

Constructors

Properties

Methods

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

    Parameters

    Returns Pango.Attribute

    the current attribute of the given type, or null if no attribute of that type applies to the current location.

  • Advance the iterator until the next change of style.

    Returns boolean

    false if the iterator is at the end of the list, otherwise true

  • Get the range of the current segment.

    Note that the stored return values are signed, not unsigned like the values in Pango.Attribute. To deal with this API oversight, stored return values that wouldn't fit into a signed integer are clamped to G_MAXINT.

    Returns [number, number]