Widget
class in package klyn.gui.terminal

    public class Widget extends Object:

Object
└ Widget

Base UI widget.

Fields

Modifier and Type | Member | Description
--- | --- | ---
public | lastRenderAnsi `lastRenderAnsi as String = ""` | No summary.
public | lastRenderHeight `lastRenderHeight as Int = 0` | No summary.
public | lastRenderPlain `lastRenderPlain as String = ""` | No summary.
public | lastRenderWidth `lastRenderWidth as Int = 0` | No summary.
public | layout `layout as Layout = null` | No summary.
public | visible `visible as Boolean = true` | No summary.

Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | focusable `focusable as Boolean = false` | Returns true when this widget can receive keyboard focus.
public property | focused `focused as Boolean:` | Focus state of this widget.
public readonly property | lastRenderFrame `lastRenderFrame as TerminalFrame:` | Last rendered logical frame, when available.
public property | position `position as Tuple<UInt, UInt>:` | Widget top-left position expressed as `(x, y)`.
public property | size `size as Tuple<UInt, UInt>:` | Widget viewport size expressed as `(width, height)`.

Inherited Properties
property Inherited Properties from Object: type
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | add `add(child as Widget) as Void:` | No summary.
public static | baseAnsiStyle `baseAnsiStyle() as String:` | Shared terminal base style used after ANSI fragments that locally override colors.
public | captureRenderFrame `captureRenderFrame(frame as TerminalFrame) as Void:` | Stores the latest rendered logical frame for debugging/validation.
public | children `children() as ArrayList<klyn.gui.terminal.Widget>:` | No summary.
public | clearChildren `clearChildren() as Void:` | No summary.
public | configureCursor `configureCursor(frame as TerminalFrame, row as Int, col as Int, width as Int, height as Int) as Boolean:` | Lets a widget place the terminal cursor inside its own frame area.
public | focusNext `focusNext(reverse as Boolean = false) as Boolean:` | Moves focus to the next focusable descendant.
public | handleEvent `handleEvent(eventName as String) as Boolean:` | Handles a keyboard/terminal event.
public | handleMouseEvent `handleMouseEvent(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int) as Boolean:` | Handles a mouse event in widget-local coordinates.
public | hasActiveTextInput `hasActiveTextInput() as Boolean:` | Returns true when this widget currently owns an active text input.
public | idle `idle() as Boolean:` | Called by the terminal event loop when no input event is pending.
public | paint `paint() as Void:` | No summary.
public | paintToFrame `paintToFrame(frame as TerminalFrame, row as Int, col as Int, width as Int, height as Int) as Boolean:` | Paints the widget directly into a logical terminal frame.
public | performLayout `performLayout() as Void:` | No summary.
public | refresh `refresh() as Void:` | Refreshes widget content when the widget maintains an internal render cache.
public | renderAnsiSnapshot `renderAnsiSnapshot() as String:` | No summary.
public | renderPlainSnapshot `renderPlainSnapshot() as String:` | No summary.
public static | scrollbarThumbGlyph `scrollbarThumbGlyph() as String:` | Shared scrollbar thumb glyph.
public static | scrollbarTrackGlyph `scrollbarTrackGlyph() as String:` | Shared scrollbar track glyph.
public | terminalPromptVisible `terminalPromptVisible() as Boolean:` | Returns true when the terminal should draw its built-in prompt below this widget.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml