Raxol.Terminal.Buffer.Eraser (Raxol v0.3.0)
View SourceHandles erasing parts of the Raxol.Terminal.ScreenBuffer. Includes functions for erasing lines, screen regions, and characters.
Summary
Functions
Clears the entire line using the provided default_style. Returns the updated buffer state.
Clears from the given position to the end of the line using the provided default_style. Returns the updated buffer state.
Clears from the beginning of the line to the given position using the provided default_style. Returns the updated buffer state.
Clears a rectangular region of the buffer by replacing cells with blank cells using the provided default_style. Returns the updated buffer state.
Clears the entire screen (main buffer grid) using the provided default_style. Returns the updated buffer state.
Clears the screen from the given position down using the provided default_style. Returns the updated buffer state.
Clears the screen from the beginning up to the given position using the provided default_style. Returns the updated buffer state.
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.
Functions
@spec clear_line( Raxol.Terminal.ScreenBuffer.t(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the entire line using the provided default_style. Returns the updated buffer state.
@spec clear_line_from( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears from the given position to the end of the line using the provided default_style. Returns the updated buffer state.
@spec clear_line_to( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears from the beginning of the line to the given position using the provided default_style. Returns the updated buffer state.
@spec clear_region( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears a rectangular region of the buffer by replacing cells with blank cells using the provided default_style. Returns the updated buffer state.
@spec clear_screen( Raxol.Terminal.ScreenBuffer.t(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the entire screen (main buffer grid) using the provided default_style. Returns the updated buffer state.
@spec clear_screen_from( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the screen from the given position down using the provided default_style. Returns the updated buffer state.
@spec clear_screen_to( Raxol.Terminal.ScreenBuffer.t(), integer(), integer(), Raxol.Terminal.ANSI.TextFormatting.text_style() ) :: Raxol.Terminal.ScreenBuffer.t()
Clears the screen from the beginning up to the given position using the provided default_style. Returns the updated buffer state.
@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() ) :: 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() ) :: 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.