Structures

The following structures are available globally.

  • Describes a key event, this includes the key value, and there are two convenience properties isAlt and isControl

    See more

    Declaration

    Swift

    public struct KeyEvent
  • Flags for a mouse event

    See more

    Declaration

    Swift

    public struct MouseFlags : OptionSet, CustomDebugStringConvertible
  • Describes a mouse event, the pos property contains the view relative position where the mouse event took place, and the absPos contains the screen absolute position of where the event took place.

    The state of the mouse event is described in flags and is used to determine what kind of event this is (movement, press, release, click).

    The view property, if set, indicates on which view the event took place.

    See more

    Declaration

    Swift

    public struct MouseEvent : CustomDebugStringConvertible
  • Point represents a position in the screen using an x and y coordinate for the column and row respectively.

    See more

    Declaration

    Swift

    public struct Point : CustomDebugStringConvertible, Codable, Equatable
  • Undocumented

    See more

    Declaration

    Swift

    public struct Rect : CustomDebugStringConvertible, Codable, Equatable
  • Undocumented

    See more

    Declaration

    Swift

    public struct Size : CustomDebugStringConvertible, Codable, Equatable
  • Describes the flags that can control with additional terminal capabilities for rendering text

    See more

    Declaration

    Swift

    public struct CellFlags : OptionSet, Hashable
  • Attributes are used as elements that contain both a foreground and a background or platform specific features.

    Attributes are needed to map colors to terminal capabilities that might lack colors, on color scenarios, they encode both the foreground and the background color. On black and white terminals, they encode attributes like “Bold”, “reverse”, “normal”, “blink”.

    Attributes are used in the ColorScheme class to define color schemes that can be used in your application, and they are also used by views directly when they defined their own attributes.

    See more

    Declaration

    Swift

    public struct Attribute
  • A menu item has a title, an associated help text, and an action to execute on activation.

    See more

    Declaration

    Swift

    public struct MenuItem