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.

Inherited Attributes
attribute Inherited Attributes from ScrollView: scrollOffset
attribute Inherited Attributes 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.

Inherited Properties
property Inherited Properties from ScrollView: hasSelection
property Inherited Properties from Widget: focusable, focused, lastRenderFrame, position, size
property Inherited Properties from Object: type
Inherited Signals
signal Inherited Signals from ScrollView: text
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.

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