Type CodeEditor

type CodeEditor struct {
	Layout TextareaLayout
	// contains filtered or unexported fields
}

CodeEditor owns only reusable layout and highlight scratch space. Text and undo history remain in the application's editor. Layout supplies movement, pointer placement and scrolling, just like TextareaLayout.

Methods

Paint#

func (editor *CodeEditor) Paint(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, snapshot CodeEditorSnapshot) ui.Rect

Pointer#

func (editor *CodeEditor) Pointer(event ui.PointerEvent) ui.EventResult

Pointer handles the scrollbar drag without changing the text or selection.