textual.screen
This module contains the Screen class and related objects.
The Screen class is a special widget which represents the content in the terminal. See Screens for details.
ScreenResultCallbackType
module-attribute
¶
ScreenResultCallbackType = Union[
Callable[[Optional[ScreenResultType]], None],
Callable[[Optional[ScreenResultType]], Awaitable[None]],
]
Type of a screen result callback function.
ScreenResultType
module-attribute
¶
ScreenResultType = TypeVar('ScreenResultType')
The result type of a screen.
HoverWidgets
¶
Bases: NamedTuple
Result of [get_hover_widget_at][textual.screen.Screen.get_hover_widget_at]
ModalScreen
¶
Bases: Screen[ScreenResultType]
A screen with bindings that take precedence over the App's key bindings.
The default styling of a modal screen will dim the screen underneath.
ResultCallback
¶
Bases: Generic[ScreenResultType]
Holds the details of a callback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
MessagePump
|
The object making a request for the callback. |
required |
|
ScreenResultCallbackType[ScreenResultType] | None
|
The callback function. |
required |
|
Future[ScreenResultType] | None
|
A Future to hold the result. |
None
|