Klasse TabArray

Alle implementierten Schnittstellen:
PointerInterface

public class TabArray extends Record
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.

https://docs.gtk.org/Pango/struct.TabArray.html

  • Konstruktordetails

    • TabArray

      public TabArray(PointerContainer pointer)
    • TabArray

      public TabArray(int initial_size, boolean positions_in_pixels)
      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.
      Parameter:
      initial_size - Initial number of tab stops to allocate, can be 0
      positions_in_pixels - whether positions are in pixel units
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newWithPositionsTabArray

      public static TabArray newWithPositionsTabArray(int size, boolean positions_in_pixels, int first_alignment, int first_position, Object... _ellipsis)
      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.
      Parameter:
      size - number of tab stops in the array
      positions_in_pixels - whether positions are in pixel units
      first_alignment - alignment of first tab stop
      first_position - position of first tab stop
      _ellipsis - additional alignment/position pairs
      Gibt zurück:
      the newly allocated `PangoTabArray`, which should be freed with [method@Pango.TabArray.free].
    • copy

      public TabArray copy()
      Copies a `PangoTabArray`.
      Gibt zurück:
      the newly allocated `PangoTabArray`, which should be freed with [method@Pango.TabArray.free].
    • free

      public void free()
      Frees a tab array and associated resources.
    • getDecimalPoint

      public byte getDecimalPoint(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.
      Parameter:
      tab_index - the index of a tab stop
      Gibt zurück:
    • getPositionsInPixels

      public boolean getPositionsInPixels()
      Returns %TRUE if the tab positions are in pixels,
      %FALSE if they are in Pango units.
      Gibt zurück:
      whether positions are in pixels.
    • getSize

      public int getSize()
      Gets the number of tab stops in @tab_array.
      Gibt zurück:
      the number of tab stops in the array.
    • getTab

      public void getTab(int tab_index, @Nullable Int alignment, @Nullable Int location)
      Gets the alignment and position of a tab stop.
      Parameter:
      tab_index - tab stop index
      alignment - location to store alignment
      location - location to store tab position
    • resize

      public void resize(int new_size)
      Resizes a tab array.

      You must subsequently initialize any tabs
      that were added as a result of growing the array.
      Parameter:
      new_size - new size of the array
    • setDecimalPoint

      public void setDecimalPoint(int tab_index, byte 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.
      Parameter:
      tab_index - the index of a tab stop
      decimal_point - the decimal point to use
    • setPositionsInPixels

      public void setPositionsInPixels(boolean positions_in_pixels)
      Sets whether positions in this array are specified in
      pixels.
      Parameter:
      positions_in_pixels - whether positions are in pixels
    • setTab

      public void setTab(int tab_index, int alignment, int location)
      Sets the alignment and location of a tab stop.
      Parameter:
      tab_index - the index of a tab stop
      alignment - tab alignment
      location - tab location in Pango units
    • sort

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

      public Str toStr()
      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
      Gibt zurück:
      a newly allocated string
    • fromString

      public static TabArray fromString(@Nonnull Str text)
      Deserializes a `PangoTabArray` from a string.

      This is the counterpart to [method@Pango.TabArray.to_string].
      See that functions for details about the format.
      Parameter:
      text - a string
      Gibt zurück:
      a new `PangoTabArray`
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()