TabArrayProtocol

public protocol TabArrayProtocol

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.

The TabArrayProtocol protocol exposes the methods and properties of an underlying PangoTabArray instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see TabArray. Alternatively, use TabArrayRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying PangoTabArray instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • tab_array_ptr Default implementation

    Typed pointer to the underlying PangoTabArray instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the PangoTabArray instance.

    Declaration

    Swift

    var tab_array_ptr: UnsafeMutablePointer<PangoTabArray>! { get }
  • Required Initialiser for types conforming to TabArrayProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TabArray Record: TabArrayProtocol extension (methods and fields)

  • copy() Extension method

    Copies a PangoTabArray.

    Declaration

    Swift

    @inlinable
    func copy() -> Pango.TabArrayRef!
  • free() Extension method

    Frees a tab array and associated resources.

    Declaration

    Swift

    @inlinable
    func free()
  • getDecimalPoint(tabIndex:) Extension method

    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.

    Declaration

    Swift

    @inlinable
    func getDecimalPoint(tabIndex: Int) -> gunichar
  • getPositionsInPixels() Extension method

    Returns true if the tab positions are in pixels, false if they are in Pango units.

    Declaration

    Swift

    @inlinable
    func getPositionsInPixels() -> Bool
  • getSize() Extension method

    Gets the number of tab stops in tab_array.

    Declaration

    Swift

    @inlinable
    func getSize() -> Int
  • Gets the alignment and position of a tab stop.

    Declaration

    Swift

    @inlinable
    func getTab(tabIndex: Int, alignment: UnsafeMutablePointer<PangoTabAlign>! = nil, location: UnsafeMutablePointer<gint>! = nil)
  • If non-nil, alignments and locations are filled with allocated arrays.

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

    Declaration

    Swift

    @inlinable
    func getTabs(alignments: UnsafeMutablePointer<UnsafeMutablePointer<PangoTabAlign>?>! = nil, locations: UnsafeMutablePointer<UnsafeMutablePointer<gint>?>! = nil)
  • resize(newSize:) Extension method

    Resizes a tab array.

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

    Declaration

    Swift

    @inlinable
    func resize(newSize: Int)
  • 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.

    Declaration

    Swift

    @inlinable
    func setDecimalPoint(tabIndex: Int, decimalPoint: gunichar)
  • set(positionsInPixels:) Extension method

    Sets whether positions in this array are specified in pixels.

    Declaration

    Swift

    @inlinable
    func set(positionsInPixels: Bool)
  • Sets the alignment and location of a tab stop.

    Declaration

    Swift

    @inlinable
    func setTab(tabIndex: Int, alignment: PangoTabAlign, location: Int)
  • sort() Extension method

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

    Declaration

    Swift

    @inlinable
    func sort()
  • toString() Extension method

    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.

    Declaration

    Swift

    @inlinable
    func toString() -> String!
  • positionsInPixels Extension method

    Returns true if the tab positions are in pixels, false if they are in Pango units.

    Declaration

    Swift

    @inlinable
    var positionsInPixels: Bool { get nonmutating set }
  • size Extension method

    Gets the number of tab stops in tab_array.

    Declaration

    Swift

    @inlinable
    var size: Int { get }