wijjit.elements.display.statusbar.StatusBar

class wijjit.elements.display.statusbar.StatusBar(id=None, classes=None, left='', center='', right='', bg_color=None, text_color=None, width=80, bind=True)[source]

Status bar element for fixed bottom display.

This element provides a horizontal bar typically displayed at the bottom of the screen with three sections: left-aligned, center-aligned, and right-aligned content.

Parameters:
  • id (str, optional) – Element identifier

  • left (str, optional) – Left-aligned content (default: “”)

  • center (str, optional) – Center-aligned content (default: “”)

  • right (str, optional) – Right-aligned content (default: “”)

  • bg_color (str, optional) – Background color name (default: None)

  • text_color (str, optional) – Text color name (default: None)

  • width (int, optional) – Status bar width in columns (default: 80, set to terminal width at render)

  • classes (str | list[str] | set[str] | None)

  • bind (bool | str)

Variables:
  • left (str) – Left-aligned content

  • center (str) – Center-aligned content

  • right (str) – Right-aligned content

  • bg_color (str or None) – Background color name

  • text_color (str or None) – Text color name

  • width (int) – Status bar width

__init__(id=None, classes=None, left='', center='', right='', bg_color=None, text_color=None, width=80, bind=True)[source]
Parameters:
Return type:

None

Methods

__init__([id, classes, left, center, right, ...])

add_class(class_name)

Add a CSS class to this element.

apply_props(props)

Apply props from a VNode, skipping ephemeral props.

get_ephemeral_state()

Get ephemeral state that should survive reconciliation.

get_hardware_cursor_position()

Absolute screen cell where the hardware terminal cursor should park.

get_height_for_width(width)

Return the height this element needs when laid out at width.

get_intrinsic_size()

Get the intrinsic (preferred) size of the element.

handle_key(key)

Handle a key press.

handle_mouse(event)

Handle a mouse event.

has_class(class_name)

Check if element has a CSS class.

on_blur()

Called when element loses focus.

on_focus()

Called when element gains focus.

on_hover_enter()

Called when mouse enters element.

on_hover_exit()

Called when mouse exits element.

on_mount()

Called when element is first added to the element tree.

on_unmount()

Called when element is removed from the element tree.

on_update(changed_props)

Called when element props are updated during reconciliation.

remove_class(class_name)

Remove a CSS class from this element.

render_signature()

Paint memo for the skip-unchanged fast path.

render_to(ctx)

Render the status bar using cell-based rendering (NEW API).

restore_ephemeral_state(state)

Restore ephemeral state after reconciliation.

set_bounds(bounds)

Set the element's screen bounds.

toggle_class(class_name)

Toggle a CSS class on this element.

Attributes

captures_tab

Whether this element wants the Tab key instead of focus movement.

parent_frame

Get the parent Frame if this element is inside a scrollable frame.

supports_dynamic_sizing

Whether this element supports dynamic sizing.

render_signature()[source]

Paint memo for the skip-unchanged fast path.

Captures the three section texts and the instance color overrides (bg_color/text_color) plus the style-affecting state. Section placement/clipping is a pure function of these and the bar width (compared separately as geometry). See wijjit.elements.base.Element.render_signature().

Return type:

Any

render_to(ctx)[source]

Render the status bar using cell-based rendering (NEW API).

Parameters:

ctx (PaintContext) – Paint context with buffer, style resolver, and bounds

Return type:

None

Notes

This is the new cell-based rendering method that uses theme styles instead of hardcoded ANSI colors. It properly aligns left, center, and right sections with intelligent space distribution.

Theme styles:

This element uses the following theme style classes: - statusbar: Base status bar style - statusbar.left: Left section style - statusbar.center: Center section style - statusbar.right: Right section style