MenuEntry

io.worxbend.tui.widgets.MenuEntry
enum MenuEntry

One entry in a Menu: either a row the user can land on, or a rule that divides two groups of them.

A sum type rather than one case class with a separator: Boolean, because that flag made a labelled, shortcut- carrying, enabled separator representable — four fields describing something with no label, no shortcut and no enabled state. Here a Separator has nothing to configure, which is exactly what it is.

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Item(label: String, shortcut: Option[String] = ..., enabled: Boolean = ...)

A row the user can land on. A disabled item renders dimmed and keyboard navigation skips it; shortcut is right-aligned hint text (e.g. ^S), never a live binding — the app wires the action.

A row the user can land on. A disabled item renders dimmed and keyboard navigation skips it; shortcut is right-aligned hint text (e.g. ^S), never a live binding — the app wires the action.

Attributes

case Separator extends MenuEntry

A horizontal rule between groups of items; never selectable.

A horizontal rule between groups of items; never selectable.

Attributes