etui/widgets/statusbar

Types

Status bar configuration with left, center, and right span sections.

pub type StatusBar {
  StatusBar(
    left: List(span.Line),
    center: List(span.Line),
    right: List(span.Line),
    fg: style.Color,
    bg: style.Color,
  )
}

Constructors

Values

pub fn render(
  buf: buffer.Buffer,
  area: geometry.Rect,
  sb: StatusBar,
) -> buffer.Buffer

Render status bar into the first row of area. Only one row is used; remaining rows in area are untouched.

pub fn statusbar_new() -> StatusBar

New status bar with empty sections and default colors.

pub fn with_center(
  sb: StatusBar,
  lines: List(span.Line),
) -> StatusBar

Set center section spans.

pub fn with_colors(
  sb: StatusBar,
  fg: style.Color,
  bg: style.Color,
) -> StatusBar
pub fn with_left(
  sb: StatusBar,
  lines: List(span.Line),
) -> StatusBar

Set left section spans.

pub fn with_right(
  sb: StatusBar,
  lines: List(span.Line),
) -> StatusBar

Set right section spans.

pub fn with_style(
  sb: StatusBar,
  fg: style.Color,
  bg: style.Color,
) -> StatusBar

Set foreground and background colors for the bar background.

Search Document