textual.app
Here you will find the App class, which is the base class for Textual apps.
See app basics for how to build Textual apps.
AutopilotCallbackType
module-attribute
¶
Signature for valid callbacks that can be used to control apps.
CommandCallback
module-attribute
¶
Signature for callbacks used in get_system_commands
RenderResult
module-attribute
¶
Result of Widget.render()
ScreenType
module-attribute
¶
Type var for a Screen, used in get_screen.
App
¶
App(
driver_class=None,
css_path=None,
watch_css=False,
ansi_color=False,
)
Bases: Generic[ReturnType], DOMNode
The base class for Textual Applications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Type[Driver] | None
|
Driver class or |
None
|
|
CSSPathType | None
|
Path to CSS or |
None
|
|
bool
|
Reload CSS if the files changed. This is set automatically if
you are using |
False
|
|
bool
|
Allow ANSI colors if |
False
|
Raises:
| Type | Description |
|---|---|
CssPathError
|
When the supplied CSS path(s) are an unexpected type. |
ALLOW_IN_MAXIMIZED_VIEW
class-attribute
¶
The default value of Screen.ALLOW_IN_MAXIMIZED_VIEW.
ALLOW_SELECT
class-attribute
¶
A switch to toggle arbitrary text selection for the app.
Note that this doesn't apply to Input and TextArea which have builtin support for selection.
AUTO_FOCUS
class-attribute
¶
A selector to determine what to focus automatically when a screen is activated.
The widget focused is the first that matches the given CSS selector.
Setting to None or "" disables auto focus.