Renderer class
Manages frame buffers, terminal rendering, and output flushing.
- Available extensions
Constructors
- Renderer.create(int width, int height, {bool testing = false})
-
Opens guarded bindings and allocates a native renderer.
factory
Properties
- autoFlush → bool
-
Gets the current auto-flush setting.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- nextBuffer → Buffer
-
The buffer for the next frame, created lazily and invalidated after each render call.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addToHitGrid(
int x, int y, int width, int height, int id) → void - Registers a low-level native/debug hit-grid region.
-
checkHit(
int x, int y) → int - Queries the low-level native/debug hit grid.
-
clearClipboard(
{TerminalClipboardTarget target = TerminalClipboardTarget.clipboard}) → bool -
Available on Renderer, provided by the ClipboardSupport extension
Requests thattargetbe cleared, reporting whether OpenTUI wrote it. -
clearTerminal(
) → void - Clears the terminal screen.
-
copyToClipboard(
String text, {TerminalClipboardTarget target = TerminalClipboardTarget.clipboard}) → bool -
Available on Renderer, provided by the ClipboardSupport extension
Requests an explicit copy oftext, reporting whether OpenTUI wrote it. -
disableKittyKeyboard(
) → void -
Available on Renderer, provided by the KeyboardSupport extension
Disables the Kitty keyboard protocol and reverts to standard terminal key reporting. -
disableMouse(
) → void -
Available on Renderer, provided by the MouseSupport extension
Disables mouse reporting. -
dispose(
) → void - Releases all native renderer resources and detaches the finalizer.
-
enableKittyKeyboard(
{int flags = KittyFlags.disambiguateEscapeCodes}) → void -
Available on Renderer, provided by the KeyboardSupport extension
Enables the Kitty keyboard protocol with the givenflags. -
enableMouse(
{bool enableMovement = false}) → void -
Available on Renderer, provided by the MouseSupport extension
Enables mouse reporting; passenableMovementto also track pointer moves. -
hideCursor(
) → void -
Available on Renderer, provided by the CursorManagement extension
Hides the cursor by setting it invisible at position (0, 0). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryPixelResolution(
) → void -
Requests a
CSI 4;height;width tterminal pixel-resolution report. -
render(
{bool force = false, bool? autoFlush}) → void - Renders the current buffer to the terminal.
-
resize(
int width, int height) → void -
Resize the renderer (and its underlying buffer) to new dimensions.
Invalidates any cached
nextBufferreference. -
setAutoFlush(
bool enabled) → void - Sets the default auto-flush behavior for this renderer.
-
setBackgroundColor(
Color color) → void -
Sets the terminal background color to
color. -
setCursorColor(
Color color) → void -
Available on Renderer, provided by the CursorManagement extension
Sets the terminal cursor color. -
setCursorPosition(
int x, int y, {bool visible = true}) → void -
Available on Renderer, provided by the CursorManagement extension
Set cursor position and visibility. -
setCursorStyle(
CursorStyle style, {bool blinking = false}) → void -
Available on Renderer, provided by the CursorManagement extension
Sets the cursorstyleand whether it blinks. -
setupTerminal(
{bool useAlternateScreen = true}) → void - Initialize terminal session (enter alt screen, set modes)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited