CharData

public struct CharData : CustomDebugStringConvertible

Stores a cell with both the character being displayed as well as the color attribute. This uses an Int32 to store the value, if the value can not be encoded as a single Unicode.Scalar, then an index is stored that is looked up in parallel, so that full grapheme clusters can be tracked.

Use the getCharacter function to get the stored Character, and use the attribute property to retrieve the color and other character attributes. The width property contains the number of columns used by the Character stored in this CharData on the screen.

It is possible to change the value of the stored character by calling the setValue method.

  • Declaration

    Swift

    public var debugDescription: String { get }
  • Contains the number of columns used by the Character stored in this CharData on the screen.

    Declaration

    Swift

    public private(set) var width: Int8 { get }
  • The color and character attributes for the cell

    Declaration

    Swift

    public var attribute: Attribute
  • Undocumented

    Declaration

    Swift

    public var isSimpleRune: Bool { get }
  • Sets the Url token for the this CharData.

    Declaration

    Swift

    public mutating func setPayload(atom: TinyAtom)
  • Undocumented

    Declaration

    Swift

    public func getPayload() -> Any?
  • Undocumented

    Declaration

    Swift

    public var hasPayload: Bool { get }
  • The Null character can be used when filling up parts of the screeb

    Declaration

    Swift

    public static var Null: CharData
  • Updates the contents of this CharData with a new character.

    • Paramerter size: the number of fixed sized columns this character will take on the screen

    Declaration

    Swift

    public mutating func setValue(char: Character, size: Int32)

    Parameters

    char

    the new character that will be stored

  • Use this method to retrieve the Character stored in the CharData

    Declaration

    Swift

    public func getCharacter() -> Character