Raxol.Terminal.Split.SplitManager (Raxol v2.0.1)

View Source

Manages terminal split windows and panes.

Summary

Functions

Returns a specification to start this module under a supervisor.

Creates a new split with the given options.

Lists all splits.

Navigates to an existing split.

Resizes an existing split.

Types

t()

@type t() :: %Raxol.Terminal.Split.SplitManager{
  content: map(),
  created_at: DateTime.t(),
  dimensions: %{width: integer(), height: integer()},
  id: integer(),
  position: %{x: integer(), y: integer()}
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

create_split(opts \\ %{}, pid)

@spec create_split(map(), pid()) :: {:ok, t()} | {:error, term()}

Creates a new split with the given options.

handle_manager_cast(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.

handle_manager_info(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.

list_splits(pid)

@spec list_splits(pid()) :: [t()]

Lists all splits.

resize_split(split_id, new_dimensions, pid)

@spec resize_split(integer(), %{width: integer(), height: integer()}, pid()) ::
  {:ok, t()} | {:error, :not_found}

Resizes an existing split.

start_link(init_opts \\ [])