Raxol.Terminal.Buffer.Eraser (Raxol v0.5.0)

View Source

Provides screen clearing operations for the screen buffer. This module handles operations like clearing the screen, lines, and regions.

Summary

Functions

Clears the entire screen with the specified style.

Clears a specific line with the specified style.

Clears from the given position to the end of the line using the provided style. Returns the updated buffer state.

Clears from the beginning of the line to the given position using the provided style. Returns the updated buffer state.

Clears a region of the screen with the specified style.

Clears the entire screen (main buffer grid) using the provided style. Returns the updated buffer state.

Clears the screen from cursor position to end.

Clears the screen from start to cursor position.

Erases the entire screen.

Erases from cursor to end of display.

Erases from cursor to end of screen.

Erases from start of screen to cursor.

Erases parts of the display based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_screen* functions. Does not handle type 3 (scrollback) - that should be handled by the Emulator.

Erases parts of the current line based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_line* functions.

Erases from cursor to end of line.

Functions

clear(buffer, style \\ nil)

Clears the entire screen with the specified style.

clear_line(buffer, line_index, style \\ nil)

Clears a specific line with the specified style.

clear_line_from(buffer, y, x, style \\ nil)

Clears from the given position to the end of the line using the provided style. Returns the updated buffer state.

clear_line_to(buffer, y, x, style \\ nil)

Clears from the beginning of the line to the given position using the provided style. Returns the updated buffer state.

clear_region(buffer, x, y, width, height, style \\ nil)

Clears a region of the screen with the specified style.

clear_screen(buffer, style \\ nil)

Clears the entire screen (main buffer grid) using the provided style. Returns the updated buffer state.

clear_screen_from(buffer, y, x, style \\ nil)

Clears the screen from cursor position to end.

clear_screen_to(buffer, y, x, style \\ nil)

Clears the screen from start to cursor position.

erase_all(buffer)

Erases the entire screen.

erase_display_segment(buffer, x, y, style \\ nil)

Erases from cursor to end of display.

erase_from_cursor_to_end(buffer)

@spec erase_from_cursor_to_end(Raxol.Terminal.ScreenBuffer.t()) ::
  Raxol.Terminal.ScreenBuffer.t()

Erases from cursor to end of screen.

erase_from_start_to_cursor(buffer)

@spec erase_from_start_to_cursor(Raxol.Terminal.ScreenBuffer.t()) ::
  Raxol.Terminal.ScreenBuffer.t()

Erases from start of screen to cursor.

erase_in_display(buffer, cursor_pos, type, style \\ nil)

Erases parts of the display based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_screen* functions. Does not handle type 3 (scrollback) - that should be handled by the Emulator.

erase_in_line(buffer, cursor_pos, type, style \\ nil)

Erases parts of the current line based on cursor position and type. Type can be :toend, :to_beginning, or :all. Requires cursor state {col, row}. Delegates to specific clear_line* functions.

erase_line_segment(buffer, x, y, style \\ nil)

Erases from cursor to end of line.

get_cursor_position(buffer)

get_damage_regions(buffer)

mark_damaged(buffer, x, y, width, height)

set_cursor_position(buffer, x, y)

set_scroll_region(buffer, top, bottom)