EditorView
classin packageklyn.gui.terminal
public class EditorView extends ScrollView
└ Widget
└ 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 Long = 0
No summary.
public showLineNumbers
showLineNumbers as Boolean = true
Displays left line numbers when true.
public statusMessage
statusMessage as String = ""
No summary.
Inherited Attributes
attributeInherited Attributes from ScrollView: scrollOffset
attributeInherited 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 Long
No summary.
Inherited Properties
propertyInherited Properties from ScrollView: hasSelection
propertyInherited Properties from Widget: focusable, focused, lastRenderFrame, position, size
propertyInherited Properties from Object: type
Inherited Signals
signalInherited 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 override 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 override handleVerticalScrollbarMouse
handleVerticalScrollbarMouse(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int, totalLines as Long, 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 override refresh
refresh() as Void
Re-renders the current document using the active highlighter.
public override scrollByAmount
scrollByAmount(delta as Int, totalLines as Long, viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Boolean
No summary.
public override visibleRowCount
visibleRowCount(viewHeight as Int, topInset as Int = 0, bottomInset as Int = 0) as Int
No summary.
Inherited Methods
methodInherited Methods from ScrollView: appendLine, clampScrollOffsetFor, clear, contentWidth, copySelectionToClipboard, handleVerticalScrollbarMouse, hasVerticalScrollbar, maxScrollOffsetFor, paintToFrame, scrollByAmount, scrollToTrackRow, scrollbarColumn, scrollbarThumbSize, scrollbarThumbTop, selectedText, terminalPromptVisible, toString, visibleRowCount
methodInherited Methods from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleEvent, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, refresh, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml