Raxol.Terminal.ScreenBuffer.Attributes (Raxol v2.0.1)

View Source

Manages buffer attributes including formatting, charset, and cursor state. Consolidates: Formatting, TextFormatting, Charset, Cursor functionality.

Summary

Functions

Applies single shift (stub).

Checks if attribute is set (stub).

Clears all tab stops.

Clears selection (stub).

Clears a tab stop at the current cursor position.

Creates a text style from SGR parameters.

Checks if cursor is blinking (stub).

Checks if cursor is visible (stub).

Designates charset (stub).

Gets the currently active charset.

Gets background color (stub).

Gets the active charset for a slot.

Gets current G set (stub).

Gets the cursor position.

Gets cursor style (stub).

Gets the default text style.

Gets designated charset (stub).

Gets foreground color (stub).

Gets selection (stub).

Gets selection boundaries (stub).

Gets selection end (stub).

Gets selection start (stub).

Gets set attributes (stub).

Gets single shift state (stub).

Gets text style (stub).

Checks if position is in selection (stub).

Invokes G set (stub).

Merges two styles, with the second taking precedence.

Moves the cursor relative to its current position.

Finds the next tab stop position from the current cursor.

Resets all attributes to defaults (stub).

Resets specific attribute (stub).

Resets charset state (stub).

Resets tab stops to default (every 8 columns).

Restores the saved cursor position.

Saves the current cursor position.

Selects which charset slot is active.

Checks if selection is active (stub).

Switches between main and alternate screen buffers.

Sets specific attribute (stub).

Sets background color (stub).

Sets the active charset (G0, G1, G2, G3).

Sets cursor blink state.

Sets the cursor position.

Sets cursor style.

Sets cursor visibility (stub).

Sets cursor visibility.

Sets the default text style for the buffer.

Sets foreground color (stub).

Sets a tab stop at the current cursor position.

Starts selection (stub).

Translates a character according to the active charset.

Updates selection (stub).

Updates text style (stub).

Checks if using alternate screen.

Functions

apply_single_shift(buffer, set)

Applies single shift (stub).

attribute_set?(buffer, attr)

@spec attribute_set?(Raxol.Terminal.ScreenBuffer.Core.t(), atom()) :: boolean()

Checks if attribute is set (stub).

clear_all_tab_stops(buffer)

Clears all tab stops.

clear_selection(buffer)

Clears selection (stub).

clear_tab_stop(buffer)

Clears a tab stop at the current cursor position.

create_style(params)

@spec create_style([integer()]) :: map()

Creates a text style from SGR parameters.

cursor_blinking?(buffer)

@spec cursor_blinking?(Raxol.Terminal.ScreenBuffer.Core.t()) :: boolean()

Checks if cursor is blinking (stub).

cursor_visible?(buffer)

@spec cursor_visible?(Raxol.Terminal.ScreenBuffer.Core.t()) :: boolean()

Checks if cursor is visible (stub).

designate_charset(buffer, set, charset)

Designates charset (stub).

get_active_charset(buffer)

@spec get_active_charset(Raxol.Terminal.ScreenBuffer.Core.t()) :: atom()

Gets the currently active charset.

get_background(buffer)

@spec get_background(Raxol.Terminal.ScreenBuffer.Core.t()) :: atom() | tuple()

Gets background color (stub).

get_charset(buffer, slot)

@spec get_charset(Raxol.Terminal.ScreenBuffer.Core.t(), atom()) :: atom()

Gets the active charset for a slot.

get_current_g_set(buffer)

@spec get_current_g_set(Raxol.Terminal.ScreenBuffer.Core.t()) :: integer()

Gets current G set (stub).

get_cursor_position(buffer)

@spec get_cursor_position(Raxol.Terminal.ScreenBuffer.Core.t()) ::
  {non_neg_integer(), non_neg_integer()}

Gets the cursor position.

get_cursor_style(buffer)

@spec get_cursor_style(Raxol.Terminal.ScreenBuffer.Core.t()) :: atom()

Gets cursor style (stub).

get_default_style(buffer)

@spec get_default_style(Raxol.Terminal.ScreenBuffer.Core.t()) :: map()

Gets the default text style.

get_designated_charset(buffer, set)

