Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PangoTabArrayCtors

[275:14] static extends: object

Alternate constructors for PangoTabArray. Usage: PangoTabArrayCtors.<name>(...). The primary constructor lives directly on PangoTabArray.

Methods

  • newWithPositions (int size, bool positions_in_pixels, string first_alignment, int first_position, list varargs)

    Creates a PangoTabArray and allows you to specify the alignment and position of each tab stop. You must provide an alignment and position for @size tab stops.

    • @p size is number of tab stops in the array.
    • @p positions_in_pixels is whether positions are in pixel units.
    • @p first_alignment is alignment of first tab stop.
    • @p first_position is position of first tab stop.
    • @p ... is additional alignment/position pairs.
    • @r A new PangoTabArray.

class: PangoTabArray

[15:7] extends: object

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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PangoTabArray (initial_size = null, positions_in_pixels = null)

    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.

    • @p initial_size is Initial number of tab stops to allocate, can be 0.
    • @p positions_in_pixels is whether positions are in pixel units.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • copy ()

    Copies a PangoTabArray.

    • @r the newly allocated PangoTabArray, which should be freed with [method@Pango.TabArray.free]..
  • free ()

    Frees a tab array and associated resources.

    • @r None.
  • get_decimal_point (int tab_index)

    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.

    • @p tab_index is the index of a tab stop.
  • get_positions_in_pixels ()

    Returns %TRUE if the tab positions are in pixels, %FALSE if they are in Pango units.

    • @r whether positions are in pixels..
  • get_size ()

    Gets the number of tab stops in @tab_array.

    • @r the number of tab stops in the array..
  • get_tab (int tab_index)

    Gets the alignment and position of a tab stop.

    • @p tab_index is tab stop index.
    • @p alignment is location to store alignment.
    • @p location is location to store tab position.
    • @r None.
  • get_tabs ()

    If non-%NULL, @alignments and @locations are filled with allocated arrays. The arrays are of length [method@Pango.TabArray.get_size]. You must free the returned array.

    • @p alignments is location to store an array of tab stop alignments.
    • @p locations is location to store an array of tab positions.
    • @r None.
  • resize (int new_size)

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

    • @p new_size is new size of the array.
    • @r None.
  • set_decimal_point (int tab_index, int decimal_point)

    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.

    • @p tab_index is the index of a tab stop.
    • @p decimal_point is the decimal point to use.
    • @r None.
  • set_positions_in_pixels (bool positions_in_pixels)

    Sets whether positions in this array are specified in pixels.

    • @p positions_in_pixels is whether positions are in pixels.
    • @r None.
  • set_tab (int tab_index, string alignment, int location)

    Sets the alignment and location of a tab stop.

    • @p tab_index is the index of a tab stop.
    • @p alignment is tab alignment.
    • @p location is tab location in Pango units.
    • @r None.
  • sort ()

    Utility function to ensure that the tab stops are in increasing order.

    • @r None.
  • to_string ()

    Serializes a PangoTabArray to a string. In the resulting string, serialized tabs are separated by newlines or commas. Individual tabs are serialized to a string of the form [ALIGNMENT:]POSITION[:DECIMAL_POINT] Where ALIGNMENT is one of left, right, center or decimal, and POSITION is the position of the tab, optionally followed by the unit px. If ALIGNMENT is omitted, it defaults to left. If ALIGNMENT is decimal, the DECIMAL_POINT character may be specified as a Unicode codepoint. Note that all tabs in the array must use the same unit. A typical example: 100px 200px center:300px right:400px

    • @r a newly allocated string.