Label3

public class Label3 : View

Label view, displays a string at a given position, can include multiple lines.

  • Controls the text-alignemtn property of the label, changing it will redisplay the label.

    Declaration

    Swift

    public var textAlignment: TextAlignment { get set }
  • Initializes a Label with the provided string

    Declaration

    Swift

    public init(_ text: String)
  • The text displayed by this view

    Declaration

    Swift

    public var text: String { get set }
  • The color used for the label, if not set, it will use the normal color from the ColorScheme in use

    Declaration

    Swift

    public var textAttribute: Attribute? { get set }
  • Declaration

    Swift

    public override func redraw(region: Rect, painter: Painter)
  • Computes the number of lines needed to render the specified text by the Label control

    • Paramter str: Text, may contain newlines.
    • The width for the text.

    Declaration

    Swift

    public static func measureString(text: String, width: Int) -> Int
  • Computes the the max width of a line or multilines needed to render by the Label control.

    • Paramter width: optional, the maximum width desired, it will clamp to that value.

    Declaration

    Swift

    public static func maxWidth(text: String, width: Int = INTPTR_MAX) -> Int

    Parameters

    text

    text to measure

  • Undocumented

    Declaration

    Swift

    public override var debugDescription: String { get }