euporie.core.layout.print
Defines a container which displays all children at full height vertially stacked.
Functions
|
Get the current active (running) Application. |
|
Make sure that the given object is a |
|
Turn the given object into a Dimension object. |
Classes
|
A write position which also hold bounding box information. |
Base class for user interface layout. |
|
|
Specified dimension (width/height) of a user control or window. |
|
A container which displays all it's children in a vertical list. |
|
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:
screen – The
Screen
class to which the output has to be written.mouse_handlers –
prompt_toolkit.layout.mouse_handlers.MouseHandlers
.write_position – A
prompt_toolkit.layout.screen.WritePosition
object defining where this container should be drawn.erase_bg – If true, the background will be erased prior to drawing.
parent_style – Style string to pass to the
Window
object. This will be applied to all content of the windows.VSplit
andprompt_toolkit.layout.containers.HSplit
can use it to pass their style down to the windows that they contain.z_index – Used for propagating z_index from parent to child.