MingaEditor.DisplayList.Cursor (Minga v0.1.0)

Copy Markdown View Source

Cursor state: position and shape as a single unit.

Used by WindowFrame (optional, nil for non-active windows) and Frame (always present). Bundling position and shape prevents them from getting out of sync.

Summary

Functions

Creates a cursor at the given position with the given shape.

Types

shape()

@type shape() :: :block | :beam | :underline

t()

@type t() :: %MingaEditor.DisplayList.Cursor{
  col: non_neg_integer(),
  row: non_neg_integer(),
  shape: shape()
}

Functions

new(row, col, shape)

@spec new(non_neg_integer(), non_neg_integer(), shape()) :: t()

Creates a cursor at the given position with the given shape.