LEVIATHAN v962456e · 962456eee1

moby

class Input

since 0.1.0-alpha.1linux

bases
Focusable, Styleable, IValidatable, ISingleLine

Constructors

new

new()

Fields

changeHandlers_

Array<(string) => void> changeHandlers_

changeTokens_

Array<int> changeTokens_

cursor

int cursor

enabled

bool enabled

extraValidatorMessages_

Array<string> extraValidatorMessages_

extraValidators_

Array<() => bool> extraValidators_

hasValidator_

bool hasValidator_

lastValidationMessage_

string lastValidationMessage_

mask

char | None mask

maxLength

int maxLength

placeholder

string placeholder

scrollCells

int scrollCells

submitHandlers_

Array<(string) => void> submitHandlers_

submitTokens_

Array<int> submitTokens_

validator_

(string) => bool validator_

validatorMessage_

string validatorMessage_

value

string value

Methods

addValidator

addValidator(() => bool check, string message) -> void

cellAt

cellAt(int scalarIdx) -> int

commitEdit

commitEdit(Array<char> chars) -> void

contentDesired

contentDesired(Size avail) -> Size

cursorPos

cursorPos() -> Point | None

fireChange

fireChange() -> void

fireSubmit

fireSubmit() -> void

handleKey

handleKey(KeyEvent e) -> void

handlePaste

handlePaste(PasteEvent e) -> void

mask

mask(char m) -> Input

moveCursorTo

moveCursorTo(int newCursor) -> void

offChange

offChange(int token) -> void

offSubmit

offSubmit(int token) -> void

onChange

onChange((string) => void h) -> int

onSubmit

onSubmit((string) => void h) -> int

paintContent

paintContent(Surface s) -> void

recomputeScroll

recomputeScroll(int innerW) -> void

recomputeScrollIfLaidOut

recomputeScrollIfLaidOut() -> void

setEnabled

setEnabled(bool v) -> void

setMaxLength

setMaxLength(int n) -> void

setPlaceholder

setPlaceholder(string v) -> void

setValidatorMessage

setValidatorMessage(string msg) -> void

setValue

setValue(string v) -> void

validate

validate() -> bool

validationMessage

validationMessage() -> string

validator

validator((string) => bool check) -> Input

wordJumpLeft

wordJumpLeft(Array<char> chars, int from) -> int

wordJumpRight

wordJumpRight(Array<char> chars, int from) -> int