virtual class vaseGui::TextArea

sys::Obj
  vaseGui::Widget
    vaseGui::WidgetGroup
      vaseGui::Pane
        vaseGui::ContentPane
          vaseGui::ScrollPane
            vaseGui::TextArea

@Js

Text

caret

@Transient
NativeCaret caret := NativeCaret.<ctor>(this) { private set }

doPaint

protected virtual override Void doPaint(Graphics g)

hasSelected

Bool hasSelected()

keyEvent

virtual override Void keyEvent(KeyEvent e)

make

new make(Func<Void,This>? f := null)

model

@Transient
TextAreaModel? model := DefTextAreaModel.<ctor>("")

Backing data model of text document. The model cannot be changed once the widget has been been mounted into an open window.

motionEvent

protected virtual override Void motionEvent(MotionEvent e)

onCaret

EventListeners onCaret()

Callback when the caret position is modified.

Event id fired:

Event fields:

onModelModify

protected virtual Void onModelModify(Event event)

onModify

EventListeners onModify()

Callback when the text is modified. This event occurs after the modification. See onVerify to trap changes before they occur.

Event id fired:

Event fields:

onSelect

EventListeners onSelect()

Callback when the selection is modified.

Event id fired:

Event fields:

onVerify

EventListeners onVerify()

Callback before the text is modified. This gives listeners a chance to intercept modifications and potentially modify the inserted text. This event occurs before the modification. See onModify to trap changes after they occur.

Event id fired:

Event fields:

  • Event.data: a TextChange instance where newText specifies the proposed text being inserted. The callback can update newText with the actual text to be inserted or set to null to cancel the modification.
onVerifyKey

EventListeners onVerifyKey()

Callback before a key event is processed. This gives listeners a chance to trap the key event and consume it before it is processed by the editor.

Event id fired:

Event fields:

prefContentSize

protected virtual override Size prefContentSize(Int hintsWidth := -1, Int hintsHeight := -1)

rowHeight

Int rowHeight()

selectionEnd

Int selectionEnd := -1

Exclusive end position

selectionStart

Int selectionStart := -1

Inclusive start position

showLine

Void showLine(Int lineIndex)

Ensure the editor is scrolled such that the specified line is visible.

tabSpacing

Int tabSpacing := 4

Tab width measured in space characters.

text

Str text

Convenience for model.text (model must be installed).