@spec get_designated_charset(Raxol.Terminal.ScreenBuffer.Core.t(), integer()) ::
  atom()

Gets designated charset (stub).

get_foreground(buffer)

@spec get_foreground(Raxol.Terminal.ScreenBuffer.Core.t()) :: atom() | tuple()

Gets foreground color (stub).

get_selection(buffer)

@spec get_selection(Raxol.Terminal.ScreenBuffer.Core.t()) ::
  {integer(), integer(), integer(), integer()} | nil

Gets selection (stub).

get_selection_boundaries(buffer)

@spec get_selection_boundaries(Raxol.Terminal.ScreenBuffer.Core.t()) ::
  {integer(), integer(), integer(), integer()} | nil

Gets selection boundaries (stub).

get_selection_end(buffer)

@spec get_selection_end(Raxol.Terminal.ScreenBuffer.Core.t()) ::
  {integer(), integer()} | nil

Gets selection end (stub).

get_selection_start(buffer)

@spec get_selection_start(Raxol.Terminal.ScreenBuffer.Core.t()) ::
  {integer(), integer()} | nil

Gets selection start (stub).

get_set_attributes(buffer)

@spec get_set_attributes(Raxol.Terminal.ScreenBuffer.Core.t()) :: [atom()]

Gets set attributes (stub).

get_single_shift(buffer)

@spec get_single_shift(Raxol.Terminal.ScreenBuffer.Core.t()) :: integer() | nil

Gets single shift state (stub).

get_style(buffer)

Gets text style (stub).

get_text_in_region(buffer, x1, y1, x2, y2)

@spec get_text_in_region(
  Raxol.Terminal.ScreenBuffer.Core.t(),
  integer(),
  integer(),
  integer(),
  integer()
) :: String.t()

Gets text in region.

in_selection?(buffer, x, y)

Checks if position is in selection (stub).

invoke_g_set(buffer, set)

Invokes G set (stub).

merge_styles(base, override)

@spec merge_styles(map(), map()) :: map()

Merges two styles, with the second taking precedence.

move_cursor(buffer, dx, dy)

Moves the cursor relative to its current position.

next_tab_stop(buffer)

Finds the next tab stop position from the current cursor.

reset_all_attributes(buffer)

Resets all attributes to defaults (stub).

reset_attribute(buffer, attr)

Resets specific attribute (stub).

reset_charset_state(buffer)

Resets charset state (stub).

reset_tab_stops(buffer)

Resets tab stops to default (every 8 columns).

restore_cursor(buffer)

Restores the saved cursor position.

save_cursor(buffer)

Saves the current cursor position.

select_charset(buffer, slot)

Selects which charset slot is active.

selection_active?(buffer)

@spec selection_active?(Raxol.Terminal.ScreenBuffer.Core.t()) :: boolean()

Checks if selection is active (stub).

set_alternate_screen(buffer, use_alternate)

Switches between main and alternate screen buffers.

set_attribute(buffer, attr)

Sets specific attribute (stub).

set_background(buffer, color)

Sets background color (stub).

set_charset(buffer, slot, charset)

Sets the active charset (G0, G1, G2, G3).

set_cursor_blink(buffer, blink)

Sets cursor blink state.

set_cursor_position(buffer, x, y)

Sets the cursor position.

set_cursor_style(buffer, style)

Sets cursor style.

set_cursor_visibility(buffer, visible)

Sets cursor visibility (stub).

set_cursor_visible(buffer, visible)

Sets cursor visibility.

set_default_style(buffer, style)

Sets the default text style for the buffer.

set_foreground(buffer, color)

Sets foreground color (stub).

set_tab_stop(buffer)

Sets a tab stop at the current cursor position.

start_selection(buffer, x, y)

Starts selection (stub).

translate_char(buffer, char)

@spec translate_char(Raxol.Terminal.ScreenBuffer.Core.t(), String.t()) :: String.t()

Translates a character according to the active charset.

update_selection(buffer, x, y)

Updates selection (stub).

update_style(buffer, style)

Updates text style (stub).

using_alternate_screen?(buffer)

@spec using_alternate_screen?(Raxol.Terminal.ScreenBuffer.Core.t()) :: boolean()

Checks if using alternate screen.