Raxol.Terminal.ScreenBuffer (Raxol v0.5.0)
View SourceManages the terminal's screen buffer state (grid, scrollback, selection). This module serves as the main interface for terminal buffer operations, delegating specific operations to specialized modules in Raxol.Terminal.Buffer.*.
Structure
The buffer consists of:
- A main grid of cells (the visible screen)
- A scrollback buffer for history
- Selection state
- Scroll region settings
- Dimensions (width and height)
Operations
The module delegates operations to specialized modules:
Content
- Writing and content managementScrollRegion
- Scroll region and scrolling operationsLineOperations
- Line manipulationCharEditor
- Character editingLineEditor
- Line editingEraser
- Clearing operationsSelection
- Text selectionScrollback
- History managementQueries
- State queryingInitializer
- Buffer creation and validationCursor
- Cursor state managementCharset
- Character set managementFormatting
- Text formatting and styling
Summary
Functions
Deletes lines at a specific position.
Inserts blank lines at a specific position with style.
Inserts blank lines at a specific position within a region.
See Raxol.Terminal.ScreenBuffer.Core.mark_damaged/6
.
Types
@type t() :: %Raxol.Terminal.ScreenBuffer{ cells: [[Raxol.Terminal.Cell.t()]], cursor_position: {non_neg_integer(), non_neg_integer()}, damage_regions: [ {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()} ], default_style: Raxol.Terminal.ANSI.TextFormatting.text_style(), height: non_neg_integer(), scroll_region: {integer(), integer()} | nil, scrollback: [[Raxol.Terminal.Cell.t()]], scrollback_limit: non_neg_integer(), selection: {integer(), integer(), integer(), integer()} | nil, width: non_neg_integer() }
Functions
Deletes lines at a specific position.
Parameters
- For command handlers: y, count, style, and region boundaries
- For region operations: lines, y, top, and bottom positions
Inserts blank lines at a specific position with style.
Inserts blank lines at a specific position within a region.
See Raxol.Terminal.ScreenBuffer.Core.mark_damaged/6
.