Raxol.Terminal.ANSI.CharacterSets.StateManager (Raxol v2.0.1)
View SourceManages character set state and operations.
Summary
Functions
Converts a character set code to an atom.
Clears the single shift.
Gets the current active character set.
Gets the active character set by resolving the current GL setting. Returns the actual charset, not the g-set reference.
Gets the active G-set character set (the charset of the current GL).
Gets the current GL (graphics left) setting.
Gets the current GR (graphics right) setting.
Gets a specific G-set character set.
Gets the single shift character set if any.
Converts G-set index to atom.
Creates a new character set state with default values.
Sets the active character set directly.
Sets the G0 character set.
Sets the G1 character set.
Sets the G2 character set.
Sets the G3 character set.
Sets the GL (graphics left) designation.
Sets the GR (graphics right) designation.
Sets a specific G-set character set.
Sets a single shift to the specified G-set.
Updates the active character set based on current GL setting.
Validates character set state.
Types
@type charset() ::
:us_ascii
| :dec_special_graphics
| :uk
| :us
| :finnish
| :french
| :french_canadian
| :german
| :italian
| :norwegian_danish
| :portuguese
| :spanish
| :swedish
| :swiss
Functions
Converts a character set code to an atom.
@spec clear_single_shift(charset_state()) :: charset_state()
Clears the single shift.
@spec get_active(charset_state()) :: charset()
Gets the current active character set.
Gets the active character set by resolving the current GL setting. Returns the actual charset, not the g-set reference.
Gets the active G-set character set (the charset of the current GL).
Gets the current GL (graphics left) setting.
Gets the current GR (graphics right) setting.
Gets a specific G-set character set.
@spec get_single_shift(charset_state()) :: charset() | nil
Gets the single shift character set if any.
Converts G-set index to atom.
@spec new() :: charset_state()
Creates a new character set state with default values.
Sets the active character set directly.
@spec set_g0(charset_state(), charset()) :: charset_state()
Sets the G0 character set.
@spec set_g1(charset_state(), charset()) :: charset_state()
Sets the G1 character set.
@spec set_g2(charset_state(), charset()) :: charset_state()
Sets the G2 character set.
@spec set_g3(charset_state(), charset()) :: charset_state()
Sets the G3 character set.
@spec set_gl(charset_state(), :g0 | :g1 | :g2 | :g3) :: charset_state()
Sets the GL (graphics left) designation.
@spec set_gr(charset_state(), :g0 | :g1 | :g2 | :g3) :: charset_state()
Sets the GR (graphics right) designation.
Sets a specific G-set character set.
@spec set_single_shift(charset_state(), :g0 | :g1 | :g2 | :g3 | charset()) :: charset_state()
Sets a single shift to the specified G-set.
Updates the active character set based on current GL setting.
Validates character set state.