Raxol.UI.Components.Terminal (Raxol v0.4.0)
View SourceA terminal component that emulates a standard terminal within the UI.
Summary
Functions
Handles other events for the Terminal component.
Initializes the Terminal component state from props.
Callback implementation for Raxol.UI.Components.Base.Component.mount/1
.
Renders the Terminal component, displaying the buffer as lines.
Callback implementation for Raxol.UI.Components.Base.Component.unmount/1
.
Updates the Terminal component state in response to messages. Handles writing, clearing, etc.
Types
@type t() :: %Raxol.UI.Components.Terminal{ buffer: [String.t()], height: non_neg_integer(), id: any(), style: map(), width: non_neg_integer() }
State for the Terminal component.
- :id - unique identifier
- :width - terminal width
- :height - terminal height
- :buffer - list of lines
- :style - style map
Functions
@spec handle_event(map(), map(), map()) :: {map(), list()}
@spec handle_event(map(), map(), map()) :: {map(), list()}
Handles other events for the Terminal component.
Initializes the Terminal component state from props.
Callback implementation for Raxol.UI.Components.Base.Component.mount/1
.
Renders the Terminal component, displaying the buffer as lines.
Callback implementation for Raxol.UI.Components.Base.Component.unmount/1
.
Updates the Terminal component state in response to messages. Handles writing, clearing, etc.