Raxol.Terminal.Cursor.CursorState (Raxol v2.0.1)

View Source

Handles cursor state management operations for the terminal cursor. Extracted from Raxol.Terminal.Cursor.Manager to reduce file size.

Summary

Functions

Adds the current cursor state to history.

Gets the cursor margins.

Gets the cursor state atom (:visible, :hidden, :blinking).

Resets the cursor state to default values.

Restores cursor state from history.

Restores the saved cursor position.

Restores the saved cursor state.

Saves the current cursor position.

Saves the current cursor state.

Sets a custom cursor shape.

Sets the cursor margins.

Sets the cursor state based on a state atom. Supported states: :visible, :hidden, :blinking

Updates the cursor blink state.

Updates cursor position based on text input.

Functions

add_to_history(state)

Adds the current cursor state to history.

get_margins(cursor)

Gets the cursor margins.

get_state(manager)

Gets the cursor state atom (:visible, :hidden, :blinking).

reset(state)

Resets the cursor state to default values.

restore_from_history(state)

Restores cursor state from history.

restore_position(state)

Restores the saved cursor position.

restore_state(state)

Restores the saved cursor state.

save_position(state)

Saves the current cursor position.

save_state(state)

Saves the current cursor state.

set_custom_shape(state, shape, params)

Sets a custom cursor shape.

set_margins(cursor, top, bottom)

Sets the cursor margins.

set_state(state, state_atom)

Sets the cursor state based on a state atom. Supported states: :visible, :hidden, :blinking

update_blink(state)

Updates the cursor blink state.

update_position_from_text(cursor, text)

Updates cursor position based on text input.