Skip to main content

Module text_input

Module text_input 

Source
Expand description

Single line text input widget Single-line text input widget with cursor, placeholder, and two-way data binding.

The main entry point is [TextInput], which holds the editable state ([TextInputState]) together with per-platform default styles. Call [TextInput::dom()] to obtain a renderable [Dom] node.

For higher-level text-input management (IME, clipboard, undo) see layout/src/managers/text_input.rs.

Structs§

OnTextInputReturn
Return value from a text-input callback indicating whether the framework should update and whether the input was valid.
TextInput
Single-line text input widget with platform-native styling.
TextInputOnFocusLost
TextInputOnFocusLostCallback
TextInputOnTextInput
TextInputOnTextInputCallback
TextInputOnVirtualKeyDown
TextInputOnVirtualKeyDownCallback
TextInputSelectionRange
TextInputState
Editable state of a text input (text buffer, cursor position, selection).
TextInputStateWrapper
TextInputState together with optional user callbacks and cursor animation state.

Enums§

OptionTextInputOnFocusLost
OptionTextInputOnTextInput
OptionTextInputOnVirtualKeyDown
OptionTextInputSelection
TextInputSelection
TextInputValid
Whether the text input accepted or rejected the most recent edit.

Statics§

TEXT_INPUT_ON_FOCUS_LOST_INVOKER
Process-global slot for this callback kind’s host-side invoker.
TEXT_INPUT_ON_TEXT_INPUT_INVOKER
Process-global slot for this callback kind’s host-side invoker.
TEXT_INPUT_ON_VIRTUAL_KEY_DOWN_INVOKER
Process-global slot for this callback kind’s host-side invoker.

Functions§

AzApp_setTextInputOnFocusLostCallbackInvoker
Register the host-side invoker for this callback kind.
AzApp_setTextInputOnTextInputCallbackInvoker
Register the host-side invoker for this callback kind.
AzApp_setTextInputOnVirtualKeyDownCallbackInvoker
Register the host-side invoker for this callback kind.
AzTextInputOnFocusLostCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.
AzTextInputOnTextInputCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.
AzTextInputOnVirtualKeyDownCallback_createFromHostHandle
C-ABI export wrapping <Wrapper>::create_from_host_handle.

Type Aliases§

AzTextInputOnFocusLostCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
AzTextInputOnTextInputCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
AzTextInputOnVirtualKeyDownCallbackInvoker
Pointer-arg variant of this callback kind’s typedef.
TextInputOnFocusLostCallbackType
TextInputOnTextInputCallbackType
TextInputOnVirtualKeyDownCallbackType