cadrumo.entrypoints.tui.components.status module

Reusable, state-local status presentation for Textual surfaces.

class PinnedStatusBar(*, summary='', id=None, classes=None)[source]

Bases: Vertical

Render supplied summary and status text in a pinned screen channel.

Parameters:
  • summary (str)

  • id (str | None)

  • classes (str | None)

DEFAULT_CSS: ClassVar[str]

Default TCSS.

property summary: str

Plain summary currently rendered by the first line.

property message: str

Plain status text currently rendered by the second line.

property tone: StatusTone

Closed tone currently rendered by the status message.

compose()[source]

Called by Textual to create child widgets.

This method is called when a widget is mounted or by setting recompose=True when calling [refresh()][textual.widget.Widget.refresh].

Note that you don’t typically need to explicitly call this method.

Return type:

Iterable[Widget]

Example

def compose(self) -> ComposeResult:
    yield Header()
    yield Label("Press the button below:")
    yield Button()
    yield Footer()
clear_message()[source]

Render an idle empty message and collapse an empty channel.

Return type:

None

show_progress(message)[source]

Render the supplied in-progress status text.

Return type:

None

Parameters:

message (str)

show_success(message)[source]

Render the supplied completed status text.

Return type:

None

Parameters:

message (str)

show_warning(message)[source]

Render the supplied attention status text.

Return type:

None

Parameters:

message (str)

show_error(message)[source]

Render the supplied failure or refusal status text.

Return type:

None

Parameters:

message (str)

can_focus: bool

Widget may receive focus.

can_focus_children: bool

Widget’s children may receive focus.