RenderStyle
classin packageklyn.gui.terminal
public class RenderStyle extends Object:
└ RenderStyle
Mutable terminal cell style. The style tracks the visual state independently from ANSI escape codes so it can be diffed, snapshotted and tested before serialization. @since 1.0
Fields
Modifier and Type Member Description
public bgBlue
bgBlue as Int = 0
No summary.
public bgGreen
bgGreen as Int = 0
No summary.
public bgRed
bgRed as Int = 0
No summary.
public bold
bold as Boolean = false
No summary.
public fgBlue
fgBlue as Int = 235
No summary.
public fgGreen
fgGreen as Int = 225
No summary.
public fgRed
fgRed as Int = 215
No summary.
public inverse
inverse as Boolean = false
No summary.
public underline
underline as Boolean = false
No summary.
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public RenderStyle
RenderStyle(fgRed as Int = 215, fgGreen as Int = 225, fgBlue as Int = 235, bgRed as Int = 0, bgGreen as Int = 0, bgBlue as Int = 0, bold as Boolean = false, underline as Boolean = false, inverse as Boolean = false):
Builds a render style with explicit colors and attributes.
Methods
Modifier and Type Member Description
public assign
assign(other as RenderStyle) as Void:
Copies all values from another style.
public copy
copy() as RenderStyle:
Returns an independent copy of this style.
public sameAs
sameAs(other as RenderStyle) as Boolean:
Returns true when both styles describe the same visual state.
public setBackground
setBackground(red as Int, green as Int, blue as Int) as Void:
Updates the background color.
public setForeground
setForeground(red as Int, green as Int, blue as Int) as Void:
Updates the foreground color.
public static terminalBase
terminalBase() as RenderStyle:
Returns the default terminal style used by the UI.
public toAnsi
toAnsi() as String:
Serializes the style to a full ANSI SGR sequence.
public override toString
toString() as String:
Returns a readable debug representation.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml