Gjsify LogoGjsify Logo

A PangoTabArray contains an array of tab stops.

PangoTabArray can be used to set tab stops in a PangoLayout. Each tab stop has an alignment, a position, and optionally a character to use as decimal point.

record

Hierarchy

  • TabArray

Index

Constructors

  • new TabArray(initialSize: number, positionsInPixels: boolean): TabArray
  • Creates an array of initial_size tab stops.

    Tab stops are specified in pixel units if positions_in_pixels is %TRUE, otherwise in Pango units. All stops are initially at position 0.

    Parameters

    • initialSize: number

      Initial number of tab stops to allocate, can be 0

    • positionsInPixels: boolean

      whether positions are in pixel units

    Returns TabArray

Properties

name: string

Methods

  • free(): void
  • getDecimalPoint(tabIndex: number): string
  • Gets the Unicode character to use as decimal point.

    This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment, which align content at the first occurrence of the decimal point character.

    The default value of 0 means that Pango will use the decimal point according to the current locale.

    Parameters

    • tabIndex: number

      the index of a tab stop

    Returns string

  • getPositionsInPixels(): boolean
  • Returns %TRUE if the tab positions are in pixels, %FALSE if they are in Pango units.

    Returns boolean

  • getSize(): number
  • getTab(tabIndex: number): [TabAlign, number]
  • Gets the alignment and position of a tab stop.

    Parameters

    • tabIndex: number

      tab stop index

    Returns [TabAlign, number]

  • If non-%NULL, alignments and locations are filled with allocated arrays.

    The arrays are of length [methodPango.TabArray.get_size]. You must free the returned array.

    Returns [TabAlign, number[]]

  • resize(newSize: number): void
  • Resizes a tab array.

    You must subsequently initialize any tabs that were added as a result of growing the array.

    Parameters

    • newSize: number

      new size of the array

    Returns void

  • setDecimalPoint(tabIndex: number, decimalPoint: string): void
  • Sets the Unicode character to use as decimal point.

    This is only relevant for tabs with %PANGO_TAB_DECIMAL alignment, which align content at the first occurrence of the decimal point character.

    By default, Pango uses the decimal point according to the current locale.

    Parameters

    • tabIndex: number

      the index of a tab stop

    • decimalPoint: string

      the decimal point to use

    Returns void

  • setPositionsInPixels(positionsInPixels: boolean): void
  • Sets whether positions in this array are specified in pixels.

    Parameters

    • positionsInPixels: boolean

      whether positions are in pixels

    Returns void

  • setTab(tabIndex: number, alignment: TabAlign, location: number): void
  • Sets the alignment and location of a tab stop.

    Parameters

    • tabIndex: number

      the index of a tab stop

    • alignment: TabAlign

      tab alignment

    • location: number

      tab location in Pango units

    Returns void

  • sort(): void
  • Utility function to ensure that the tab stops are in increasing order.

    Returns void

  • toString(): string
  • Serializes a PangoTabArray to a string.

    No guarantees are made about the format of the string, it may change between Pango versions.

    The intended use of this function is testing and debugging. The format is not meant as a permanent storage format.

    Returns string

  • Deserializes a PangoTabArray from a string.

    This is the counterpart to [methodPango.TabArray.to_string]. See that functions for details about the format.

    Parameters

    • text: string

      a string

    Returns TabArray

  • new(initialSize: number, positionsInPixels: boolean): TabArray
  • Creates an array of initial_size tab stops.

    Tab stops are specified in pixel units if positions_in_pixels is %TRUE, otherwise in Pango units. All stops are initially at position 0.

    Parameters

    • initialSize: number

      Initial number of tab stops to allocate, can be 0

    • positionsInPixels: boolean

      whether positions are in pixel units

    Returns TabArray

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