Terminal class abstract

A virtual terminal screen that can have character data written onto it

Implementers

Constructors

Terminal()

Properties

background Color
The default background color when none is specified
getter/setter pair
bounds Rect
The bounds of this terminal as a Rect
no setter
foreground Color
The default foreground color when none is specified
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height int
The height of the terminal screen in rows of characters
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Vec2
The size of the terminal as a vector
no setter
width int
The width of the terminal screen in columns of characters
no setter

Methods

boundsCheck(int x, int y) → void
Ensures that the given position x, y is within the bounds of this Terminal
child(int x, int y, int width, int height) Terminal
Get a child Terminal within this one
childRect(Rect rect) Terminal
Get a child Terminal within this one, defined by the given rect.
clear() → void
Clears the entire terminal with empty characters using the current background Color.
drawChar(int x, int y, Char char) → void
Most basic draw method for the terminal; draws the given Char at column x, row y of this Terminal.
drawCharCode(int x, int y, int charCode, [Color? foreground, Color? background]) → void
Draws a character at column x, row y of this Terminal using its integer charCode using the given foreground and background Colors (or default colors).
drawText(int x, int y, String text, [Color? foreground, Color? background]) → void
Draws the string of characters in text starting at column x, row y of this Terminal using the given foreground and background Colors (or default colors). The text will be truncated if it runs beyond the bounds of the terminal.
drawTextCenter(int y, String text, [Color? foreground, Color? background]) → void
Draws the string of characters in text on row y such that the text is centered horizontally in this Terminal. If the length of text is longer than this terminal's width, the text will be positioned at column 0.
fill(int x, int y, int width, int height, [Color? color]) → void
Clears and fills the given rectangle with the given (or default) background Color.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited