Skip to content

Overview

Cursive is a TUI framework.

  • Cursive widgets are called Views (i.e. TextView).
  • Each screen's view tree has a StackView as root. Children are layers that can be pushed and popped.
  • Callbacks are typically closures.

Key presses are represented by Event enums.

  • Alphanumeric keypresses are represented by the char itself.
  • Single and multiple modifier key presses are represented by Ctrl(Key), Alt(Key), CtrlAlt(Key), etc.

Global keybindings are applied by calling Cursive::add_global_callback() on the application object.

Keybindings that are effective only on particular Views are created by wrapping the View in OnEventView.