diff --git a/api/app/index.html b/api/app/index.html index 81a9cc125f..ed5bf602be 100644 --- a/api/app/index.html +++ b/api/app/index.html @@ -4954,7 +4954,7 @@
app
@@ -4963,7 +4963,7 @@
AutopilotCallbackType
@@ -4972,7 +4972,7 @@
CommandCallback
@@ -4981,7 +4981,7 @@
ScreenType
@@ -4990,7 +4990,7 @@
ActionError
@@ -4999,7 +4999,7 @@
ActiveModeError
@@ -5008,17 +5008,53 @@
App
-
action_back
action_bell
action_command_palette
action_focus
-
action_focus_next
action_focus_previous
action_hide_help_panel
action_pop_screen
action_push_screen
-
screen
+
action_quit
action_remove_class
-
action_screenshot
-
filename
path
+
action_show_help_panel
action_simulate_key
-
key
+
action_suspend_process
action_switch_mode
action_switch_screen
-
screen
+
action_toggle_class
-
action_toggle_dark
add_mode
-
mode
base_screen
+
animate
-
attribute
value
final_value
duration
speed
delay
easing
on_complete
level
+
batch_update
begin_capture_print
-
bell
bind
-
call_from_thread
-
capture_mouse
-
widget
+
clear_notifications
compose
copy_to_clipboard
-
text
+
deliver_binary
-
deliver_screenshot
-
deliver_text
-
save_directory
+
+
save_filename
encoding
mime_type
name
end_capture_print
-
target
exit
-
result
return_code
message
+
export_screenshot
+
+
+
+
title
+
+
+
+
simplify
@@ -6321,512 +6481,1333 @@
get_child_by_id
-
id
expect_type
+
+
+
get_child_by_type
+
+
+
expect_type
+
+
-
get_css_variables
+
+
-
-
get_default_screen
+
+
-
-
-
-
-
+
get_driver_class
+
+
+
get_key_display
+
+
+
binding
+
+
+
get_loading_widget
+
+
-
- textual.await_remove
-
+
get_pseudo_classes
+
+
-
-
get_screen
+
+
-
-
-
-
-
+
screen
+
+
+
screen_class
+
+
+
get_system_commands
+
+
-
screen
+
+
-
- textual.binding
-
-
-
-
get_widget_at
+
+
+
get_widget_by_id
+
+
-
- textual.cache
-
+
id
+
+
-
-
-
expect_type
+
+
-
-
-
-
-
+
install_screen
+
+
+
screen
+
+
+
name
+
+
-
is_mounted
+
+
-
-
-
widget
+
+
-
-
-
-
-
+
is_screen_installed
+
+
+
screen
+
+
+
mount
+
+
-
- textual.command
-
+
*widgets
+
+
-
-
-
before
+
+
-
-
-
-
-
+
after
+
+
+
mount_all
+
+
+
widgets
+
+
-
before
+
+
-
- textual.constants
-
+
after
+
+
-
-
-
notify
+
+
+
message
+
+
+
title
+
+
+
severity
+
+
-
timeout
+
+
-
- textual.containers
-
-
-
-
-
open_url
+
+
+
url
+
+
+
new_tab
+
+
-
panic
+
+
-
-
-
*renderables
+
+
-
-
-
-
-
+
pop_screen
+
+
+
post_display_hook
+
+
+
push_screen
+
+
-
screen
+
+
-
- textual.dom
-
+
callback
+
+
-
-
wait_for_dismiss
+
+
-
-
-
-
-
+
push_screen_wait
+
+
+
screen
+
+
+
recompose
+
+
-
- textual.events
-
+
refresh
+
+
-
-
-
repaint
+
+
-
-
-
-
-
+
layout
+
+
+
recompose
+
+
+
refresh_css
+
+
-
animate
+
+
-
- textual.errors
-
+
remove_mode
+
+
-
-
-
-
-
+
mode
+
+
+
render
+
+
+
run
+
+
-
headless
+
+
-
- textual.filter
-
-
-
-
inline
+
+
+
inline_no_clear
+
+
+
mouse
+
+
+
size
+
+
-
auto_pilot
+
+
-
- textual.fuzzy
-
+
run_action
+
+
-
-
-
-
-
+
action
+
+
+
default_namespace
+
+
+
run_async
+
+
-
headless
+
+
-
- textual.geometry
-
+
inline
+
+
-
-
inline_no_clear
+
+
-
-
-
-
-
+
mouse
+
+
+
size
+
+
+
auto_pilot
+
+
+
run_test
+
+
-
- textual.lazy
-
+
headless
+
+
-
-
-
size
+
+
-
-
-
-
-
+
tooltips
+
+
+
notifications
+
+
+
message_hook
+
+
+
save_screenshot
+
+
-
- textual
-
+
filename
+
+
-
-
-
path
+
+
-
-
-
-
-
+
time_format
+
+
+
set_focus
+
+
+
widget
+
+
-
scroll_visible
+
+
-
- textual.logging
-
-
-
-
-
simulate_key
+
+
-
- textual.map_geometry
-
+
key
+
+
-
-
-
stop_animation
+
+
+
attribute
+
+
+
complete
+
+
+
suspend
+
+
-
- textual.message_pump
-
+
switch_mode
+
+
-
-
-
mode
+
+
-
-
-
-
-
+
switch_screen
+
+
+
screen
+
+
+
uninstall_screen
+
+
-
- textual.message
-
+
screen
+
+
-
-
-
update_styles
+
+
+
validate_sub_title
+
+
+
validate_title
+
+
+
watch_dark
+
+
-
AppError
+
+
-
-
-
InvalidModeError
+
+
-
-
-
-
-
+
ModeError
+
+
+
+
ScreenError
+
+
+
ScreenStackError
+
+
+
SuspendNotSupported
+
+
+
SystemCommand
+
+
-
callback
+
+
-
- textual.pilot
-
+
discover
+
+
-
-
help
+
+
+
+
title
+
+
+
+
UnknownModeError
+
+
+
+
get_system_commands_provider
+
+
+
+
app
+
+
+
+
AutopilotCallbackType
+
+
+
+
CommandCallback
+
+
+
+
ScreenType
+
+
+
+
ActionError
+
+
+
+
ActiveModeError
+
+
+
+
App
+
+
+
+
driver_class
+
+
+
+
css_path
+
+
+
+
watch_css
+
+
+
+
ansi_color
+
+
+
+
AUTO_FOCUS
+
+
+
+
BINDINGS
+
+
+
+
BINDING_GROUP_TITLE
+
+
+
+
CLOSE_TIMEOUT
+
+
+
+
COMMANDS
+
+
+
+
COMMAND_PALETTE_BINDING
+
+
+
+
COMMAND_PALETTE_DISPLAY
+
+
+
+
CSS
+
+
+
+
CSS_PATH
+
+
+
+
ENABLE_COMMAND_PALETTE
+
+
+
+
ESCAPE_TO_MINIMIZE
+
+
+
+
INLINE_PADDING
+
+
+
+
MODES
+
+
+
+
NOTIFICATION_TIMEOUT
+
+
+
+
SCREENS
+
+
+
+
SUB_TITLE
+
+
+
+
TITLE
+
+
+
+
TOOLTIP_DELAY
+
+
+
+
active_bindings
+
+
+
+
animation_level
+
+
+
+
animator
+
+
+
+
ansi_color
+
+
+
+
ansi_theme
+
+
+
+
ansi_theme_dark
+
+
+
+
ansi_theme_light
+
+
+
+
app_focus
+
+
+
+
app_resume_signal
+
+
+
+
app_suspend_signal
+
+
+
+
children
+
+
+
+
current_mode
+
+
+
+
cursor_position
+
+
+
+
dark
+
+
+
+
debug
+
+
+
+
escape_to_minimize
+
+
+
+
focused
+
+
+
+
is_attached
+
+
+
+
is_dom_root
+
+
+
+
is_headless
+
+
+
+
is_inline
+
+
+
+
log
+
+
+
+
return_code
+
+
+
+
return_value
+
+
+
+
screen
+
+
+
+
screen_stack
+
+
+
+
scroll_sensitivity_x
+
+
+
+
scroll_sensitivity_y
+
+
+
+
size
+
+
+
+
sub_title
+
+
+
+
title
+
+
+
+
use_command_palette
+
+
+
+
workers
+
+
+
+
action_add_class
+
+
+
+
selector
+
+
+
+
class_name
+
+
+
+
action_back
+
+
+
+
action_bell
+
+
+
+
action_command_palette
+
+
+
+
action_focus
+
+
+
+
widget_id
+
+
+
+
action_focus_next
+
+
+
+
action_focus_previous
+
+
+
+
action_hide_help_panel
+
+
+
+
action_pop_screen
+
+
+
+
action_push_screen
+
+
+
+
screen
+
+
+
+
action_quit
+
+
+
+
action_remove_class
+
+
+
+
selector
+
+
+
+
class_name
+
+
+
+
action_screenshot
+
+
+
+
filename
+
+
+
+
path
+
+
+
+
action_show_help_panel
+
+
+
+
action_simulate_key
+
+
+
+
key
+
+
+
+
action_suspend_process
+
+
+
+
action_switch_mode
+
+
+
+
action_switch_screen
+
+
+
+
screen
+
+
+
+
action_toggle_class
+
+
+
+
selector
+
+
+
+
class_name
+
+
+
+
action_toggle_dark
+
+
+
+
add_mode
+
+
+
+
mode
+
+
+
+
base_screen
+
+
+
+
animate
+
+
+
+
attribute
+
+
+
+
value
+
+
+
+
final_value
+
+
+
+
duration
+
+
+
+
speed
+
+
+
+
delay
+
+
+
+
easing
+
+
+
+
on_complete
+
+
+
+
level
+
+
+
+
batch_update
+
+
+
+
begin_capture_print
+
+
+
+
target
+
+
+
+
stdout
+
+
+
+
stderr
+
+
+
+
bell
+
+
+
+
bind
+
+
+
+
keys
+
+
+
+
action
+
+
+
+
description
+
+
+
+
show
+
+
+
+
key_display
+
+
+
+
call_from_thread
+
+
-
- News
-
+
callback
+
+
-
-
-
*args
+
+
-
-
-
-
-
+
**kwargs
+
+
+
capture_mouse
+
+
-
+
widget
+
+
+
clear_notifications
+
+
-
- Release
-
+
compose
+
+
-
-
-
copy_to_clipboard
+
+
-
-
-
-
text
+
+
-
-
-
-
deliver_binary
+
+
+
deliver_screenshot
+
+
+
+
deliver_text
-
end_capture_print
-
target
+
exit
-
export_screenshot
-
title
simplify
+
get_child_by_id
-
id
expect_type
+
get_child_by_type
-
expect_type
+
get_css_variables
get_default_screen
get_driver_class
get_key_display
-
binding
+
get_loading_widget
get_pseudo_classes
get_screen
-
screen
screen_class
+
get_system_commands
-
screen
+
get_widget_at
-
x
y
+
get_widget_by_id
-
id
expect_type
+
install_screen
-
screen
name
+
is_mounted
-
widget
+
is_screen_installed
-
screen
+
mount
-
*widgets
before
after
+
mount_all
-
notify
-
open_url
-
panic
-
pop_screen
post_display_hook
push_screen
-
push_screen_wait
-
screen
+
recompose
refresh
-
refresh_css
-
animate
+
remove_mode
-
mode
+
render
run
-
run_action
-
run_async
-
run_test
-
save_screenshot
-
set_focus
-
simulate_key
-
key
+
stop_animation
-
suspend
switch_mode
-
mode
+
switch_screen
-
screen
+
uninstall_screen
-
screen
+
update_styles
@@ -9005,7 +11933,7 @@
validate_sub_title
@@ -9014,7 +11942,7 @@
validate_title
@@ -9023,7 +11951,7 @@
watch_dark
@@ -9037,7 +11965,7 @@
AppError
@@ -9046,7 +11974,7 @@
InvalidModeError
@@ -9055,7 +11983,7 @@
ModeError
@@ -9064,7 +11992,7 @@
ScreenError
@@ -9073,7 +12001,7 @@
ScreenStackError
@@ -9082,7 +12010,7 @@
SuspendNotSupported
@@ -9091,17 +12019,17 @@
SystemCommand
-
callback
@@ -9110,7 +12038,7 @@
discover
@@ -9119,7 +12047,7 @@
help
@@ -9128,7 +12056,7 @@
title
@@ -9142,7 +12070,7 @@
UnknownModeError
@@ -9151,7 +12079,7 @@
get_system_commands_provider
@@ -9180,13 +12108,19 @@ Here you will find the App class, which is the base class for Textual apps.
+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
¶AutopilotCallbackType: TypeAlias = (
+
-
-
- Signature for valid callbacks that can be used to control apps.
-
+
+
+ Signature for valid callbacks that can be used to control apps.
+
CommandCallback
+
-
module-attribute
¶CommandCallback: TypeAlias = (
+
-
-
- Signature for callbacks used in get_system_commands
-
+
+
+ Signature for callbacks used in get_system_commands
+
ScreenType
+
-
module-attribute
¶ScreenType = TypeVar('ScreenType', bound=Screen)
+
-
-
- Type var for a Screen, used in get_screen
.
-
+
+
+ Type var for a Screen, used in get_screen
.
+
ActionError
¶
ActiveModeError
¶
App
¶App(
- driver_class=None,
- css_path=None,
- watch_css=False,
- ansi_color=False,
+App(
+ driver_class=None,
+ css_path=None,
+ watch_css=False,
+ ansi_color=False,
)
-
-
- Bases: Generic[ReturnType]
, DOMNode
+
+
+ Bases: Generic[ReturnType]
, DOMNode
+
+
+
+ The base class for Textual Applications.
-
- The base class for Textual Applications.
-
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+Parameters:
+
+
- driver_class
-
- Type[Driver] | None
-
- Driver class or None
to auto-detect.
-This will be used by some Textual tools.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
- css_path
-
- CSSPathType | None
-
- Path to CSS or None
to use the CSS_PATH
class variable.
+
+
+
+
+ driver_class
+¶
+
+ Type[Driver] | None
+
+
+
+ Driver class or None
to auto-detect.
+This will be used by some Textual tools.
+
+
+
+ None
+
+
+
+
+ css_path
+¶
+
+ CSSPathType | None
+
+
+
+ Path to CSS or None
to use the CSS_PATH
class variable.
To load multiple CSS files, pass a list of strings or paths which
-will be loaded in order.
-
- None
-
-
-
- watch_css
-
- bool
-
- Reload CSS if the files changed. This is set automatically if
-you are using textual run
with the dev
switch.
-
- False
-
-
-
- ansi_color
-
- bool
-
- Allow ANSI colors if True
, or convert ANSI colors to to RGB if False
.
-
- False
-
-
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+will be loaded in order.
+
+
+
+ None
+
+
+
+
+ watch_css
+¶
+
+ bool
+
+
+
+ Reload CSS if the files changed. This is set automatically if
+you are using textual run
with the dev
switch.
+
+
+
+ False
+
+
+
+
+ ansi_color
+¶
+
+ bool
+
+
+
+ Allow ANSI colors if True
, or convert ANSI colors to to RGB if False
.
+
+
+
+ False
+
+
+
+
+
+
+Raises:
+
+
-
- CssPathError
-
- When the supplied CSS path(s) are an unexpected type.
+ Type
+ Description
-
-
+
+
+
+
+ CssPathError
+
+
+
+ When the supplied CSS path(s) are an unexpected type.
+
+
+
+
+
+
+
+
+
+
+
-
@@ -9436,23 +12415,23 @@
- AUTO_FOCUS
+
AUTO_FOCUS
+
-
class-attribute
¶
-AUTO_FOCUS: str | None = '*'
+
-
-
- A selector to determine what to focus automatically when a screen is activated.
+
+
+ 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.
-
+
@@ -9461,25 +12440,25 @@
- BINDINGS
+
BINDINGS
+
-
class-attribute
¶
-BINDINGS: list[BindingType] = [
- Binding(
- "ctrl+c", "quit", "Quit", show=False, priority=True
+BINDINGS = [
+ Binding(
+ "ctrl+c", "quit", "Quit", show=False, priority=True
)
]
-
-
- The default key bindings.
-
+
+
+ The default key bindings.
+
@@ -9488,22 +12467,22 @@
- BINDING_GROUP_TITLE
+
BINDING_GROUP_TITLE
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-BINDING_GROUP_TITLE: str | None = None
+
-
-
- Set to text to show in the key panel.
-
+
+
+ Set to text to show in the key panel.
+
@@ -9512,22 +12491,22 @@
- CLOSE_TIMEOUT
+
CLOSE_TIMEOUT
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-CLOSE_TIMEOUT: float | None = 5.0
+
-
-
- Timeout waiting for widget's to close, or None
for no timeout.
-
+
+
+ Timeout waiting for widget's to close, or None
for no timeout.
+
@@ -9536,24 +12515,22 @@
- COMMANDS
+
COMMANDS
+
-
class-attribute
¶
-COMMANDS: set[
- type[Provider] | Callable[[], type[Provider]]
-] = {get_system_commands_provider}
+COMMANDS = {get_system_commands_provider}
-
-
- Command providers used by the command palette.
+
+
+ Command providers used by the command palette.
Should be a set of command.Provider classes.
-
+
@@ -9562,21 +12539,21 @@
- COMMAND_PALETTE_BINDING
+
COMMAND_PALETTE_BINDING
+
-
class-attribute
¶
-COMMAND_PALETTE_BINDING: str = 'ctrl+p'
+
-
-
- The key that launches the command palette (if enabled by App.ENABLE_COMMAND_PALETTE
).
-
+
+
+ The key that launches the command palette (if enabled by App.ENABLE_COMMAND_PALETTE
).
+
@@ -9585,21 +12562,21 @@
- COMMAND_PALETTE_DISPLAY
+
COMMAND_PALETTE_DISPLAY
+
-
class-attribute
¶
-COMMAND_PALETTE_DISPLAY: str | None = None
+
-
-
- How the command palette key should be displayed in the footer (or None
for default).
-
+
+
+ How the command palette key should be displayed in the footer (or None
for default).
+
@@ -9608,22 +12585,22 @@
- CSS
+
CSS
+
-
class-attribute
¶
-CSS: str = ''
+
-
-
- Inline CSS, useful for quick scripts. This is loaded after CSS_PATH,
+
+
+ Inline CSS, useful for quick scripts. This is loaded after CSS_PATH,
and therefore takes priority in the event of a specificity clash.
-
+
@@ -9632,21 +12609,21 @@
- CSS_PATH
+
CSS_PATH
+
-
class-attribute
¶
-CSS_PATH: CSSPathType | None = None
+
-
-
- File paths to load CSS from.
-
+
+
+ File paths to load CSS from.
+
@@ -9655,21 +12632,21 @@
- ENABLE_COMMAND_PALETTE
+
ENABLE_COMMAND_PALETTE
+
-
class-attribute
¶
-ENABLE_COMMAND_PALETTE: bool = True
+
-
-
- Should the command palette be enabled for the application?
-
+
+
+ Should the command palette be enabled for the application?
+
@@ -9678,22 +12655,22 @@
- ESCAPE_TO_MINIMIZE
+
ESCAPE_TO_MINIMIZE
+
-
class-attribute
¶
-ESCAPE_TO_MINIMIZE: bool = True
+
-
-
- Use escape key to minimize widgets (potentially overriding bindings).
+
+
+ Use escape key to minimize widgets (potentially overriding bindings).
This is the default value, used if the active screen's ESCAPE_TO_MINIMIZE
is not changed from None
.
-
+
@@ -9702,21 +12679,21 @@
- INLINE_PADDING
+
INLINE_PADDING
+
-
class-attribute
¶
-INLINE_PADDING: int = 1
+
-
-
- Number of blank lines above an inline app.
-
+
+
+ Number of blank lines above an inline app.
+
@@ -9725,25 +12702,26 @@
- MODES
+
MODES
+
-
class-attribute
¶
-MODES: dict[str, str | Callable[[], Screen]] = {}
+
-
-
- Modes associated with the app and their base screens.
+
+
@@ -9773,21 +12751,21 @@
- NOTIFICATION_TIMEOUT
+
NOTIFICATION_TIMEOUT
+
-
class-attribute
¶
-NOTIFICATION_TIMEOUT: float = 5
+
-
-
- Default number of seconds to show notifications before removing them.
-
+
+
+ Default number of seconds to show notifications before removing them.
+
@@ -9796,21 +12774,21 @@
- SCREENS
+
SCREENS
+
-
class-attribute
¶
-SCREENS: dict[str, Callable[[], Screen[Any]]] = {}
+
-
-
- Screens associated with the app for the lifetime of the app.
-
+
+
+ Screens associated with the app for the lifetime of the app.
+
@@ -9819,24 +12797,24 @@
- SUB_TITLE
+
SUB_TITLE
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-SUB_TITLE: str | None = None
+
-
-
- A class variable to set the default sub-title for the application.
+
+
+ A class variable to set the default sub-title for the application.
To update the sub-title while the app is running, you can set the sub_title attribute.
See also the Screen.SUB_TITLE
attribute.
-
+
@@ -9845,24 +12823,24 @@
- TITLE
+
TITLE
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-TITLE: str | None = None
+
-
-
- A class variable to set the default title for the application.
+
+
+ A class variable to set the default title for the application.
To update the title while the app is running, you can set the title attribute.
See also the Screen.TITLE
attribute.
-
+
@@ -9871,22 +12849,22 @@
- TOOLTIP_DELAY
+
TOOLTIP_DELAY
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-TOOLTIP_DELAY: float = 0.5
+
-
-
- The time in seconds after which a tooltip gets displayed.
-
+
+
+ The time in seconds after which a tooltip gets displayed.
+
@@ -9895,42 +12873,47 @@
- active_bindings
+
active_bindings
+
-
property
¶
-active_bindings: dict[str, ActiveBinding]
+
-
-
- Get currently active bindings.
+
+
+ Get currently active bindings.
If no widget is focused, then app-level bindings are returned.
If a widget is focused, then any bindings present in the active screen and app are merged and returned.
This property may be used to inspect current bindings.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- dict[str, ActiveBinding]
-
- A dict that maps keys on to binding information.
+ Type
+ Description
-
-
-
+
+
+
+
+ dict[str, ActiveBinding]
+
+
+
+ A dict that maps keys on to binding information.
+
+
+
+
+
+
@@ -9939,24 +12922,22 @@
- animation_level
+
animation_level
+
-
instance-attribute
¶
-animation_level: AnimationLevel = (
- constants.TEXTUAL_ANIMATIONS
-)
+animation_level = TEXTUAL_ANIMATIONS
-
-
- Determines what type of animations the app will display.
+
+
+ Determines what type of animations the app will display.
-
+
@@ -9965,21 +12946,21 @@
- animator
+
animator
+
-
property
¶
-
@@ -9988,22 +12969,22 @@
- ansi_color
+
ansi_color
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-ansi_color = Reactive(False)
+ansi_color = Reactive(False)
-
-
- Allow ANSI colors in UI?
-
+
+
+ Allow ANSI colors in UI?
+
@@ -10012,23 +12993,23 @@
- ansi_theme
+
ansi_theme
+
-
property
¶
-ansi_theme: TerminalTheme
+
-
-
- The ANSI TerminalTheme currently being used.
+
+
+ The ANSI TerminalTheme currently being used.
Defines how colors defined as ANSI (e.g. magenta
) inside Rich renderables
are mapped to hex codes.
-
+
@@ -10037,22 +13018,22 @@
- ansi_theme_dark
+
ansi_theme_dark
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-ansi_theme_dark = Reactive(MONOKAI, init=False)
+
-
-
- Maps ANSI colors to hex colors using a Rich TerminalTheme object while in dark mode.
-
+
+
+ Maps ANSI colors to hex colors using a Rich TerminalTheme object while in dark mode.
+
@@ -10061,22 +13042,22 @@
- ansi_theme_light
+
ansi_theme_light
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-ansi_theme_light = Reactive(ALABASTER, init=False)
+
-
-
- Maps ANSI colors to hex colors using a Rich TerminalTheme object while in light mode.
-
+
+
+ Maps ANSI colors to hex colors using a Rich TerminalTheme object while in light mode.
+
@@ -10085,24 +13066,24 @@
- app_focus
+
app_focus
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-app_focus = Reactive(True, compute=False)
+
-
-
- Indicates if the app has focus.
+
+
+ Indicates if the app has focus.
When run in the terminal, the app always has focus. When run in the web, the app will
get focus when the terminal widget has focus.
-
+
@@ -10111,26 +13092,26 @@
- app_resume_signal
+
app_resume_signal
+
-
instance-attribute
¶
-app_resume_signal: Signal[App] = Signal(self, 'app-resume')
+app_resume_signal = Signal(self, 'app-resume')
-
-
- The signal that is published when the app is resumed after a suspend.
+
+
+ The signal that is published when the app is resumed after a suspend.
When the app is resumed after a
App.suspend
call this signal will be
published;
subscribe to this signal to
perform work after the app has resumed.
-
+
@@ -10139,27 +13120,25 @@
- app_suspend_signal
+
app_suspend_signal
+
-
instance-attribute
¶
-app_suspend_signal: Signal[App] = Signal(
- self, "app-suspend"
-)
+app_suspend_signal = Signal(self, 'app-suspend')
-
-
- The signal that is published when the app is suspended.
+
+
+ The signal that is published when the app is suspended.
When App.suspend
is called this signal
will be published;
subscribe to this signal to
perform work before the suspension takes place.
-
+
@@ -10168,42 +13147,47 @@
- children
+
children
+
-
property
¶
-children: Sequence['Widget']
+
-
-
- A view onto the app's immediate children.
+
+
+ A view onto the app's immediate children.
This attribute exists on all widgets.
In the case of the App, it will only ever contain a single child, which will
be the currently active screen.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Sequence['Widget']
-
- A sequence of widgets.
+ Type
+ Description
-
-
-
+
+
+
+
+ Sequence['Widget']
+
+
+
+ A sequence of widgets.
+
+
+
+
+
+
@@ -10212,21 +13196,21 @@
- current_mode
+
current_mode
+
-
property
¶
-current_mode: str
+
-
-
- The name of the currently active mode.
-
+
+
+ The name of the currently active mode.
+
@@ -10235,23 +13219,23 @@
- cursor_position
+
cursor_position
+
-
instance-attribute
¶
-cursor_position = Offset(0, 0)
+cursor_position = Offset(0, 0)
-
-
- The position of the terminal cursor in screen-space.
+
+
+ The position of the terminal cursor in screen-space.
This can be set by widgets and is useful for controlling the
positioning of OS IME and emoji popup menus.
-
+
@@ -10260,28 +13244,29 @@
- dark
+
dark
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-
@@ -10290,21 +13275,21 @@
- debug
+
debug
+
-
property
¶
-
@@ -10313,25 +13298,25 @@
- escape_to_minimize
+
escape_to_minimize
+
-
property
¶
-escape_to_minimize: bool
+
-
-
- Use the escape key to minimize?
+
+
+ Use the escape key to minimize?
When a widget is maximized, this boolean determines if the escape
key will
minimize the widget (potentially overriding any bindings).
The default logic is to use the screen's ESCAPE_TO_MINIMIZE
classvar if it is set to True
or False
.
If the classvar on the screen is not set (and left as None
), then the app's ESCAPE_TO_MINIMIZE
is used.
-
+
@@ -10340,40 +13325,45 @@
- focused
+
focused
+
-
property
¶
-focused: Widget | None
+
-
-
- The widget that is focused on the currently active screen, or None
.
+
+
+ The widget that is focused on the currently active screen, or None
.
Focused widgets receive keyboard input.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Widget | None
-
- The currently focused widget, or None
if nothing is focused.
+ Type
+ Description
-
-
-
+
+
+
+
+ Widget | None
+
+
+
+ The currently focused widget, or None
if nothing is focused.
+
+
+
+
+
+
@@ -10382,21 +13372,21 @@
- is_attached
+
is_attached
+
-
property
¶
-is_attached: bool
+
-
-
- Is this node linked to the app through the DOM?
-
+
+
+ Is this node linked to the app through the DOM?
+
@@ -10405,21 +13395,21 @@
- is_dom_root
+
is_dom_root
+
-
property
¶
-is_dom_root: bool
+
-
-
- Is this a root node (i.e. the App)?
-
+
+
+ Is this a root node (i.e. the App)?
+
@@ -10428,22 +13418,22 @@
- is_headless
+
is_headless
+
-
property
¶
-is_headless: bool
+
-
-
- Is the app running in 'headless' mode?
+
+
+ Is the app running in 'headless' mode?
Headless mode is used when running tests with run_test.
-
+
@@ -10452,21 +13442,21 @@
- is_inline
+
is_inline
+
-
property
¶
-is_inline: bool
+
-
-
- Is the app running in 'inline' mode?
-
+
+
+ Is the app running in 'inline' mode?
+
@@ -10475,20 +13465,21 @@
- log
+
log
+
-
property
¶
-
@@ -10522,31 +13518,32 @@
- return_code
+
return_code
+
-
property
¶
-
@@ -10555,22 +13552,22 @@
- return_value
+
return_value
+
-
property
¶
-return_value: ReturnType | None
+
-
-
- The return value of the app, or None
if it has not yet been set.
+
+
+ The return value of the app, or None
if it has not yet been set.
The return value is set when calling exit.
-
+
@@ -10579,57 +13576,67 @@
- screen
+
screen
+
-
property
¶
-screen: Screen[object]
+
-
-
- The current active screen.
+
+
+ The current active screen.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Screen[object]
-
- The currently active (visible) screen.
+ Type
+ Description
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ Screen[object]
+
+
+
+ The currently active (visible) screen.
+
+
+
+
+
+
+
+Raises:
+
+
-
- ScreenStackError
-
- If there are no screens on the stack.
+ Type
+ Description
-
-
-
+
+
+
+
+ ScreenStackError
+
+
+
+ If there are no screens on the stack.
+
+
+
+
+
+
@@ -10638,39 +13645,44 @@
- screen_stack
+
screen_stack
+
-
property
¶
-screen_stack: list[Screen[Any]]
+
-
-
- A snapshot of the current screen stack.
+
- Returns:
-
-
-
- Type
- Description
-
-
-
+ A snapshot of the current screen stack.
+
+
+ Returns:
+
+
-
- list[Screen[Any]]
-
- A snapshot of the current state of the screen stack.
+ Type
+ Description
-
-
-
+
+
+
+
+ list[Screen[Any]]
+
+
+
+ A snapshot of the current state of the screen stack.
+
+
+
+
+
+
@@ -10679,21 +13691,21 @@
- scroll_sensitivity_x
+
scroll_sensitivity_x
+
-
instance-attribute
¶
-scroll_sensitivity_x: float = 4.0
+
-
-
- Number of columns to scroll in the X direction with wheel or trackpad.
-
+
+
+ Number of columns to scroll in the X direction with wheel or trackpad.
+
@@ -10702,21 +13714,21 @@
- scroll_sensitivity_y
+
scroll_sensitivity_y
+
-
instance-attribute
¶
-scroll_sensitivity_y: float = 2.0
+
-
-
- Number of lines to scroll in the Y direction with wheel or trackpad.
-
+
+
+ Number of lines to scroll in the Y direction with wheel or trackpad.
+
@@ -10725,39 +13737,44 @@
- size
+
size
+
-
property
¶
-size: Size
+
-
-
- The size of the terminal.
+
@@ -10766,30 +13783,28 @@
- sub_title
+
sub_title
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-sub_title: Reactive[str] = (
- self.SUB_TITLE if self.SUB_TITLE is not None else ""
-)
+
-
-
- The sub-title for the application.
+
+
+ The sub-title for the application.
The initial value for sub_title
will be set to the SUB_TITLE
class variable if it exists, or
an empty string if it doesn't.
Sub-titles are typically used to show the high-level state of the app, such as the current mode, or path to
the file being worked on.
Assign a new value to this attribute to change the sub-title.
The new value is always converted to string.
-
+
@@ -10798,30 +13813,26 @@
- title
+
title
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-title: Reactive[str] = (
- self.TITLE
- if self.TITLE is not None
- else f"{self.__class__.__name__}"
-)
+
-
-
- The title for the application.
+
+
+ The title for the application.
The initial value for title
will be set to the TITLE
class variable if it exists, or
the name of the app if it doesn't.
Assign a new value to this attribute to change the title.
The new value is always converted to string.
-
+
@@ -10830,24 +13841,24 @@
- use_command_palette
+
use_command_palette
+
-
instance-attribute
¶
-use_command_palette: bool = self.ENABLE_COMMAND_PALETTE
+
-
-
- A flag to say if the application should use the command palette.
+
+
+ A flag to say if the application should use the command palette.
If set to False
any call to
action_command_palette
will be ignored.
-
+
@@ -10856,39 +13867,44 @@
- workers
+
workers
+
-
property
¶
-workers: WorkerManager
+
-
-
- The worker manager.
+
+
+ The worker manager.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- WorkerManager
-
- An object to manage workers.
+ Type
+ Description
-
-
-
+
+
+
+
+ WorkerManager
+
+
+
+ An object to manage workers.
+
+
+
+
+
+
@@ -10897,80 +13913,92 @@
-
- action_add_class
+
action_add_class
+
-
async
¶
-action_add_class(selector, class_name)
+action_add_class(selector, class_name)
-
-
- An action to add a CSS class to the selected widget.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- selector
-
- str
-
- Selects the widget to add the class to.
-
- required
-
-
+ An action to add a CSS class to the selected widget.
+
+
+Parameters:
+
+
- class_name
-
- str
-
- The class to add to the selected widget.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ selector
+¶
+
+ str
+
+
+
+ Selects the widget to add the class to.
+
+
+
+ required
+
+
+
+
+ class_name
+¶
+
+ str
+
+
+
+ The class to add to the selected widget.
+
+
+
+ required
+
+
+
+
-
+
-
- action_back
+
action_back
+
-
async
¶
-
-
- action_bell
+
action_bell
+
-
async
¶
-
-
- action_command_palette
+
action_command_palette
¶
-action_command_palette()
+
-
-
- Show the Textual command palette.
+
-
+ Show the Textual command palette.
+
+
-
- action_focus
+
action_focus
+
-
async
¶
-action_focus(widget_id)
+action_focus(widget_id)
-
-
- An action to focus the given widget.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+ An action to focus the given widget.
+
+
+Parameters:
+
+
- widget_id
-
- str
-
- ID of widget to focus.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ widget_id
+¶
+
+ str
+
+
+
+ ID of widget to focus.
+
+
+
+ required
+
+
+
+
-
+
-
- action_focus_next
+
action_focus_next
¶
-
-
- action_focus_previous
+
action_focus_previous
¶
-
-
- action_hide_help_panel
+
action_hide_help_panel
¶
-action_hide_help_panel()
+
-
-
- Hide the keys panel (if present).
+
-
+ Hide the keys panel (if present).
+
+
-
- action_pop_screen
+
action_pop_screen
+
-
async
¶
-
-
- action_push_screen
+
action_push_screen
+
-
async
¶
-action_push_screen(screen)
+action_push_screen(screen)
-
-
- An action to push a new screen on to the stack and make it active.
+
+
+ An action to push a new screen on to the stack and make it active.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- screen
-
- str
-
- Name of the screen.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ screen
+¶
+
+ str
+
+
+
+ Name of the screen.
+
+
+
+ required
+
+
+
+
-
+
-
- action_quit
+
action_quit
+
-
async
¶
-
-
- action_remove_class
+
action_remove_class
+
-
async
¶
-action_remove_class(selector, class_name)
+action_remove_class(selector, class_name)
-
-
- An action to remove a CSS class from the selected widget.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- selector
-
- str
-
- Selects the widget to remove the class from.
-
- required
-
-
+ An action to remove a CSS class from the selected widget.
+
+
+Parameters:
+
+
- class_name
-
- str
-
- The class to remove from the selected widget.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ selector
+¶
+
+ str
+
+
+
+ Selects the widget to remove the class from.
+
+
+
+ required
+
+
+
+
+ class_name
+¶
+
+ str
+
+
+
+ The class to remove from the selected widget.
+
+
+
+ required
+
+
+
+
-
+
-
- action_screenshot
+
action_screenshot
¶
-action_screenshot(filename=None, path=None)
+
-
-
- This action will save an SVG file containing the current contents of the screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- filename
-
- str | None
-
- Filename of screenshot, or None to auto-generate.
-
- None
-
-
+ This action will save an SVG file containing the current contents of the screen.
+
+
+Parameters:
+
+
- path
-
- str | None
-
- Path to directory. Defaults to the user's Downloads directory.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ filename
+¶
+
+ str | None
+
+
+
+ Filename of screenshot, or None to auto-generate.
+
+
+
+ None
+
+
+
+
+ path
+¶
+
+ str | None
+
+
+
+ Path to directory. Defaults to the user's Downloads directory.
+
+
+
+ None
+
+
+
+
-
+
-
- action_show_help_panel
+
action_show_help_panel
¶
-
-
- action_simulate_key
+
action_simulate_key
+
-
async
¶
-action_simulate_key(key)
+action_simulate_key(key)
-
-
- An action to simulate a key press.
+
+
+ An action to simulate a key press.
This will invoke the same actions as if the user had pressed the key.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- key
-
- str
-
- The key to process.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ key
+¶
+
+ str
+
+
+
+ The key to process.
+
+
+
+ required
+
+
+
+
-
+
-
- action_suspend_process
+
action_suspend_process
¶
-action_suspend_process()
+
-
-
- Suspend the process into the background.
+
+
+ Suspend the process into the background.
+
Note
@@ -11433,581 +14495,713 @@
application's process. Currently on Windows and when running
under Textual Web this is a non-operation.
-
+
-
- action_switch_mode
+
action_switch_mode
+
-
async
¶
-
-
- action_switch_screen
+
action_switch_screen
+
-
async
¶
-
-
- action_toggle_class
+
action_toggle_class
+
-
async
¶
-action_toggle_class(selector, class_name)
+action_toggle_class(selector, class_name)
-
-
- An action to toggle a CSS class on the selected widget.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- selector
-
- str
-
- Selects the widget to toggle the class on.
-
- required
-
-
+ An action to toggle a CSS class on the selected widget.
+
+
+Parameters:
+
+
- class_name
-
- str
-
- The class to toggle on the selected widget.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ selector
+¶
+
+ str
+
+
+
+ Selects the widget to toggle the class on.
+
+
+
+ required
+
+
+
+
+ class_name
+¶
+
+ str
+
+
+
+ The class to toggle on the selected widget.
+
+
+
+ required
+
+
+
+
-
+
-
- action_toggle_dark
+
action_toggle_dark
¶
-
-
- add_mode
+
add_mode
¶
-add_mode(mode, base_screen)
+add_mode(mode, base_screen)
-
-
- Adds a mode and its corresponding base screen to the app.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- mode
-
- str
-
- The new mode.
-
- required
-
-
+ Adds a mode and its corresponding base screen to the app.
+
+
+Parameters:
+
+
- base_screen
-
- str | Callable[[], Screen]
-
- The base screen associated with the given mode.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ mode
+¶
+
+ str
+
+
+
+ The new mode.
+
+
+
+ required
+
+
+
+
+ base_screen
+¶
+
+ str | Callable[[], Screen]
+
+
+
+ The base screen associated with the given mode.
+
+
+
+ required
+
+
+
+
+
+
+Raises:
+
+
-
- InvalidModeError
-
- If the name of the mode is not valid/duplicated.
+ Type
+ Description
-
-
+
+
+
+
+ InvalidModeError
+
+
+
+ If the name of the mode is not valid/duplicated.
+
+
+
+
+
-
+
-
- animate
+
animate
¶
-animate(
- attribute,
- value,
+animate(
+ attribute,
+ value,
*,
- final_value=...,
- duration=None,
- speed=None,
- delay=0.0,
- easing=DEFAULT_EASING,
- on_complete=None,
- level="full"
+ final_value=...,
+ duration=None,
+ speed=None,
+ delay=0.0,
+ easing=DEFAULT_EASING,
+ on_complete=None,
+ level="full"
)
-
-
- Animate an attribute.
+
+
+ Animate an attribute.
See the guide for how to use the animation system.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- attribute
-
- str
-
- Name of the attribute to animate.
-
- required
-
-
-
- value
-
- float | Animatable
-
- The value to animate to.
-
- required
-
-
-
- final_value
-
- object
-
- The final value of the animation.
-
- ...
-
-
-
- duration
-
- float | None
-
- The duration (in seconds) of the animation.
-
- None
-
-
-
- speed
-
- float | None
-
- The speed of the animation.
-
- None
-
-
-
- delay
-
- float
-
- A delay (in seconds) before the animation starts.
-
- 0.0
-
-
-
- easing
-
- EasingFunction | str
-
- An easing method.
-
- DEFAULT_EASING
-
-
-
- on_complete
-
- CallbackType | None
-
- A callable to invoke when the animation is finished.
-
- None
-
-
+
+Parameters:
+
+
- level
-
- AnimationLevel
-
- Minimum level required for the animation to take place (inclusive).
-
- 'full'
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ attribute
+¶
+
+ str
+
+
+
+ Name of the attribute to animate.
+
+
+
+ required
+
+
+
+
+ value
+¶
+
+ float | Animatable
+
+
+
+ The value to animate to.
+
+
+
+ required
+
+
+
+
+ final_value
+¶
+
+ object
+
+
+
+ The final value of the animation.
+
+
+
+ ...
+
+
+
+
+ duration
+¶
+
+ float | None
+
+
+
+ The duration (in seconds) of the animation.
+
+
+
+ None
+
+
+
+
+ speed
+¶
+
+ float | None
+
+
+
+ The speed of the animation.
+
+
+
+ None
+
+
+
+
+ delay
+¶
+
+ float
+
+
+
+ A delay (in seconds) before the animation starts.
+
+
+
+ 0.0
+
+
+
+
+ easing
+¶
+
+ EasingFunction | str
+
+
+
+ An easing method.
+
+
+
+ DEFAULT_EASING
+
+
+
+
+ on_complete
+¶
+
+ CallbackType | None
+
+
+
+ A callable to invoke when the animation is finished.
+
+
+
+ None
+
+
+
+
+ level
+¶
+
+ AnimationLevel
+
+
+
+ Minimum level required for the animation to take place (inclusive).
+
+
+
+ 'full'
+
+
+
+
-
+
-
- batch_update
+
batch_update
¶
-batch_update()
+
-
-
- A context manager to suspend all repaints until the end of the batch.
+
-
+ A context manager to suspend all repaints until the end of the batch.
+
+
-
- begin_capture_print
+
begin_capture_print
¶
-begin_capture_print(target, stdout=True, stderr=True)
+
-
-
- Capture content that is printed (or written to stdout / stderr).
+
+
+ Capture content that is printed (or written to stdout / stderr).
If printing is captured, the target
will be sent an events.Print message.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- target
-
- MessageTarget
-
- The widget where print content will be sent.
-
- required
-
-
-
- stdout
-
- bool
-
- Capture stdout.
-
- True
-
-
+
+Parameters:
+
+
- stderr
-
- bool
-
- Capture stderr.
-
- True
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ target
+¶
+
+ MessageTarget
+
+
+
+ The widget where print content will be sent.
+
+
+
+ required
+
+
+
+
+ stdout
+¶
+
+ bool
+
+
+
+ Capture stdout.
+
+
+
+ True
+
+
+
+
+ stderr
+¶
+
+ bool
+
+
+
+ Capture stderr.
+
+
+
+ True
+
+
+
+
-
+
-
- bell
+
bell
¶
-bell()
+
-
-
- Play the console 'bell'.
+
+
+ Play the console 'bell'.
For terminals that support a bell, this typically makes a notification or error sound.
Some terminals may make no sound or display a visual bell indicator, depending on configuration.
-
+
-
- bind
+
bind
¶
-bind(
- keys,
- action,
+bind(
+ keys,
+ action,
*,
- description="",
- show=True,
- key_display=None
+ description="",
+ show=True,
+ key_display=None
)
-
-
- Bind a key to an action.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- keys
-
- str
-
- A comma separated list of keys, i.e.
-
- required
-
-
-
- action
-
- str
-
- Action to bind to.
-
- required
-
-
-
- description
-
- str
-
- Short description of action.
-
- ''
-
-
-
- show
-
- bool
-
- Show key in UI.
-
- True
-
-
+ Bind a key to an action.
+
+
+Parameters:
+
+
- key_display
-
- str | None
-
- Replacement text for key, or None to use default.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ keys
+¶
+
+ str
+
+
+
+ A comma separated list of keys, i.e.
+
+
+
+ required
+
+
+
+
+ action
+¶
+
+ str
+
+
+
+ Action to bind to.
+
+
+
+ required
+
+
+
+
+ description
+¶
+
+ str
+
+
+
+ Short description of action.
+
+
+
+ ''
+
+
+
+
+ show
+¶
+
+ bool
+
+
+
+ Show key in UI.
+
+
+
+ True
+
+
+
+
+ key_display
+¶
+
+ str | None
+
+
+
+ Replacement text for key, or None to use default.
+
+
+
+ None
+
+
+
+
-
+
-
- call_from_thread
+
call_from_thread
¶
-call_from_thread(callback, *args, **kwargs)
+
-
-
- Run a callable from another thread, and return the result.
+
+
+ Run a callable from another thread, and return the result.
Like asyncio apps in general, Textual apps are not thread-safe. If you call methods
or set attributes on Textual objects from a thread, you may get unpredictable results.
This method will ensure that your code runs within the correct context.
@@ -12016,247 +15210,285 @@
Consider using post_message which is also thread-safe.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- callback
-
- Callable[..., CallThreadReturnType | Awaitable[CallThreadReturnType]]
-
- A callable to run.
-
- required
-
-
-
- *args
-
- Any
-
- Arguments to the callback.
-
- ()
-
-
+
+Parameters:
+
+
- **kwargs
-
- Any
-
- Keyword arguments for the callback.
-
- {}
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ callback
+¶
+
+ Callable[..., CallThreadReturnType | Awaitable[CallThreadReturnType]]
+
+
+
+ A callable to run.
+
+
+
+ required
+
+
+
+
+ *args
+¶
+
+ Any
+
+
+
+ Arguments to the callback.
+
+
+
+ ()
+
+
+
+
+ **kwargs
+¶
+
+ Any
+
+
+
+ Keyword arguments for the callback.
+
+
+
+ {}
+
+
+
+
+
+
+Raises:
+
+
-
- RuntimeError
-
- If the app isn't running or if this method is called from the same
-thread where the app is running.
+ Type
+ Description
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ RuntimeError
+
+
+
+ If the app isn't running or if this method is called from the same
+thread where the app is running.
+
+
+
+
+
+
+
+ Returns:
+
+
-
- CallThreadReturnType
-
- The result of the callback.
+ Type
+ Description
-
-
+
+
+
+
+ CallThreadReturnType
+
+
+
+ The result of the callback.
+
+
+
+
+
-
+
-
- capture_mouse
+
capture_mouse
¶
-capture_mouse(widget)
+capture_mouse(widget)
-
-
- Send all mouse events to the given widget or disable mouse capture.
+
+
+ Send all mouse events to the given widget or disable mouse capture.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- widget
-
- Widget | None
-
- If a widget, capture mouse event, or None
to end mouse capture.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ widget
+¶
+
+ Widget | None
+
+
+
+ If a widget, capture mouse event, or None
to end mouse capture.
+
+
+
+ required
+
+
+
+
-
+
-
- clear_notifications
+
clear_notifications
¶
-clear_notifications()
+
-
-
- Clear all the current notifications.
+
-
+ Clear all the current notifications.
+
+
-
- compose
+
compose
¶
-compose()
+
-
-
- Yield child widgets for a container.
+
+
+ Yield child widgets for a container.
This method should be implemented in a subclass.
-
+
-
- copy_to_clipboard
+
copy_to_clipboard
¶
-copy_to_clipboard(text)
+copy_to_clipboard(text)
-
-
- Copy text to the clipboard.
+
+
+ Copy text to the clipboard.
Note
This does not work on macOS Terminal, but will work on most other terminals.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- text
-
- str
-
- Text you wish to copy to the clipboard.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ text
+¶
+
+ str
+
+
+
+ Text you wish to copy to the clipboard.
+
+
+
+ required
+
+
+
+
-
+
-
- deliver_binary
+
deliver_binary
¶
-deliver_binary(
- path_or_file,
+deliver_binary(
+ path_or_file,
*,
- save_directory=None,
- save_filename=None,
- open_method="download",
- mime_type=None,
- name=None
+ save_directory=None,
+ save_filename=None,
+ open_method="download",
+ mime_type=None,
+ name=None
)
-
-
- Deliver a binary file to the end-user of the application.
+
+
+ Deliver a binary file to the end-user of the application.
If an IO object is supplied, it will be closed by this method
and must not be used after it is supplied to this method.
If running in a terminal, this will save the file to the user's
@@ -12270,228 +15502,292 @@
handling this message, you can add custom logic to your application that fires
only after the file has been delivered.
-
Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- path_or_file
-
- str | Path | BinaryIO
-
- The path or file-like object to save.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
- save_directory
-
- str | Path | None
-
- The directory to save the file to. If None,
+
+
+
+
+ path_or_file
+¶
+
+ str | Path | BinaryIO
+
+
+
+ The path or file-like object to save.
+
+
+
+ required
+
+
+
+
+ save_directory
+¶
+
+ str | Path | None
+
+
+
+ The directory to save the file to. If None,
the default "downloads" directory will be used. This
-argument is ignored when running via the web.
-
- None
-
-
-
- save_filename
-
- str | None
-
- The filename to save the file to. If None, the following logic
+argument is ignored when running via the web.
+
+
+
+ None
+
+
+
+
+ save_filename
+¶
+
+ str | None
+
+
+
+ The filename to save the file to. If None, the following logic
applies to generate the filename:
- If path_or_file
is a file-like object, the filename will be taken from
the name
attribute if available.
- If path_or_file
is a path, the filename will be taken from the path.
- If a filename is not available, a filename will be generated using the
- App's title and the current date and time.
-
- None
-
-
-
- open_method
-
- Literal['browser', 'download']
-
- The method to use to open the file. "browser" will open the file in the
+ App's title and the current date and time.
+
+
+
+ None
+
+
+
+
+ open_method
+¶
+
+ Literal['browser', 'download']
+
+
+
+ The method to use to open the file. "browser" will open the file in the
web browser, "download" will initiate a download. Note that this can sometimes
-be impacted by the browser's settings.
-
- 'download'
-
-
-
- mime_type
-
- str | None
-
- The MIME type of the file or None to guess based on file extension.
+be impacted by the browser's settings.
+
+
+
+ 'download'
+
+
+
+
+ mime_type
+¶
+
+ str | None
+
+
+
+ The MIME type of the file or None to guess based on file extension.
If no MIME type is supplied and we cannot guess the MIME type, from the
-file extension, the MIME type will be set to "application/octet-stream".
-
- None
-
-
-
- name
-
- str | None
-
- A user-defined named which will be returned in DeliveryComplete
-and DeliveryComplete
.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+file extension, the MIME type will be set to "application/octet-stream".
+
+
+
+ None
+
+
+
+
+ name
+¶
+
+ str | None
+
+
+
+ A user-defined named which will be returned in DeliveryComplete
+and DeliveryComplete
.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- str | None
-
- The delivery key that uniquely identifies the file delivery.
+ Type
+ Description
-
-
+
+
+
+
+ str | None
+
+
+
+ The delivery key that uniquely identifies the file delivery.
+
+
+
+
+
-
+
-
- deliver_screenshot
+
deliver_screenshot
¶
-deliver_screenshot(
- filename=None, path=None, time_format=None
+deliver_screenshot(
+ filename=None, path=None, time_format=None
)
-
-
- Deliver a screenshot of the app.
+
+
+ Deliver a screenshot of the app.
This with save the screenshot when running locally, or serve it when the app
is running in a web browser.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- filename
-
- str | None
-
- Filename of SVG screenshot, or None to auto-generate
-a filename with the date and time.
-
- None
-
-
-
- path
-
- str | None
-
- Path to directory for output when saving locally (not used when app is running in the browser).
-Defaults to current working directory.
-
- None
-
-
+
+Parameters:
+
+
- time_format
-
- str | None
-
- Date and time format to use if filename is None.
-Defaults to a format like ISO 8601 with some reserved characters replaced with underscores.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ filename
+¶
+
+ str | None
+
+
+
+ Filename of SVG screenshot, or None to auto-generate
+a filename with the date and time.
+
+
+
+ None
+
+
+
+
+ path
+¶
+
+ str | None
+
+
+
+ Path to directory for output when saving locally (not used when app is running in the browser).
+Defaults to current working directory.
+
+
+
+ None
+
+
+
+
+ time_format
+¶
+
+ str | None
+
+
+
+ Date and time format to use if filename is None.
+Defaults to a format like ISO 8601 with some reserved characters replaced with underscores.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- str | None
-
- The delivery key that uniquely identifies the file delivery.
+ Type
+ Description
-
-
+
+
+
+
+ str | None
+
+
+
+ The delivery key that uniquely identifies the file delivery.
+
+
+
+
+
-
+
-
- deliver_text
+
deliver_text
¶
-deliver_text(
- path_or_file,
+deliver_text(
+ path_or_file,
*,
- save_directory=None,
- save_filename=None,
+ save_directory=None,
+ save_filename=None,
open_method="download",
- encoding=None,
- mime_type=None,
- name=None
+ encoding=None,
+ mime_type=None,
+ name=None
)
-
-
- Deliver a text file to the end-user of the application.
+
+
+ Deliver a text file to the end-user of the application.
If a TextIO object is supplied, it will be closed by this method
and must not be used after this method is called.
If running in a terminal, this will save the file to the user's
@@ -12503,849 +15799,1047 @@
handling this message, you can add custom logic to your application that fires
only after the file has been delivered.
-
Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- path_or_file
-
- str | Path | TextIO
-
- The path or file-like object to save.
-
- required
-
-
+
+Parameters:
+
+
- save_directory
-
- str | Path | None
-
- The directory to save the file to.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
- save_filename
-
- str | None
-
- The filename to save the file to. If path_or_file
+
+
+
+
+ path_or_file
+¶
+
+ str | Path | TextIO
+
+
+
+ The path or file-like object to save.
+
+
+
+ required
+
+
+
+
+ save_directory
+¶
+
+ str | Path | None
+
+
+
+ The directory to save the file to.
+
+
+
+ None
+
+
+
+
+ save_filename
+¶
+
+ str | None
+
+
+
+ The filename to save the file to. If path_or_file
is a file-like object, the filename will be generated from
the name
attribute if available. If path_or_file
is a path
-the filename will be generated from the path.
-
- None
-
-
-
- encoding
-
- str | None
-
- The encoding to use when saving the file. If None
,
+the filename will be generated from the path.
+
+
+
+ None
+
+
+
+
+ encoding
+¶
+
+ str | None
+
+
+
+ The encoding to use when saving the file. If None
,
the encoding will be determined by supplied file-like object
-(if possible). If this is not possible, 'utf-8' will be used.
-
- None
-
-
-
- mime_type
-
- str | None
-
- The MIME type of the file or None to guess based on file extension.
+(if possible). If this is not possible, 'utf-8' will be used.
+
+
+
+ None
+
+
+
+
+ mime_type
+¶
+
+ str | None
+
+
+
+ The MIME type of the file or None to guess based on file extension.
If no MIME type is supplied and we cannot guess the MIME type, from the
-file extension, the MIME type will be set to "text/plain".
-
- None
-
-
-
- name
-
- str | None
-
- A user-defined named which will be returned in DeliveryComplete
-and DeliveryComplete
.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+file extension, the MIME type will be set to "text/plain".
+
+
+
+ None
+
+
+
+
+ name
+¶
+
+ str | None
+
+
+
+ A user-defined named which will be returned in DeliveryComplete
+and DeliveryComplete
.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- str | None
-
- The delivery key that uniquely identifies the file delivery.
+ Type
+ Description
-
-
+
+
+
+
+ str | None
+
+
+
+ The delivery key that uniquely identifies the file delivery.
+
+
+
+
+
-
+
-
- end_capture_print
+
end_capture_print
¶
-end_capture_print(target)
+end_capture_print(target)
-
-
- End capturing of prints.
+
+
+ End capturing of prints.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+Parameters:
+
+
- target
-
- MessageTarget
-
- The widget that was capturing prints.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ target
+¶
+
+ MessageTarget
+
+
+
+ The widget that was capturing prints.
+
+
+
+ required
+
+
+
+
-
+
-
- exit
+
exit
¶
-exit(result=None, return_code=0, message=None)
+exit(result=None, return_code=0, message=None)
-
-
- Exit the app, and return the supplied result.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- result
-
- ReturnType | None
-
- Return value.
-
- None
-
-
-
- return_code
-
- int
-
- The return code. Use non-zero values for error codes.
-
- 0
-
-
+ Exit the app, and return the supplied result.
+
+
+Parameters:
+
+
- message
-
- RenderableType | None
-
- Optional message to display on exit.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ result
+¶
+
+ ReturnType | None
+
+
+
+ Return value.
+
+
+
+ None
+
+
+
+
+ return_code
+¶
+
+ int
+
+
+
+ The return code. Use non-zero values for error codes.
+
+
+
+ 0
+
+
+
+
+ message
+¶
+
+ RenderableType | None
+
+
+
+ Optional message to display on exit.
+
+
+
+ None
+
+
+
+
-
+
-
- export_screenshot
+
export_screenshot
¶
-export_screenshot(*, title=None, simplify=False)
+
-
-
- Export an SVG screenshot of the current screen.
+
+
+ Export an SVG screenshot of the current screen.
See also save_screenshot which writes the screenshot to a file.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- title
-
- str | None
-
- The title of the exported screenshot or None
-to use app title.
-
- None
-
-
+
+Parameters:
+
+
- simplify
-
- bool
-
- Simplify the segments by combining contiguous segments with the same style.
-
- False
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ title
+¶
+
+ str | None
+
+
+
+ The title of the exported screenshot or None
+to use app title.
+
+
+
+ None
+
+
+
+
+ simplify
+¶
+
+ bool
+
+
+
+ Simplify the segments by combining contiguous segments with the same style.
+
+
+
+ False
+
+
+
+
-
+
-
- get_child_by_id
+
get_child_by_id
¶
-get_child_by_id(id, expect_type=None)
+
+get_child_by_id(
+ id: str, expect_type: type[ExpectType]
+) -> ExpectType
+
+get_child_by_id(id, expect_type=None)
-
-
- Get the first child (immediate descendant) of this DOMNode with the given ID.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- id
-
- str
-
- The ID of the node to search for.
-
- required
-
-
-
- expect_type
-
- type[ExpectType] | None
-
- Require the object be of the supplied type,
-or use None
to apply no type restriction.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+ Get the first child (immediate descendant) of this DOMNode with the given ID.
+
+
+Parameters:
+
+
-
- ExpectType | Widget
-
- The first child of this node with the specified ID.
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ id
+¶
+
+ str
+
+
+
+ The ID of the node to search for.
+
+
+
+ required
+
+
+
+
+ expect_type
+¶
+
+ type[ExpectType] | None
+
+
+
+ Require the object be of the supplied type,
+or use None
to apply no type restriction.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- NoMatches
-
- If no children could be found for this ID.
+ Type
+ Description
+
+
+
+
+ ExpectType | Widget
+
+
+
+ The first child of this node with the specified ID.
+
+
+
+
+
+
+
+Raises:
+
+
-
- WrongType
-
- If the wrong type was found.
+ Type
+ Description
-
-
+
+
+
+
+ NoMatches
+
+
+
+ If no children could be found for this ID.
+
+
+
+
+
+ WrongType
+
+
+
+ If the wrong type was found.
+
+
+
+
+
-
+
-
- get_child_by_type
+
get_child_by_type
¶
-get_child_by_type(expect_type)
+get_child_by_type(expect_type)
-
-
- Get a child of a give type.
+
+
+ Get a child of a give type.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- expect_type
-
- type[ExpectType]
-
- The type of the expected child.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ expect_type
+¶
+
+ type[ExpectType]
+
+
+
+ The type of the expected child.
+
+
+
+ required
+
+
+
+
+
+
+Raises:
+
+
-
- NoMatches
-
- If no valid child is found.
+ Type
+ Description
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ NoMatches
+
+
+
+ If no valid child is found.
+
+
+
+
+
+
+
+ Returns:
+
+
-
- ExpectType
-
- A widget.
+ Type
+ Description
-
-
+
+
+
+
+ ExpectType
+
+
+
+ A widget.
+
+
+
+
+
-
+
-
- get_css_variables
+
get_css_variables
¶
-get_css_variables()
+
-
-
- Get a mapping of variables used to pre-populate CSS.
+
+
+ Get a mapping of variables used to pre-populate CSS.
May be implemented in a subclass to add new CSS variables.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- dict[str, str]
-
- A mapping of variable name to value.
+ Type
+ Description
-
-
+
+
+
+
+ dict[str, str]
+
+
+
+ A mapping of variable name to value.
+
+
+
+
+
-
+
-
- get_default_screen
+
get_default_screen
¶
-get_default_screen()
+
-
-
- Get the default screen.
+
+
+ Get the default screen.
This is called when the App is first composed. The returned screen instance
will be the first screen on the stack.
Implement this method if you would like to use a custom Screen as the default screen.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Screen
-
- A screen instance.
+ Type
+ Description
-
-
+
+
+
+
+ Screen
+
+
+
+ A screen instance.
+
+
+
+
+
-
+
-
- get_driver_class
+
get_driver_class
¶
-get_driver_class()
+
-
-
- Get a driver class for this platform.
+
+
+ Get a driver class for this platform.
This method is called by the constructor, and unlikely to be required when
building a Textual app.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Type[Driver]
-
- A Driver class which manages input and display.
+ Type
+ Description
-
-
+
+
+
+
+ Type[Driver]
+
+
+
+ A Driver class which manages input and display.
+
+
+
+
+
-
+
-
- get_key_display
+
get_key_display
¶
-get_key_display(binding)
+get_key_display(binding)
-
-
- Format a bound key for display in footer / key panel etc.
+
+
+ Format a bound key for display in footer / key panel etc.
Note
You can implement this in a subclass if you want to change how keys are displayed in your app.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- binding
-
- Binding
-
- A Binding.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ binding
+¶
+
+ Binding
+
+
+
+ A Binding.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- str
-
- A string used to represent the key.
+ Type
+ Description
-
-
+
+
+
+
+ str
+
+
+
+ A string used to represent the key.
+
+
+
+
+
-
+
-
- get_loading_widget
+
get_loading_widget
¶
-get_loading_widget()
+
-
-
- Get a widget to be used as a loading indicator.
+
+
+ Get a widget to be used as a loading indicator.
Extend this method if you want to display the loading state a little differently.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- Widget
-
- A widget to display a loading state.
+ Type
+ Description
-
-
+
+
+
+
+ Widget
+
+
+
+ A widget to display a loading state.
+
+
+
+
+
-
+
-
- get_pseudo_classes
+
get_pseudo_classes
¶
-
-
- get_screen
+
get_screen
¶
-get_screen(screen, screen_class=None)
+
+get_screen(screen: ScreenType) -> ScreenType
+
get_screen(
+ screen: str,
+ screen_class: Type[ScreenType] | None = None,
+) -> ScreenType
+
get_screen(
+ screen: ScreenType,
+ screen_class: Type[ScreenType] | None = None,
+) -> ScreenType
+
+get_screen(screen, screen_class=None)
-
-
- Get an installed screen.
+
+
+ Get an installed screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- screen
-
- Screen | str
-
- Either a Screen object or screen name (the name
argument when installed).
-
- required
-
-
+
+Parameters:
+
+
- screen_class
-
- Type[Screen] | None
-
- Class of expected screen, or None
for any screen class.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen | str
+
+
+
+ Either a Screen object or screen name (the name
argument when installed).
+
+
+
+ required
+
+
+
+
+ screen_class
+¶
+
+ Type[Screen] | None
+
+
+
+ Class of expected screen, or None
for any screen class.
+
+
+
+ None
+
+
+
+
+
+
+Raises:
+
+
-
- KeyError
-
- If the named screen doesn't exist.
+ Type
+ Description
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ KeyError
+
+
+
+ If the named screen doesn't exist.
+
+
+
+
+
+
+
+ Returns:
+
+
-
- Screen
-
- A screen instance.
+ Type
+ Description
-
-
+
+
+
+
+ Screen
+
+
+
+ A screen instance.
+
+
+
+
+
-
+
-
- get_system_commands
+
get_system_commands
¶
-get_system_commands(screen)
+get_system_commands(screen)
-
-
- A generator of system commands used in the command palette.
+
+
+ A generator of system commands used in the command palette.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+Parameters:
+
+
- screen
-
- Screen
-
- The screen where the command palette was invoked from.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
- Implement this method in your App subclass if you want to add custom commands.
+
+
+
+
+ screen
+¶
+
+ Screen
+
+
+
+ The screen where the command palette was invoked from.
+
+
+
+ required
+
+
+
+
+ Implement this method in your App subclass if you want to add custom commands.
Here is an example:
def get_system_commands(self, screen: Screen) -> Iterable[SystemCommand]:
yield from super().get_system_commands(screen)
@@ -13356,715 +16850,895 @@
Requires that SystemCommandsProvider
is in App.COMMANDS
class variable.
- Yields:
-
-
-
- Type
- Description
-
-
-
+
+ Yields:
+
+
-
- Iterable[SystemCommand]
-
- SystemCommand instances.
+ Type
+ Description
-
-
+
+
+
+
+ Iterable[SystemCommand]
+
+
+
+ SystemCommand instances.
+
+
+
+
+
-
+
-
- get_widget_at
+
get_widget_at
¶
-get_widget_at(x, y)
+
-
-
- Get the widget under the given coordinates.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- x
-
- int
-
- X coordinate.
-
- required
-
-
+ Get the widget under the given coordinates.
+
+
+Parameters:
+
+
- y
-
- int
-
- Y coordinate.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ x
+¶
+
+ int
+
+
+
+ X coordinate.
+
+
+
+ required
+
+
+
+
+ y
+¶
+
+ int
+
+
+
+ Y coordinate.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- tuple[Widget, Region]
-
- The widget and the widget's screen region.
+ Type
+ Description
-
-
+
+
+
+
+ tuple[Widget, Region]
+
+
+
+ The widget and the widget's screen region.
+
+
+
+
+
-
+
-
- get_widget_by_id
+
get_widget_by_id
¶
-get_widget_by_id(id, expect_type=None)
+
+get_widget_by_id(
+ id: str, expect_type: type[ExpectType]
+) -> ExpectType
+
+get_widget_by_id(id, expect_type=None)
-
-
- Get the first descendant widget with the given ID.
+
+
+ Get the first descendant widget with the given ID.
Performs a breadth-first search rooted at the current screen.
It will not return the Screen if that matches the ID.
To get the screen, use self.screen
.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- id
-
- str
-
- The ID to search for in the subtree
-
- required
-
-
-
- expect_type
-
- type[ExpectType] | None
-
- Require the object be of the supplied type, or None for any type.
-Defaults to None.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+Parameters:
+
+
-
- ExpectType | Widget
-
- The first descendant encountered with this ID.
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ id
+¶
+
+ str
+
+
+
+ The ID to search for in the subtree
+
+
+
+ required
+
+
+
+
+ expect_type
+¶
+
+ type[ExpectType] | None
+
+
+
+ Require the object be of the supplied type, or None for any type.
+Defaults to None.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- NoMatches
-
- if no children could be found for this ID
+ Type
+ Description
+
+
+
+
+ ExpectType | Widget
+
+
+
+ The first descendant encountered with this ID.
+
+
+
+
+
+
+
+Raises:
+
+
-
- WrongType
-
- if the wrong type was found.
+ Type
+ Description
-
-
+
+
+
+
+ NoMatches
+
+
+
+ if no children could be found for this ID
+
+
+
+
+
+ WrongType
+
+
+
+ if the wrong type was found.
+
+
+
+
+
-
+
-
- install_screen
+
install_screen
¶
-install_screen(screen, name)
+
-
-
- Install a screen.
+
+
+ Install a screen.
Installing a screen prevents Textual from destroying it when it is no longer on the screen stack.
Note that you don't need to install a screen to use it. See push_screen
or switch_screen to make a new screen current.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- screen
-
- Screen
-
- Screen to install.
-
- required
-
-
+
+Parameters:
+
+
- name
-
- str
-
- Unique name to identify the screen.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen
+
+
+
+ Screen to install.
+
+
+
+ required
+
+
+
+
+ name
+¶
+
+ str
+
+
+
+ Unique name to identify the screen.
+
+
+
+ required
+
+
+
+
+
+
+Raises:
+
+
-
- ScreenError
-
- If the screen can't be installed.
+ Type
+ Description
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ ScreenError
+
+
+
+ If the screen can't be installed.
+
+
+
+
+
+
+
+ Returns:
+
+
-
- None
-
- An awaitable that awaits the mounting of the screen and its children.
+ Type
+ Description
-
-
+
+
+
+
+ None
+
+
+
+ An awaitable that awaits the mounting of the screen and its children.
+
+
+
+
+
-
+
-
- is_mounted
+
is_mounted
¶
-is_mounted(widget)
+is_mounted(widget)
-
-
- Check if a widget is mounted.
+
+
+ Check if a widget is mounted.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- widget
-
- Widget
-
- A widget.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ widget
+¶
+
+ Widget
+
+
+
+ A widget.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- bool
-
- True of the widget is mounted.
+ Type
+ Description
-
-
+
+
+
+
+ bool
+
+
+
+ True of the widget is mounted.
+
+
+
+
+
-
+
-
- is_screen_installed
+
is_screen_installed
¶
-is_screen_installed(screen)
+is_screen_installed(screen)
-
-
- Check if a given screen has been installed.
+
+
+ Check if a given screen has been installed.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- screen
-
- Screen | str
-
- Either a Screen object or screen name (the name
argument when installed).
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen | str
+
+
+
+ Either a Screen object or screen name (the name
argument when installed).
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- bool
-
- True if the screen is currently installed,
+ Type
+ Description
-
-
+
+
+
+
+ bool
+
+
+
+ True if the screen is currently installed,
+
+
+
+
+
-
+
-
- mount
+
mount
¶
-mount(*widgets, before=None, after=None)
+
-
-
- Mount the given widgets relative to the app's screen.
+
+
+ Mount the given widgets relative to the app's screen.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- *widgets
-
- Widget
-
- The widget(s) to mount.
-
- ()
-
+ Name
+ Type
+ Description
+ Default
-
- before
-
- int | str | Widget | None
-
- Optional location to mount before. An int
is the index
+
+
+
+
+ *widgets
+¶
+
+ Widget
+
+
+
+ The widget(s) to mount.
+
+
+
+ ()
+
+
+
+
+ before
+¶
+
+ int | str | Widget | None
+
+
+
+ Optional location to mount before. An int
is the index
of the child to mount before, a str
is a query_one
query to
-find the widget to mount before.
-
- None
-
-
-
- after
-
- int | str | Widget | None
-
- Optional location to mount after. An int
is the index
+find the widget to mount before.
+
+
+
+ None
+
+
+
+
+ after
+¶
+
+ int | str | Widget | None
+
+
+
+ Optional location to mount after. An int
is the index
of the child to mount after, a str
is a query_one
query to
-find the widget to mount after.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+find the widget to mount after.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- AwaitMount
-
- An awaitable object that waits for widgets to be mounted.
+ Type
+ Description
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ AwaitMount
+
+
+
+ An awaitable object that waits for widgets to be mounted.
+
+
+
+
+
+
+
+Raises:
+
+
-
- MountError
-
- If there is a problem with the mount request.
+ Type
+ Description
-
-
+
+
+
+
+ MountError
+
+
+
+ If there is a problem with the mount request.
+
+
+
+
+
+
Note
Only one of before
or after
can be provided. If both are
provided a MountError
will be raised.
-
+
-
- mount_all
+
mount_all
¶
-mount_all(widgets, *, before=None, after=None)
+
-
-
- Mount widgets from an iterable.
+
+
+ Mount widgets from an iterable.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- widgets
-
- Iterable[Widget]
-
- An iterable of widgets.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
- before
-
- int | str | Widget | None
-
- Optional location to mount before. An int
is the index
+
+
+
+
+ widgets
+¶
+
+ Iterable[Widget]
+
+
+
+ An iterable of widgets.
+
+
+
+ required
+
+
+
+
+ before
+¶
+
+ int | str | Widget | None
+
+
+
+ Optional location to mount before. An int
is the index
of the child to mount before, a str
is a query_one
query to
-find the widget to mount before.
-
- None
-
-
-
- after
-
- int | str | Widget | None
-
- Optional location to mount after. An int
is the index
+find the widget to mount before.
+
+
+
+ None
+
+
+
+
+ after
+¶
+
+ int | str | Widget | None
+
+
+
+ Optional location to mount after. An int
is the index
of the child to mount after, a str
is a query_one
query to
-find the widget to mount after.
-
- None
-
-
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+find the widget to mount after.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- AwaitMount
-
- An awaitable object that waits for widgets to be mounted.
+ Type
+ Description
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ AwaitMount
+
+
+
+ An awaitable object that waits for widgets to be mounted.
+
+
+
+
+
+
+
+Raises:
+
+
-
- MountError
-
- If there is a problem with the mount request.
+ Type
+ Description
-
-
+
+
+
+
+ MountError
+
+
+
+ If there is a problem with the mount request.
+
+
+
+
+
+
Note
Only one of before
or after
can be provided. If both are
provided a MountError
will be raised.
-
+
-
- notify
+
notify
¶
-notify(
- message,
+notify(
+ message,
*,
- title="",
- severity="information",
- timeout=None
+ title="",
+ severity="information",
+ timeout=None
)
-
-
- Create a notification.
+
+
+ Create a notification.
Tip
This method is thread-safe.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- message
-
- str
-
- The message for the notification.
-
- required
-
-
-
- title
-
- str
-
- The title for the notification.
-
- ''
-
-
-
- severity
-
- SeverityLevel
-
- The severity of the notification.
-
- 'information'
-
-
+
+Parameters:
+
+
- timeout
-
- float | None
-
- The timeout (in seconds) for the notification, or None
for default.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
- The notify
method is used to create an application-wide
+
+
+
+
+ message
+¶
+
+ str
+
+
+
+ The message for the notification.
+
+
+
+ required
+
+
+
+
+ title
+¶
+
+ str
+
+
+
+ The title for the notification.
+
+
+
+ ''
+
+
+
+
+ severity
+¶
+
+ SeverityLevel
+
+
+
+ The severity of the notification.
+
+
+
+ 'information'
+
+
+
+
+ timeout
+¶
+
+ float | None
+
+
+
+ The timeout (in seconds) for the notification, or None
for default.
+
+
+
+ None
+
+
+
+
+ The notify
method is used to create an application-wide
notification, shown in a Toast
,
normally originating in the bottom right corner of the display.
Notifications can have the following severity levels:
@@ -14075,6 +17749,7 @@
The default is information
.
+
-
+
-
- open_url
+
open_url
¶
-open_url(url, *, new_tab=True)
+
-
-
- Open a URL in the default web browser.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- url
-
- str
-
- The URL to open.
-
- required
-
-
+ Open a URL in the default web browser.
+
+
+Parameters:
+
+
- new_tab
-
- bool
-
- Whether to open the URL in a new tab.
-
- True
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ url
+¶
+
+ str
+
+
+
+ The URL to open.
+
+
+
+ required
+
+
+
+
+ new_tab
+¶
+
+ bool
+
+
+
+ Whether to open the URL in a new tab.
+
+
+
+ True
+
+
+
+
-
+
-
- panic
+
panic
¶
-panic(*renderables)
+panic(*renderables)
-
-
- Exits the app and display error message(s).
+
+
+ Exits the app and display error message(s).
Used in response to unexpected errors.
For a more graceful exit, see the exit method.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- *renderables
-
- RenderableType
-
- Text or Rich renderable(s) to display on exit.
-
- ()
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ *renderables
+¶
+
+ RenderableType
+
+
+
+ Text or Rich renderable(s) to display on exit.
+
+
+
+ ()
+
+
+
+
-
+
-
- pop_screen
+
pop_screen
¶
-pop_screen()
+
-
-
- Pop the current screen from the stack, and switch to the previous screen.
+
+
+ Pop the current screen from the stack, and switch to the previous screen.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- AwaitComplete
-
- The screen that was replaced.
+ Type
+ Description
-
-
+
+
+
+
+ AwaitComplete
+
+
+
+ The screen that was replaced.
+
+
+
+
+
-
+
-
- post_display_hook
+
post_display_hook
¶
-post_display_hook()
+
-
-
- Called immediately after a display is done. Used in tests.
+
-
+ Called immediately after a display is done. Used in tests.
+
+
-
- push_screen
+
push_screen
¶
-push_screen(screen, callback=None, wait_for_dismiss=False)
+
+push_screen(
+ screen: Screen[ScreenResultType] | str,
+ callback: (
+ ScreenResultCallbackType[ScreenResultType] | None
+ ) = None,
+ wait_for_dismiss: Literal[False] = False,
+) -> AwaitMount
+
push_screen(
+ screen: Screen[ScreenResultType] | str,
+ callback: (
+ ScreenResultCallbackType[ScreenResultType] | None
+ ) = None,
+ wait_for_dismiss: Literal[True] = True,
+) -> Future[ScreenResultType]
+
+push_screen(screen, callback=None, wait_for_dismiss=False)
-
-
- Push a new screen on the screen stack, making it the current screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- screen
-
- Screen[ScreenResultType] | str
-
- A Screen instance or the name of an installed screen.
-
- required
-
-
-
- callback
-
- ScreenResultCallbackType[ScreenResultType] | None
-
- An optional callback function that will be called if the screen is dismissed with a result.
-
- None
-
-
+ Push a new screen on the screen stack, making it the current screen.
+
+
+Parameters:
+
+
- wait_for_dismiss
-
- bool
-
- If True
, awaiting this method will return the dismiss value from the screen. When set to False
, awaiting
-this method will wait for the screen to be mounted. Note that wait_for_dismiss
should only be set to True
when running in a worker.
-
- False
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen[ScreenResultType] | str
+
+
+
+ A Screen instance or the name of an installed screen.
+
+
+
+ required
+
+
+
+
+ callback
+¶
+
+ ScreenResultCallbackType[ScreenResultType] | None
+
+
+
+ An optional callback function that will be called if the screen is dismissed with a result.
+
+
+
+ None
+
+
+
+
+ wait_for_dismiss
+¶
+
+ bool
+
+
+
+ If True
, awaiting this method will return the dismiss value from the screen. When set to False
, awaiting
+this method will wait for the screen to be mounted. Note that wait_for_dismiss
should only be set to True
when running in a worker.
+
+
+
+ False
+
+
+
+
+
+
+Raises:
+
+
-
- NoActiveWorker
-
- If using wait_for_dismiss
outside of a worker.
+ Type
+ Description
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ NoActiveWorker
+
+
+
+ If using wait_for_dismiss
outside of a worker.
+
+
+
+
+
+
+
+ Returns:
+
+
-
- AwaitMount | asyncio.Future[ScreenResultType]
-
- An optional awaitable that awaits the mounting of the screen and its children, or an asyncio Future
-to await the result of the screen.
+ Type
+ Description
-
-
+
+
+
+
+ AwaitMount | Future[ScreenResultType]
+
+
+
+ An optional awaitable that awaits the mounting of the screen and its children, or an asyncio Future
+to await the result of the screen.
+
+
+
+
+
-
+
-
- push_screen_wait
+
push_screen_wait
+
-
async
¶
-push_screen_wait(screen)
+
+push_screen_wait(
+ screen: Screen[ScreenResultType],
+) -> ScreenResultType
+
+push_screen_wait(screen)
-
-
- Push a screen and wait for the result (received from Screen.dismiss
).
+
+
+ Push a screen and wait for the result (received from Screen.dismiss
).
Note that this method may only be called when running in a worker.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- screen
-
- Screen[ScreenResultType] | str
-
- A screen or the name of an installed screen.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen[ScreenResultType] | str
+
+
+
+ A screen or the name of an installed screen.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- ScreenResultType | Any
-
- The screen's result.
+ Type
+ Description
-
-
+
+
+
+
+ ScreenResultType | Any
+
+
+
+ The screen's result.
+
+
+
+
+
-
+
-
- recompose
+
recompose
+
-
async
¶
-recompose()
+
-
-
- Recompose the widget.
+
+
+ Recompose the widget.
Recomposing will remove children and call self.compose
again to remount.
-
+
-
- refresh
+
refresh
¶
-refresh(*, repaint=True, layout=False, recompose=False)
+
-
-
- Refresh the entire screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- repaint
-
- bool
-
- Repaint the widget (will call render() again).
-
- True
-
-
-
- layout
-
- bool
-
- Also layout widgets in the view.
-
- False
-
-
+ Refresh the entire screen.
+
+
+Parameters:
+
+
- recompose
-
- bool
-
- Re-compose the widget (will remove and re-mount children).
-
- False
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ repaint
+¶
+
+ bool
+
+
+
+ Repaint the widget (will call render() again).
+
+
+
+ True
+
+
+
+
+ layout
+¶
+
+ bool
+
+
+
+ Also layout widgets in the view.
+
+
+
+ False
+
+
+
+
+ recompose
+¶
+
+ bool
+
+
+
+ Re-compose the widget (will remove and re-mount children).
+
+
+
+ False
+
+
+
+
+
+
+ Returns:
+
+
-
- Self
-
- The App
instance.
+ Type
+ Description
-
-
+
+
+
+
+ Self
+
+
+
+ The App
instance.
+
+
+
+
+
-
+
-
- refresh_css
+
refresh_css
¶
-refresh_css(animate=True)
+refresh_css(animate=True)
-
-
- Refresh CSS.
+
+
-
- remove_mode
+
remove_mode
¶
-remove_mode(mode)
+remove_mode(mode)
-
-
- Removes a mode from the app.
+
+
+ Removes a mode from the app.
Screens that are running in the stack of that mode are scheduled for pruning.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- mode
-
- str
-
- The mode to remove. It can't be the active mode.
-
- required
-
-
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+Parameters:
+
+
-
- ActiveModeError
-
- If trying to remove the active mode.
+ Name
+ Type
+ Description
+ Default
+
+
+
+
+ mode
+¶
+
+ str
+
+
+
+ The mode to remove. It can't be the active mode.
+
+
+
+ required
+
+
+
+
+
+
+Raises:
+
+
-
- UnknownModeError
-
- If trying to remove an unknown mode.
+ Type
+ Description
-
-
+
+
+
+
+ ActiveModeError
+
+
+
+ If trying to remove the active mode.
+
+
+
+
+
+ UnknownModeError
+
+
+
+ If trying to remove an unknown mode.
+
+
+
+
+
-
+
-
- render
+
render
¶
-render()
+
-
-
- Render method, inherited from widget, to render the screen's background.
+
+
+ Render method, inherited from widget, to render the screen's background.
May be overridden to customize background visuals.
-
+
-
- run
+
run
¶
-run(
+run(
*,
- headless=False,
- inline=False,
- inline_no_clear=False,
- mouse=True,
- size=None,
- auto_pilot=None
+ headless=False,
+ inline=False,
+ inline_no_clear=False,
+ mouse=True,
+ size=None,
+ auto_pilot=None
)
-
-
- Run the app.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- headless
-
- bool
-
- Run in headless mode (no output).
-
- False
-
-
-
- inline
-
- bool
-
- Run the app inline (under the prompt).
-
- False
-
-
-
- inline_no_clear
-
- bool
-
- Don't clear the app output when exiting an inline app.
-
- False
-
-
-
- mouse
-
- bool
-
- Enable mouse support.
-
- True
-
-
-
- size
-
- tuple[int, int] | None
-
- Force terminal size to (WIDTH, HEIGHT)
,
-or None to auto-detect.
-
- None
-
-
+ Run the app.
+
+
+Parameters:
+
+
- auto_pilot
-
- AutopilotCallbackType | None
-
- An auto pilot coroutine.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ headless
+¶
+
+ bool
+
+
+
+ Run in headless mode (no output).
+
+
+
+ False
+
+
+
+
+ inline
+¶
+
+ bool
+
+
+
+ Run the app inline (under the prompt).
+
+
+
+ False
+
+
+
+
+ inline_no_clear
+¶
+
+ bool
+
+
+
+ Don't clear the app output when exiting an inline app.
+
+
+
+ False
+
+
+
+
+ mouse
+¶
+
+ bool
+
+
+
+ Enable mouse support.
+
+
+
+ True
+
+
+
+
+ size
+¶
+
+ tuple[int, int] | None
+
+
+
+ Force terminal size to (WIDTH, HEIGHT)
,
+or None to auto-detect.
+
+
+
+ None
+
+
+
+
+ auto_pilot
+¶
+
+ AutopilotCallbackType | None
+
+
+
+ An auto pilot coroutine.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- ReturnType | None
-
- App return value.
+ Type
+ Description
-
-
+
+
+
+
+ ReturnType | None
+
+
+
+ App return value.
+
+
+
+
+
-
+
-
- run_action
+
run_action
+
-
async
¶
-run_action(action, default_namespace=None)
+run_action(action, default_namespace=None)
-
-
- Perform an action.
+
+
+ Perform an action.
Actions are typically associated with key bindings, where you wouldn't need to call this method manually.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- action
-
- str | ActionParseResult
-
- Action encoded in a string.
-
- required
-
-
+
+Parameters:
+
+
- default_namespace
-
- DOMNode | None
-
- Namespace to use if not provided in the action,
-or None to use app.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ action
+¶
+
+ str | ActionParseResult
+
+
+
+ Action encoded in a string.
+
+
+
+ required
+
+
+
+
+ default_namespace
+¶
+
+ DOMNode | None
+
+
+
+ Namespace to use if not provided in the action,
+or None to use app.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- bool
-
- True if the event has been handled.
+ Type
+ Description
-
-
+
+
+
+
+ bool
+
+
+
+ True if the event has been handled.
+
+
+
+
+
-
+
-
- run_async
+
run_async
+
-
async
¶
-run_async(
+run_async(
*,
- headless=False,
- inline=False,
- inline_no_clear=False,
- mouse=True,
- size=None,
- auto_pilot=None
+ headless=False,
+ inline=False,
+ inline_no_clear=False,
+ mouse=True,
+ size=None,
+ auto_pilot=None
)
-
-
- Run the app asynchronously.
+
+
+ Run the app asynchronously.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- headless
-
- bool
-
- Run in headless mode (no output).
-
- False
-
-
-
- inline
-
- bool
-
- Run the app inline (under the prompt).
-
- False
-
-
-
- inline_no_clear
-
- bool
-
- Don't clear the app output when exiting an inline app.
-
- False
-
-
-
- mouse
-
- bool
-
- Enable mouse support.
-
- True
-
-
-
- size
-
- tuple[int, int] | None
-
- Force terminal size to (WIDTH, HEIGHT)
,
-or None to auto-detect.
-
- None
-
-
+
+Parameters:
+
+
- auto_pilot
-
- AutopilotCallbackType | None
-
- An autopilot coroutine.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ headless
+¶
+
+ bool
+
+
+
+ Run in headless mode (no output).
+
+
+
+ False
+
+
+
+
+ inline
+¶
+
+ bool
+
+
+
+ Run the app inline (under the prompt).
+
+
+
+ False
+
+
+
+
+ inline_no_clear
+¶
+
+ bool
+
+
+
+ Don't clear the app output when exiting an inline app.
+
+
+
+ False
+
+
+
+
+ mouse
+¶
+
+ bool
+
+
+
+ Enable mouse support.
+
+
+
+ True
+
+
+
+
+ size
+¶
+
+ tuple[int, int] | None
+
+
+
+ Force terminal size to (WIDTH, HEIGHT)
,
+or None to auto-detect.
+
+
+
+ None
+
+
+
+
+ auto_pilot
+¶
+
+ AutopilotCallbackType | None
+
+
+
+ An autopilot coroutine.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- ReturnType | None
-
- App return value.
+ Type
+ Description
-
-
+
+
+
+
+ ReturnType | None
+
+
+
+ App return value.
+
+
+
+
+
-
+
-
- run_test
+
run_test
+
-
async
¶
-run_test(
+run_test(
*,
- headless=True,
- size=(80, 24),
- tooltips=False,
- notifications=False,
- message_hook=None
+ headless=True,
+ size=(80, 24),
+ tooltips=False,
+ notifications=False,
+ message_hook=None
)
-
-
- An asynchronous context manager for testing apps.
+
+
+ An asynchronous context manager for testing apps.
Tip
See the guide for testing Textual apps.
Use this to run your app in "headless" mode (no output) and drive the app via a Pilot object.
-
-
- Example
- async with app.run_test() as pilot:
- await pilot.click("#Button.ok")
- assert ...
+Example:
+```python
+async with app.run_test() as pilot:
+ await pilot.click("#Button.ok")
+ assert ...
+```
-
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- headless
-
- bool
-
- Run in headless mode (no output or input).
-
- True
-
-
-
- size
-
- tuple[int, int] | None
-
- Force terminal size to (WIDTH, HEIGHT)
,
-or None to auto-detect.
-
- (80, 24)
-
-
-
- tooltips
-
- bool
-
- Enable tooltips when testing.
-
- False
-
-
-
- notifications
-
- bool
-
- Enable notifications when testing.
-
- False
-
-
+
+
+Parameters:
+
+
- message_hook
-
- Callable[[Message], None] | None
-
- An optional callback that will be called each time any message arrives at any
-message pump in the app.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ headless
+¶
+
+ bool
+
+
+
+ Run in headless mode (no output or input).
+
+
+
+ True
+
+
+
+
+ size
+¶
+
+ tuple[int, int] | None
+
+
+
+ Force terminal size to (WIDTH, HEIGHT)
,
+or None to auto-detect.
+
+
+
+ (80, 24)
+
+
+
+
+ tooltips
+¶
+
+ bool
+
+
+
+ Enable tooltips when testing.
+
+
+
+ False
+
+
+
+
+ notifications
+¶
+
+ bool
+
+
+
+ Enable notifications when testing.
+
+
+
+ False
+
+
+
+
+ message_hook
+¶
+
+ Callable[[Message], None] | None
+
+
+
+ An optional callback that will be called each time any message arrives at any
+message pump in the app.
+
+
+
+ None
+
+
+
+
-
+
-
- save_screenshot
+
save_screenshot
¶
-save_screenshot(filename=None, path=None, time_format=None)
+save_screenshot(filename=None, path=None, time_format=None)
-
-
- Save an SVG screenshot of the current screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- filename
-
- str | None
-
- Filename of SVG screenshot, or None to auto-generate
-a filename with the date and time.
-
- None
-
-
-
- path
-
- str | None
-
- Path to directory for output. Defaults to current working directory.
-
- None
-
-
+ Save an SVG screenshot of the current screen.
+
+
+Parameters:
+
+
- time_format
-
- str | None
-
- Date and time format to use if filename is None.
-Defaults to a format like ISO 8601 with some reserved characters replaced with underscores.
-
- None
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ filename
+¶
+
+ str | None
+
+
+
+ Filename of SVG screenshot, or None to auto-generate
+a filename with the date and time.
+
+
+
+ None
+
+
+
+
+ path
+¶
+
+ str | None
+
+
+
+ Path to directory for output. Defaults to current working directory.
+
+
+
+ None
+
+
+
+
+ time_format
+¶
+
+ str | None
+
+
+
+ Date and time format to use if filename is None.
+Defaults to a format like ISO 8601 with some reserved characters replaced with underscores.
+
+
+
+ None
+
+
+
+
+
+
+ Returns:
+
+
-
- str
-
- Filename of screenshot.
+ Type
+ Description
-
-
+
+
+
+
+ str
+
+
+
+ Filename of screenshot.
+
+
+
+
+
-
+
-
- set_focus
+
set_focus
¶
-set_focus(widget, scroll_visible=True)
+set_focus(widget, scroll_visible=True)
-
-
- Focus (or unfocus) a widget. A focused widget will receive key events first.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- widget
-
- Widget | None
-
- Widget to focus.
-
- required
-
-
+ Focus (or unfocus) a widget. A focused widget will receive key events first.
+
+
+Parameters:
+
+
- scroll_visible
-
- bool
-
- Scroll widget in to view.
-
- True
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ widget
+¶
+
+ Widget | None
+
+
+
+ Widget to focus.
+
+
+
+ required
+
+
+
+
+ scroll_visible
+¶
+
+ bool
+
+
+
+ Scroll widget in to view.
+
+
+
+ True
+
+
+
+
-
+
-
- simulate_key
+
simulate_key
¶
-simulate_key(key)
+simulate_key(key)
-
-
- Simulate a key press.
+
+
+ Simulate a key press.
This will perform the same action as if the user had pressed the key.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- key
-
- str
-
- Key to simulate. May also be the name of a key, e.g. "space".
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ key
+¶
+
+ str
+
+
+
+ Key to simulate. May also be the name of a key, e.g. "space".
+
+
+
+ required
+
+
+
+
-
+
-
- stop_animation
+
stop_animation
+
-
async
¶
-stop_animation(attribute, complete=True)
+
-
-
- Stop an animation on an attribute.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
-
- attribute
-
- str
-
- Name of the attribute whose animation should be stopped.
-
- required
-
-
+ Stop an animation on an attribute.
+
+
+Parameters:
+
+
- complete
-
- bool
-
- Should the animation be set to its final value?
-
- True
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ attribute
+¶
+
+ str
+
+
+
+ Name of the attribute whose animation should be stopped.
+
+
+
+ required
+
+
+
+
+ complete
+¶
+
+ bool
+
+
+
+ Should the animation be set to its final value?
+
+
+
+ True
+
+
+
+
+
Note
If there is no animation scheduled or running, this is a no-op.
-
+
-
- suspend
+
suspend
¶
-suspend()
+
-
-
- A context manager that temporarily suspends the app.
+
+
+ A context manager that temporarily suspends the app.
While inside the with
block, the app will stop reading input and
emitting output. Other applications will have full control of the
terminal, configured as it was before the app started running. When
the with
block ends, the application will start reading input and
emitting output again.
+
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+Raises:
+
+
-
- SuspendNotSupported
-
- If the environment doesn't support suspending.
+ Type
+ Description
-
-
-
+
+
+
+
+ SuspendNotSupported
+
+
+
+ If the environment doesn't support suspending.
+
+
+
+
+
+
Note
Suspending the application is currently only supported on
Unix-like operating systems and Microsoft Windows. Suspending is
not supported in Textual Web.
-
+
-
- switch_mode
+
switch_mode
¶
-switch_mode(mode)
+switch_mode(mode)
-
-
- Switch to a given mode.
+
+
+ Switch to a given mode.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- mode
-
- str
-
- The mode to switch to.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ mode
+¶
+
+ str
+
+
+
+ The mode to switch to.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- AwaitMount
-
- An optionally awaitable object which waits for the screen associated
-with the mode to be mounted.
+ Type
+ Description
-
-
-
- Raises:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ AwaitMount
+
+
+
+ An optionally awaitable object which waits for the screen associated
+with the mode to be mounted.
+
+
+
+
+
+
+
+Raises:
+
+
-
- UnknownModeError
-
- If trying to switch to an unknown mode.
+ Type
+ Description
-
-
+
+
+
+
+ UnknownModeError
+
+
+
+ If trying to switch to an unknown mode.
+
+
+
+
+
-
+
-
- switch_screen
+
switch_screen
¶
-switch_screen(screen)
+switch_screen(screen)
-
-
- Switch to another screen by replacing the top of the screen stack with a new screen.
+
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+ Switch to another screen by replacing the top of the screen stack with a new screen.
+
+
+Parameters:
+
+
- screen
-
- Screen | str
-
- Either a Screen object or screen name (the name
argument when installed).
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ screen
+¶
+
+ Screen | str
+
+
+
+ Either a Screen object or screen name (the name
argument when installed).
+
+
+
+ required
+
+
+
+
-
+
-
- uninstall_screen
+
uninstall_screen
¶
-uninstall_screen(screen)
+uninstall_screen(screen)
-
-
- Uninstall a screen.
+
+
+ Uninstall a screen.
If the screen was not previously installed, then this method is a null-op.
Uninstalling a screen allows Textual to delete it when it is popped or switched.
Note that uninstalling a screen is only required if you have previously installed it
with install_screen.
Textual will also uninstall screens automatically on exit.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- screen
-
- Screen | str
-
- The screen to uninstall or the name of an installed screen.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
-
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+
+
+
+ screen
+¶
+
+ Screen | str
+
+
+
+ The screen to uninstall or the name of an installed screen.
+
+
+
+ required
+
+
+
+
+
+
+ Returns:
+
+
-
- str | None
-
- The name of the screen that was uninstalled, or None if no screen was uninstalled.
+ Type
+ Description
-
-
+
+
+
+
+ str | None
+
+
+
+ The name of the screen that was uninstalled, or None if no screen was uninstalled.
+
+
+
+
+
-
+
-
- update_styles
+
update_styles
¶
-update_styles(node)
+
-
-
- Immediately update the styles of this node and all descendant nodes.
+
+
+ Immediately update the styles of this node and all descendant nodes.
Should be called whenever CSS classes / pseudo classes change.
For example, when you hover over a button, the :hover pseudo class
will be added, and this method is called to apply the corresponding
:hover styles.
-
+
-
- validate_sub_title
+
validate_sub_title
¶
-validate_sub_title(sub_title)
+
-
-
- Make sure the subtitle is set to a string.
+
-
+ Make sure the subtitle is set to a string.
+
+
-
- validate_title
+
validate_title
¶
-
-
+
@@ -15692,22 +19708,27 @@
- AppError
+
AppError
¶
-
@@ -15716,22 +19737,27 @@
- InvalidModeError
+
InvalidModeError
¶
-
@@ -15740,22 +19766,27 @@
- ModeError
+
ModeError
¶
-
@@ -15764,22 +19795,27 @@
- ScreenError
+
ScreenError
¶
-
@@ -15788,22 +19824,27 @@
- ScreenStackError
+
ScreenStackError
¶
-
-
- Bases: ScreenError
+
+
+ Bases: ScreenError
-
- Raised when trying to manipulate the screen stack incorrectly.
+ Raised when trying to manipulate the screen stack incorrectly.
-
+
+
+
+
+
+
+
@@ -15812,24 +19853,29 @@
- SuspendNotSupported
+
SuspendNotSupported
¶
-
-
- Bases: Exception
+
+
+ Bases: Exception
-
- Raised if suspending the application is not supported.
+
+
+ Raised if suspending the application is not supported.
This exception is raised if App.suspend
is called while
the application is running in an environment where this isn't supported.
-
+
+
+
+
+
@@ -15838,22 +19884,27 @@
- SystemCommand
+
SystemCommand
¶
-
-
- Bases: NamedTuple
+
+
+ Bases: NamedTuple
+
+
+
+ Defines a system command used in the command palette (yielded from get_system_commands
).
+
+
+
+
-
- Defines a system command used in the command palette (yielded from get_system_commands
).
-
@@ -15868,21 +19919,21 @@
- callback
+
callback
+
-
instance-attribute
¶
-callback: CommandCallback
+
-
-
- A callback to invoke when the command is selected.
-
+
+
+ A callback to invoke when the command is selected.
+
@@ -15891,22 +19942,22 @@
- discover
+
discover
+
-
- instance-attribute
class-attribute
+ instance-attribute
¶
-discover: bool = True
+
-
-
- Should the command show when the search is empty?
-
+
+
+ Should the command show when the search is empty?
+
@@ -15915,21 +19966,21 @@
- help
+
help
+
-
instance-attribute
¶
-help: str
+
-
-
- Additional help text, shown under the title.
-
+
+
+ Additional help text, shown under the title.
+
@@ -15938,21 +19989,21 @@
- title
+
title
+
-
instance-attribute
¶
-title: str
+
-
-
- The title of the command (used in search).
-
+
+
+ The title of the command (used in search).
+
@@ -15962,7 +20013,7 @@
-
+
@@ -15971,22 +20022,27 @@
- UnknownModeError
+
UnknownModeError
¶
-
@@ -15994,38 +20050,42 @@
-
- get_system_commands_provider
+
get_system_commands_provider
¶
-get_system_commands_provider()
+
-
-
- Callable to lazy load the system commands.
+
+
+ Callable to lazy load the system commands.
- Returns:
-
-
-
- Type
- Description
-
-
-
+
+ Returns:
+
+
-
- type[SystemCommandsProvider]
-
- System commands class.
+ Type
+ Description
-
-
+
+
+
+
+ type[SystemCommandsProvider]
+
+
+
+ System commands class.
+
+
+
+
+
-
+
@@ -16033,7 +20093,7 @@
-
+
diff --git a/api/await_complete/index.html b/api/await_complete/index.html
index 90ec47ab69..4d7ca60e7f 100644
--- a/api/await_complete/index.html
+++ b/api/await_complete/index.html
@@ -4975,7 +4975,7 @@
-
- textual.await_complete
+
await_complete
@@ -4984,17 +4984,26 @@
-
- AwaitComplete
+
AwaitComplete
-
+
+ -
+
+
+
awaitables
+
+
+
+
+
-
- exception
+
exception
@@ -5003,7 +5012,7 @@
-
- is_done
+
is_done
@@ -5012,16 +5021,31 @@
-
- call_next()
+
call_next
+
+
+
+ -
+
+
+
node
+
+
+
+
+
+
+
+
-
- nothing()
+
nothing
@@ -5030,10 +5054,25 @@
-
- set_pre_await_callback()
+
set_pre_await_callback
+
+
+
+ -
+
+
+
pre_await
+
+
+
+
+
+
+
+
@@ -6451,7 +6490,7 @@
-
- textual.await_complete
+
await_complete
@@ -6460,17 +6499,26 @@
-
- AwaitComplete
+
AwaitComplete
-
+
+ -
+
+
+
awaitables
+
+
+
+
+
-
- exception
+
exception
@@ -6479,7 +6527,7 @@
-
- is_done
+
is_done
@@ -6488,16 +6536,31 @@
-
- call_next()
+
call_next
+
+
+
+
+
+
+ -
+
+
+
node
+
+
+
+
+
-
- nothing()
+
nothing
@@ -6506,10 +6569,25 @@
-
- set_pre_await_callback()
+
set_pre_await_callback
+
+
+
+ -
+
+
+
pre_await
+
+
+
+
+
+
+
+
@@ -6550,10 +6628,16 @@ textual.await_complete
+
-
+
+
+
+
+
+
+
-
@@ -6569,46 +6653,58 @@ textual.await_complete
- AwaitComplete
+
AwaitComplete
¶
-AwaitComplete(*awaitables, pre_await=None)
+
-
+
+
+
+
+ An 'optionally-awaitable' object which runs one or more coroutines (or other awaitables) concurrently.
-
- An 'optionally-awaitable' object which runs one or more coroutines (or other awaitables) concurrently.
-
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+Parameters:
+
+
- awaitables
-
- Awaitable
-
- One or more awaitables to run concurrently.
-
- ()
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ awaitables
+¶
+
+ Awaitable
+
+
+
+ One or more awaitables to run concurrently.
+
+
+
+ ()
+
+
+
+
+
+
+
+
+
+
-
@@ -6623,21 +6719,21 @@
- exception
+
exception
+
-
property
¶
-exception: BaseException | None
+
-
-
- An exception if the awaitables failed.
-
+
+
+ An exception if the awaitables failed.
+
@@ -6646,21 +6742,21 @@
- is_done
+
is_done
+
-
property
¶
-
@@ -6669,114 +6765,125 @@
-
- call_next
+
call_next
¶
-call_next(node)
+call_next(node)
-
-
- Await after the next message.
-
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+
+ Await after the next message.
+
+
+Parameters:
+
+
- node
-
- MessagePump
-
- The node which created the object.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ node
+¶
+
+ MessagePump
+
+
+
+ The node which created the object.
+
+
+
+ required
+
+
+
+
-
+
-
- nothing
+
nothing
+
-
classmethod
¶
-nothing()
+
-
-
- Returns an already completed instance of AwaitComplete.
+
-
+ Returns an already completed instance of AwaitComplete.
+
+
-
- set_pre_await_callback
+
set_pre_await_callback
¶
-set_pre_await_callback(pre_await)
+set_pre_await_callback(pre_await)
-
-
- Set a callback to run prior to awaiting.
+
+
+ Set a callback to run prior to awaiting.
This is used by Textual, mainly to check for possible deadlocks.
You are unlikely to need to call this method in an app.
- Parameters:
-
-
-
- Name
- Type
- Description
- Default
-
-
-
+
+Parameters:
+
+
- pre_await
-
- CallbackType | None
-
- A callback.
-
- required
-
+ Name
+ Type
+ Description
+ Default
-
-
+
+
+
+
+ pre_await
+¶
+
+ CallbackType | None
+
+
+
+ A callback.
+
+
+
+ required
+
+
+
+
-
+
@@ -6784,7 +6891,7 @@
- textual.await_remove
+
await_remove
@@ -5005,7 +5005,7 @@
-
- AwaitRemove
+
AwaitRemove
@@ -6400,7 +6400,7 @@
-
- textual.await_remove
+
await_remove
@@ -6409,7 +6409,7 @@
-
- AwaitRemove
+
AwaitRemove
@@ -6448,12 +6448,18 @@ textual.await_remove
+
-
-
- An optionally awaitable object returned by methods that remove widgets.
+
+
+ An optionally awaitable object returned by methods that remove widgets.
+
+
+
+
+
+
-
@@ -6469,21 +6475,26 @@ textual.await_remove
- AwaitRemove
+
AwaitRemove
¶
-AwaitRemove(tasks, post_remove=None)
+
-
+
+
+
+
+ An awaitable that waits for nodes to be removed.
+
+
+
+
-
- An awaitable that waits for nodes to be removed.
-
@@ -6499,7 +6510,7 @@
-
+
@@ -6508,7 +6519,7 @@
-
+
diff --git a/api/binding/index.html b/api/binding/index.html
index c33d4de785..fa54c7e41c 100644
--- a/api/binding/index.html
+++ b/api/binding/index.html
@@ -5017,7 +5017,7 @@
-
- textual.binding
+
binding
@@ -5026,17 +5026,17 @@
-
- ActiveBinding
+
ActiveBinding
-
+
-
- binding
+
binding
@@ -5045,7 +5045,7 @@
-
- enabled
+
enabled
@@ -5054,7 +5054,7 @@
-
- node
+
node
@@ -5063,7 +5063,7 @@
-
- tooltip
+
tooltip
@@ -5077,17 +5077,17 @@
-
- Binding
+
Binding
-
+
-
- action
+
action
@@ -5096,7 +5096,7 @@
-
- description
+
description
@@ -5105,7 +5105,7 @@
-
- key
+
key
@@ -5114,7 +5114,7 @@
-
- key_display
+
key_display
@@ -5123,7 +5123,7 @@
-
- priority
+
priority
@@ -5132,7 +5132,7 @@
-
- show
+
show
@@ -5141,7 +5141,7 @@
-
- tooltip
+
tooltip
@@ -5150,7 +5150,7 @@
-
- parse_key()
+
parse_key
@@ -5164,7 +5164,7 @@
-
- BindingError
+
BindingError
@@ -5173,17 +5173,26 @@
-
- BindingsMap
+
BindingsMap
-
+
+ -
+
+
+
bindings
+
+
+
+
+
-
- shown_keys
+
shown_keys
@@ -5192,16 +5201,76 @@
-
- bind()
+
bind
+
+
+
+
+
+
+ -
+
+
+
keys
+
+
+ -
+
+
+
action
+
+
+
+
+
+ -
+
+
+
description
+
+
+
+
+
+ -
+
+
+
show
+
+
+
+
+
+ -
+
+
+
key_display
+
+
+
+
+
+ -
+
+
+
priority
+
+
+
+
+
+
+
+
-
- copy()
+
copy
@@ -5210,25 +5279,65 @@
-
- from_keys()
+
from_keys
+
+
+
+ -
+
+
+
keys
+
+
+
+
+
+
+
+
-
- get_bindings_for_key()
+
get_bindings_for_key
+
+
+
+
+
+
+ -
+
+
+
key
+
+
+
+
+
-
- merge()
+
merge
+
+
+
+
+
+
+ -
+
+
+
bindings
@@ -5237,12 +5346,17 @@
+
+
+
+
+
-
- InvalidBinding
+
InvalidBinding
@@ -5251,7 +5365,7 @@
-
- NoBinding
+
NoBinding
@@ -6625,7 +6739,7 @@
-
- textual.binding
+
binding
@@ -6634,17 +6748,17 @@
-
- ActiveBinding
+
ActiveBinding
-
+
-
- binding
+
binding
@@ -6653,7 +6767,7 @@
-
- enabled
+
enabled
@@ -6662,7 +6776,7 @@
-
- node
+
node
@@ -6671,7 +6785,7 @@
-
- tooltip
+
tooltip
@@ -6685,17 +6799,17 @@
-
- Binding
+
Binding
-
+
-
- action
+
action
@@ -6704,7 +6818,7 @@
-
- description
+
description
@@ -6713,7 +6827,7 @@
-
- key
+
key
@@ -6722,7 +6836,7 @@
-
- key_display
+
key_display
@@ -6731,7 +6845,7 @@
-
- priority
+
priority
@@ -6740,7 +6854,7 @@
-
- show
+
show
@@ -6749,7 +6863,7 @@
-
- tooltip
+
tooltip
@@ -6758,7 +6872,7 @@
-
- parse_key()
+
parse_key
@@ -6772,7 +6886,7 @@
-
- BindingError
+
BindingError
@@ -6781,17 +6895,26 @@
-
- BindingsMap
+
BindingsMap
-
+
+ -
+
+
+
bindings
+
+
+
+
+
-
- shown_keys
+
shown_keys
@@ -6800,16 +6923,76 @@
-
- bind()
+
bind
+
+
+
+
+
+
+ -
+
+
+