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
-
Help( bindings: List(Binding), mode: HelpMode, separator: String, key_fg: style.Color, description_fg: style.Color, bg: style.Color, )
Values
pub fn binding(
keys: List(String),
description: String,
) -> Binding
Shorthand for building a Binding.
pub fn help_new(bindings: List(Binding)) -> Help
A short-mode help line with " • " separators and dimmed descriptions.
pub fn render(
buf: buffer.Buffer,
area: geometry.Rect,
h: Help,
) -> buffer.Buffer
Render the help view in its current mode.
pub fn with_description_color(h: Help, fg: style.Color) -> Help
Color of the descriptions.
pub fn with_mode(h: Help, mode: HelpMode) -> Help
Switch between the one-line and two-column layouts.