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(initial_size: number, positions_in_pixels: 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

    • initial_size: number

      Initial number of tab stops to allocate, can be 0

    • positions_in_pixels: boolean

      whether positions are in pixel units

    Returns TabArray

Properties

name: string

Methods

  • free(): void
  • get_decimal_point(tab_index: 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

    • tab_index: number

      the index of a tab stop

    Returns string

  • get_positions_in_pixels(): boolean
  • get_size(): number
  • get_tab(tab_index: number): [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(new_size: number): void
  • Resizes a tab array.

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

    Parameters

    • new_size: number

      new size of the array

    Returns void

  • set_decimal_point(tab_index: number, decimal_point: 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

    • tab_index: number

      the index of a tab stop

    • decimal_point: string

      the decimal point to use

    Returns void

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

    Parameters

    • positions_in_pixels: boolean

      whether positions are in pixels

    Returns void

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

    Parameters

    • tab_index: number

      the index of a tab stop

    • alignment: TabAlign

      tab alignment

    • location: number

      tab location in Pango units

    Returns void

  • sort(): void
  • to_string(): 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(initial_size: number, positions_in_pixels: 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

    • initial_size: number

      Initial number of tab stops to allocate, can be 0

    • positions_in_pixels: 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