Raxol.Terminal.ANSI.TerminalState (Raxol v0.5.0)

View Source

Manages terminal state operations for ANSI escape sequences.

Summary

Functions

Clears all saved states.

Gets the current state from the state stack.

Gets the current state.

Gets the number of saved states.

Gets the current state stack.

Checks if there are any saved states.

Creates a new terminal state with default settings.

Pops a state from the state stack.

Pushes the current state onto the state stack.

Restores the most recently saved state.

Restores the most recently saved terminal state from the state stack. Returns the restored state and the updated stack.

Saves the current state.

Saves the current terminal state to the state stack.

Updates the current state.

Updates the state stack.

Types

t()

@type t() :: %Raxol.Terminal.ANSI.TerminalState{
  current_state: map(),
  max_saved_states: integer(),
  saved_states: [map()],
  state_stack: [map()]
}

Functions

clear(state)

Clears all saved states.

current(state)

Gets the current state from the state stack.

get_current_state(state)

Gets the current state.

get_saved_states_count(state)

Gets the number of saved states.

get_state_stack(state)

Gets the current state stack.

has_saved_states?(state)

Checks if there are any saved states.

new(opts \\ [])

Creates a new terminal state with default settings.

pop(state)

Pops a state from the state stack.

push(state)

Pushes the current state onto the state stack.

restore(state)

Restores the most recently saved state.

restore_state(list)

Restores the most recently saved terminal state from the state stack. Returns the restored state and the updated stack.

save(state)

Saves the current state.

save_state(stack, state)

Saves the current terminal state to the state stack.

update_current_state(state, new_state)

Updates the current state.

update_state_stack(state, new_stack)

Updates the state stack.