Raxol.Core.Renderer.View.Types (Raxol v0.5.0)

View Source

Type definitions for the Raxol view system.

Summary

Functions

Returns the border characters for different border styles.

Types

border_style()

@type border_style() :: :none | :single | :double | :rounded | :bold | :dashed

color()

@type color() :: Raxol.Core.Renderer.Color.color()

layout_type()

@type layout_type() :: :flex | :grid | :flow | :absolute

margin()

@type margin() :: padding()

padding()

position()

@type position() :: {non_neg_integer(), non_neg_integer()}

position_type()

@type position_type() :: :relative | :absolute | :fixed

size()

@type size() :: {non_neg_integer(), non_neg_integer()}

style()

@type style() :: [atom()]

view()

@type view() :: %{
  type: atom(),
  position: position() | nil,
  position_type: position_type(),
  z_index: z_index(),
  size: size() | nil,
  style: style(),
  fg: color() | nil,
  bg: color() | nil,
  border: border_style(),
  padding: padding(),
  margin: margin(),
  children: [view()],
  content: term()
}

z_index()

@type z_index() :: integer()

Functions

border_chars()

Returns the border characters for different border styles.