Raxol.UI.Components.Input.MultiLineInput.EventHandler (Raxol v0.5.0)
View SourceHandles events for the MultiLineInput component.
Summary
Functions
Handles events for the multi-line input component.
Handles key events for MultiLineInput, translating them into update messages for the component. Only processes events when the key state is :pressed or :repeat.
Handles mouse events for MultiLineInput, supporting both x/y fields and position tuple formats. Returns an update message to move the cursor to the clicked position.
Handles resize events.
Handles scroll events.
Special case for testing: handles the :pagedown key event directly, returning an update message to move the cursor down by one page.
Special case for testing: handles the :pageup key event directly, returning an update message to move the cursor up by one page.
Functions
Handles events for the multi-line input component.
Parameters
event
- The event to handlestate
- The current state of the component
Returns
A tuple of {:ok, new_state}
or {:error, reason}
.
Handles key events for MultiLineInput, translating them into update messages for the component. Only processes events when the key state is :pressed or :repeat.
Handles mouse events for MultiLineInput, supporting both x/y fields and position tuple formats. Returns an update message to move the cursor to the clicked position.
Handles resize events.
Parameters
- _event: The resize event
- state: The current state
Returns
{:ok, updated_state}
Handles scroll events.
Parameters
- _event: The scroll event
- state: The current state
Returns
{:ok, updated_state}
Special case for testing: handles the :pagedown key event directly, returning an update message to move the cursor down by one page.
Special case for testing: handles the :pageup key event directly, returning an update message to move the cursor up by one page.