Gjsify LogoGjsify Logo

A PangoAttrIterator is used to iterate through a PangoAttrList.

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

record

Hierarchy

  • AttrIterator

Index

Constructors

Properties

name: string

Methods

  • destroy(): void
  • 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

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

    Parameters

    • desc: FontDescription

      a PangoFontDescription to fill in with the current values. The family name in this structure will be set using [methodPango.FontDescription.set_family_static] using values from an attribute in the PangoAttrList associated with the iterator, so if you plan to keep it around, you must call: pango_font_description_set_family (desc, pango_font_description_get_family (desc)).

    Returns [Pango.Language, Pango.Attribute[]]

  • next(): boolean
  • range(): [number, number]
  • 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.

    Returns [number, number]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method