EditorView
class in package klyn.gui.terminal

    public class EditorView extends ScrollView:

Object
└ Widget
└ ScrollView
└ EditorView

Readable editor widget with syntax highlighting support.

Fields

Modifier and Type | Member | Description
--- | --- | ---
public | document `document as FileDocument = null` | Current document bound to this editor.
public | editable `editable as Boolean = true` | No summary.
public | scrollCol `scrollCol as Int = 0` | No summary.
public | scrollRow `scrollRow as Int = 0` | No summary.
public | showLineNumbers `showLineNumbers as Boolean = true` | Displays left line numbers when true.
public | statusMessage `statusMessage as String = ""` | No summary.

Attributes inherited from ScrollView: scrollOffset
Attributes inherited from Widget: lastRenderAnsi, lastRenderHeight, lastRenderPlain, lastRenderWidth, layout, visible
Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | cursorViewCol `cursorViewCol as Int:` | No summary.
public readonly property | cursorViewRow `cursorViewRow as Int:` | No summary.
public readonly property | totalLineCount `totalLineCount as Int:` | No summary.

Properties inherited from ScrollView: text
Properties inherited from Widget: focusable, focused, lastRenderFrame, position, size
Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | EditorView `EditorView(document as FileDocument = null):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | bindDocument `bindDocument(document as FileDocument) as Void:` | Binds a new document and refreshes rendered content.
public | currentDocument `currentDocument() as FileDocument:` | Returns the currently bound document.
public | handleEvent `handleEvent(eventName as String) as Boolean:` | Handles a terminal key event for basic text editing.
public override | handleMouseEvent `handleMouseEvent(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int) as Boolean:` | Handles a mouse event inside the editor viewport.
public | handleVerticalScrollbarMouse `handleVerticalScrollbarMouse(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int, totalLines as Int, topInset as Int = 0, bottomInset as Int = 0, rightInset as Int = 0) as Boolean:` | No summary.
public | moveCursorToViewPosition `moveCursorToViewPosition(row as Int, col as Int) as Boolean:` | No summary.
public override | paintToFrame `paintToFrame(frame as TerminalFrame, row as Int, col as Int, viewWidth as Int, viewHeight as Int) as Boolean:` | No summary.
public | refresh `refresh() as Void:` | Re-renders the current document using the active highlighter.
public | scrollByAmount `scrollByAmount(delta as Int, totalLines as Int, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Boolean:` | No summary.
public | visibleRowCount `visibleRowCount(viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int:` | No summary.

Methods inherited from ScrollView: appendLine, clampScrollOffsetFor, clear, contentWidth, hasVerticalScrollbar, maxScrollOffsetFor, paintToFrame, scrollToTrackRow, scrollbarColumn, scrollbarThumbSize, scrollbarThumbTop, terminalPromptVisible, toString
Methods inherited from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml