Raxol.Terminal.Integration.Buffer (Raxol v0.3.0)

View Source

Handles buffer and cursor management for the terminal.

Summary

Functions

Clears the terminal buffer.

Gets the current cursor position.

Gets the current scroll position.

Gets the total number of lines in the buffer.

Gets the current visible content.

Gets the number of visible lines.

Moves the cursor to a specific position.

Resizes the terminal buffer.

Scrolls the terminal buffer.

Writes text to the terminal buffer.

Functions

clear(state)

Clears the terminal buffer.

get_cursor_position(state)

Gets the current cursor position.

get_scroll_position(state)

Gets the current scroll position.

get_total_lines(state)

Gets the total number of lines in the buffer.

get_visible_content(state)

Gets the current visible content.

get_visible_lines(state)

Gets the number of visible lines.

move_cursor(state, x, y)

Moves the cursor to a specific position.

resize(state, width, height)

Resizes the terminal buffer.

scroll(state, direction, amount \\ 1)

Scrolls the terminal buffer.

write(state, text)

Writes text to the terminal buffer.