BufferLine

public class BufferLine : CustomDebugStringConvertible

Undocumented

  • Undocumented

    Declaration

    Swift

    public init(cols: Int, fillData: CharData? = nil, isWrapped: Bool = false)
  • Undocumented

    Declaration

    Swift

    public init(from other: BufferLine)
  • Undocumented

    Declaration

    Swift

    public var count: Int { get }
  • Undocumented

    Declaration

    Swift

    public subscript(index: Int) -> CharData { get set }
  • Undocumented

    Declaration

    Swift

    public func getWidth(index: Int) -> Int
  • Test whether contains any chars.

    Declaration

    Swift

    public func hasContent(index: Int) -> Bool
  • Undocumented

    Declaration

    Swift

    public func hasAnyContent() -> Bool
  • Undocumented

    Declaration

    Swift

    public func insertCells(pos: Int, n: Int, rightMargin: Int, fillData: CharData)
  • Undocumented

    Declaration

    Swift

    public func deleteCells(pos: Int, n: Int, rightMargin: Int, fillData: CharData)
  • Undocumented

    Declaration

    Swift

    public func replaceCells(start: Int, end: Int, fillData: CharData)
  • Undocumented

    Declaration

    Swift

    public func resize(cols: Int, fillData: CharData)
  • Undocumented

    Declaration

    Swift

    public func fill(with: CharData)
  • Undocumented

    Declaration

    Swift

    public func fill(with: CharData, atCol: Int, len: Int)
  • Undocumented

    Declaration

    Swift

    public func copyFrom(line: BufferLine)
  • Returns the trimmed length in terms of cells used from the BufferLine

    Declaration

    Swift

    public func getTrimmedLength() -> Int
  • Undocumented

    Declaration

    Swift

    public func copyFrom(_ src: BufferLine, srcCol: Int, dstCol: Int, len: Int)
  • Returns the contents of the line as a string in the specified range

    Declaration

    Swift

    public func translateToString(trimRight: Bool = false, startCol: Int = 0, endCol: Int = -1) -> String

    Parameters

    trimRight

    if true, then this will trim any empty space from the right side of the terminal, otherwise, blanks will be included

    startCol

    the starting column to copy the data from, defaults toe zero if not provided

    endCol

    the end column (not included) to consume. If the value -1, this copies all the way to the end

    Return Value

    a string containing the contents of the BufferLine from [startCol..<endCol]

  • Undocumented

    Declaration

    Swift

    public func attach(image: TerminalImage)
  • Declaration

    Swift

    public var debugDescription: String { get }