Raxol.UI.Components.Input.MultiLineInput.EventHandler (Raxol v0.5.0)

View Source

Handles 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

handle_backspace(event, state)

handle_character_input(event, state)

handle_delete(event, state)

handle_down_arrow_navigation(event, state)

handle_event(event, state)

Handles events for the multi-line input component.

Parameters

  • event - The event to handle
  • state - The current state of the component

Returns

A tuple of {:ok, new_state} or {:error, reason}.

handle_key_event(event, input_stat)

Handles key events for MultiLineInput, translating them into update messages for the component. Only processes events when the key state is :pressed or :repeat.

handle_left_arrow_navigation(event, state)

handle_mouse_event(event, state)

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.

handle_new_line(event, state)

handle_resize_event(event, state)

Handles resize events.

Parameters

  • _event: The resize event
  • state: The current state

Returns

  • {:ok, updated_state}

handle_right_arrow_navigation(event, state)

handle_scroll_event(event, state)

Handles scroll events.

Parameters

  • _event: The scroll event
  • state: The current state

Returns

  • {:ok, updated_state}

handle_special_case_pagedown(event, input_state)

Special case for testing: handles the :pagedown key event directly, returning an update message to move the cursor down by one page.

handle_special_case_pageup(event, input_state)

Special case for testing: handles the :pageup key event directly, returning an update message to move the cursor up by one page.

handle_special_case_shift_arrow(event, input_state)

handle_tab_completion(event, state)

handle_unhandled_event(event, state)

handle_up_arrow_navigation(event, state)