etui/widgets/help

Types

A single key binding. Multiple keys for the same action go in keys.

pub type Binding {
  Binding(keys: List(String), description: String)
}

Constructors

  • Binding(keys: List(String), description: String)
pub type Help {
  Help(
    bindings: List(Binding),
    mode: HelpMode,
    separator: String,
    key_fg: style.Color,
    description_fg: style.Color,
    bg: style.Color,
  )
}

Constructors

pub type HelpMode {
  Short
  Full
}

Constructors

  • Short
  • Full

Values

pub fn binding(
  keys: List(String),
  description: String,
) -> Binding
pub fn help_new(bindings: List(Binding)) -> Help
pub fn render(
  buf: buffer.Buffer,
  area: geometry.Rect,
  h: Help,
) -> buffer.Buffer
pub fn toggle_mode(h: Help) -> Help
pub fn with_bg(h: Help, bg: style.Color) -> Help
pub fn with_description_color(h: Help, fg: style.Color) -> Help
pub fn with_key_color(h: Help, fg: style.Color) -> Help
pub fn with_mode(h: Help, mode: HelpMode) -> Help
pub fn with_separator(h: Help, sep: String) -> Help
Search Document