euporie.core.layout.print

Defines a container which displays all children at full height vertially stacked.

Functions

get_app()

Get the current active (running) Application.

to_container(container)

Make sure that the given object is a Container.

to_dimension(value)

Turn the given object into a Dimension object.

Classes

BoundedWritePosition(xpos, ypos, width, height)

A write position which also hold bounding box information.

Container()

Base class for user interface layout.

Dimension([min, max, weight, preferred])

Specified dimension (width/height) of a user control or window.

PrintingContainer(children[, width, ...])

A container which displays all it's children in a vertical list.

Window([content, width, height, z_index, ...])

Container that holds a control.

class euporie.core.layout.print.PrintingContainer(children: Callable | Sequence[AnyContainer], width: AnyDimension = None, key_bindings: KeyBindingsBase | None = None)

Bases: Container

A container which displays all it’s children in a vertical list.

property children: Sequence[AnyContainer]

Return the container’s children.

get_children() list[prompt_toolkit.layout.containers.Container]

Return a list of all child containers.

get_key_bindings() KeyBindingsBase | None

Return the container’s key bindings.

is_modal() bool

When this container is modal, key bindings from parent containers are not taken into account if a user control in this container is focused.

preferred_height(width: int, max_available_height: int) Dimension

Return the preferred height, equal to the sum of the child heights.

preferred_width(max_available_width: int) Dimension

Calculate and returns the desired width for this container.

reset() None

Reset the state of this container and all the children.

Does nothing as this container is used for dumping output.

write_to_screen(screen: Screen, mouse_handlers: MouseHandlers, write_position: WritePosition, parent_style: str, erase_bg: bool, z_index: int | None) None

Render the container to a Screen instance.

All children are rendered vertically in sequence.

Parameters: