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
- hasSelected
-
Bool hasSelected()
- keyEvent
- make
- 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:
- Event.offset: the new caret offset
- onModelModify
- 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:
- Event.data: the TextChange instance.
- onSelect
-
EventListeners onSelect()
Callback when the selection is modified.
Event id fired:
Event fields:
- Event.offset: the starting offset
- Event.size: the number of chars selected
- 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 updatenewText
with the actual text to be inserted or set to null to cancel the modification.
- Event.data: a TextChange instance where
- 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:
- Event.keyChar: unicode character represented by key event
- Event.key: key code including the modifiers
- 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
-
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).