Raxol.Terminal.Cursor.Movement (Raxol v2.0.1)

View Source

Handles cursor movement operations for the terminal cursor. Extracted from Raxol.Terminal.Cursor.Manager to reduce file size.

Summary

Functions

Constrains the cursor position to within the specified bounds.

Moves the cursor down by the specified number of lines.

Moves the cursor to the home position (0, 0).

Moves the cursor left by the specified number of columns.

Moves the cursor right by the specified number of columns.

Moves the cursor to a specific position with bounds clamping.

Moves the cursor to the specified column.

Moves the cursor to the specified column with bounds clamping.

Moves the cursor to the specified line.

Moves the cursor to the end of the line.

Moves the cursor to the beginning of the line.

Moves the cursor to the next tab stop.

Moves the cursor to the previous tab stop.

Moves the cursor up by the specified number of lines.

Functions

constrain_position(cursor, width, height)

Constrains the cursor position to within the specified bounds.

move_down(cursor, lines, width, height)

Moves the cursor down by the specified number of lines.

move_home(cursor, width, height)

Moves the cursor to the home position (0, 0).

move_left(cursor, cols, width, height)

Moves the cursor left by the specified number of columns.

move_right(cursor, cols, width, height)

Moves the cursor right by the specified number of columns.

move_to_bounded(cursor, row, col, width, height)

Moves the cursor to a specific position with bounds clamping.

move_to_column(cursor, column)

Moves the cursor to the specified column.

move_to_column(cursor, column, width, height)

Moves the cursor to the specified column with bounds clamping.

move_to_line(cursor, line)

Moves the cursor to the specified line.

move_to_line_end(cursor, line_width)

Moves the cursor to the end of the line.

move_to_line_start(cursor)

Moves the cursor to the beginning of the line.

move_to_next_tab(cursor, tab_size, width, height)

Moves the cursor to the next tab stop.

move_to_prev_tab(cursor, tab_size, width, height)

Moves the cursor to the previous tab stop.

move_up(cursor, lines, width, height)

Moves the cursor up by the specified number of lines.