Raxol.Terminal.Buffer.Eraser (Raxol v0.5.0)
View SourceProvides 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
@spec clear( Raxol.Terminal.ScreenBuffer.t(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the entire screen with the specified style.
@spec clear_line( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears a specific line with the specified style.
@spec clear_line_from( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears from the given position to the end of the line using the provided style. Returns the updated buffer state.
@spec clear_line_to( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears from the beginning of the line to the given position using the provided style. Returns the updated buffer state.
@spec clear_region( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears a region of the screen with the specified style.
@spec clear_screen( Raxol.Terminal.ScreenBuffer.t(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the entire screen (main buffer grid) using the provided style. Returns the updated buffer state.
@spec clear_screen_from( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the screen from cursor position to end.
@spec clear_screen_to( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the screen from start to cursor position.
@spec erase_all(Raxol.Terminal.ScreenBuffer.t()) :: Raxol.Terminal.ScreenBuffer.t()
Erases the entire screen.
@spec erase_display_segment( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Erases from cursor to end of display.
@spec erase_from_cursor_to_end(Raxol.Terminal.ScreenBuffer.t()) :: Raxol.Terminal.ScreenBuffer.t()
Erases from cursor to end of screen.
@spec erase_from_start_to_cursor(Raxol.Terminal.ScreenBuffer.t()) :: Raxol.Terminal.ScreenBuffer.t()
Erases from start of screen to cursor.
@spec erase_in_display( Raxol.Terminal.ScreenBuffer.t(), {non_neg_integer(), non_neg_integer()}, :to_end | :to_beginning | :all, Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
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.
@spec erase_in_line( Raxol.Terminal.ScreenBuffer.t(), {non_neg_integer(), non_neg_integer()}, :to_end | :to_beginning | :all, Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
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.
@spec erase_line_segment( Raxol.Terminal.ScreenBuffer.t(), non_neg_integer(), non_neg_integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() | nil ) :: Raxol.Terminal.ScreenBuffer.t()
Erases from cursor to end of line.