Raxol.UI.Components.Input.MultiLineInput.NavigationHelper (Raxol v2.0.1)
View SourceNavigation helper functions for MultiLineInput component cursor movement and selection operations.
Summary
Functions
Clears the current selection.
Checks if a line index is within the selection range.
Moves the cursor in the specified direction within the multi-line input.
Moves the cursor to the end of the document.
Moves the cursor to the start of the document.
Moves the cursor to the end of the current line.
Moves the cursor to the start of the current line.
Moves the cursor by a page (viewport height) in the specified direction.
Normalizes the selection range, ensuring start comes before end. Returns {nil, nil} if no selection exists.
Selects all text in the input.
Functions
@spec clear_selection(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Clears the current selection.
@spec line_in_selection?( integer(), {integer(), integer()} | nil, {integer(), integer()} | nil ) :: boolean()
Checks if a line index is within the selection range.
@spec move_cursor( Raxol.UI.Components.Input.MultiLineInput.t(), :left | :right | :up | :down ) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor in the specified direction within the multi-line input.
@spec move_cursor_doc_end(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor to the end of the document.
@spec move_cursor_doc_start(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor to the start of the document.
@spec move_cursor_line_end(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor to the end of the current line.
@spec move_cursor_line_start(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor to the start of the current line.
@spec move_cursor_page(Raxol.UI.Components.Input.MultiLineInput.t(), :up | :down) :: Raxol.UI.Components.Input.MultiLineInput.t()
Moves the cursor by a page (viewport height) in the specified direction.
@spec normalize_selection(Raxol.UI.Components.Input.MultiLineInput.t()) :: {{integer(), integer()}, {integer(), integer()}} | {nil, nil}
Normalizes the selection range, ensuring start comes before end. Returns {nil, nil} if no selection exists.
@spec select_all(Raxol.UI.Components.Input.MultiLineInput.t()) :: Raxol.UI.Components.Input.MultiLineInput.t()
Selects all text in the input.