abacura.widgets package

Submodules

abacura.widgets.commslog module

A resizeable log window for communications

class abacura.widgets.commslog.CommsLog(id: str, name: str = '')[source]

Bases: Container

Textual container for scrolling, resizable widget.

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() Iterable[Widget][source]

Called by Textual to create child widgets.

Extend this to build a UI.

Example:

```python def compose(self) -> ComposeResult:

yield Header() yield Container(

Tree(), Viewer()

) yield Footer()

```

abacura.widgets.footer module

Various footer widget bits

class abacura.widgets.footer.AbacuraFooter[source]

Bases: Footer

Bottom of screen bar with current session name

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

level: reactive[str]

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value.

on_mount()[source]
render() str[source]

Get renderable for widget.

Returns:

Any renderable.

session: reactive[str | None]

Create a reactive attribute.

Args:

default: A default value or callable that returns a default. layout: Perform a layout on change. repaint: Perform a repaint on change. init: Call watchers on initialize (post mount). always_update: Call watchers even when the new value equals the old value.

update_level(message: MSDPMessage)[source]

Update reactive values for level

abacura.widgets.inspector module

abacura.widgets.resizehandle module

class abacura.widgets.resizehandle.ResizeHandle(target: Widget, side: Literal['left', 'right', 'top', 'bottom'], *, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]

Bases: Widget

A handle for resizing a panel.

This is a child of the panel, and is positioned on the edge of the panel. The panel can use min-width, min-height, max-width, and max-height to limit the size.

DEFAULT_CSS: ClassVar[str] = '\n    ResizeHandle {\n        width: auto;\n        height: auto;\n        background: $panel;\n        color: rgba(128,128,128,0);\n    }\n    ResizeHandle:hover {\n        background: $panel-lighten-1;\n        color: rgba(128,128,128,0.3);\n    }\n    ResizeHandle.-active {\n        background: $panel-darken-1;\n    }\n    '
can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

get_content_height(container: Size, viewport: Size, width: int) int[source]

Called by Textual to get the height of the content area. May be overridden in a subclass.

Args:

container: Size of the container (immediate parent) widget. viewport: Size of the viewport. width: Width of renderable.

Returns:

The height of the content.

get_content_width(container: Size, viewport: Size) int[source]

Called by textual to get the width of the content area. May be overridden in a subclass.

Args:

container: Size of the container (immediate parent) widget. viewport: Size of the viewport.

Returns:

The optimal width of the content.

on_mouse_down(event: MouseDown) None[source]
on_mouse_move(event: MouseMove) None[source]
on_mouse_up(event: MouseUp) None[source]
render_line(y: int) Strip[source]

Render a line of content.

Args:

y: Y Coordinate of line.

Returns:

A rendered line.

abacura.widgets.sidebar module

class abacura.widgets.sidebar.Sidebar(*children: Widget, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]

Bases: Container

Generic Sidebar

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

compose() Iterable[Widget][source]

Composes the subwidgets of a sidebar

Module contents