Ratatouille v0.5.1 API Reference

Modules

Ratatouille is a framework for building terminal UIs.

Defines the Ratatouille.App behaviour. It provides the structure for architecting both large and small terminal applications. This structure allows you to render views and update them over time or in response to user input.

A convenience wrapper of ExTermbox.Constants.

A wrapper of ExTermbox.EventManager so that Ratatouille applications don't need to use or depend on ex_termbox directly.

Logic to render a view tree.

Functions for working with element attributes

Primitives for rendering borders

This defines the internal representation of a rectangular region---a box---for rendering, as well as logic for transforming these boxes.

A canvas represents a terminal window, a subvision of it for rendering, and a sparse mapping of positions to cells.

Functions for working with canvas cells.

Primitives for rendering lines

Primitives for rendering text

A runtime for apps implementing the Ratatouille.App behaviour. See Ratatouille.App for details on how to build apps.

Commands provide a way to start an expensive call in the background and get the result back via Ratatouille.App.update/2.

Defines a struct to store the runtime loop's state.

Subscriptions provide a way for the app to be notified via Ratatouille.App.update/2 when something interesting happens.

A supervisor to run the application runtime and its dependencies.

In Ratatouille, a view is simply a tree of elements. Each element in the tree holds an attributes map and a list of zero or more child nodes. Visually, it looks like something this

A GenServer to manage the terminal window, along with a client API to perform updates and retrieve window information.