class documentation
A Textual app to manage the ACME text UI.
| Method | __init__ |
Initialize the app. |
| Async Method | action |
Quit the ACME. |
| Async Method | action |
Restart the TUI. |
| Async Method | action |
Quit the TUI. |
| Method | clean |
Clean up the UI before exiting. |
| Method | compose |
Build the Main UI. |
| Method | copy |
Copy text to the clipboard. |
| Method | log |
Print debug msg. |
| Method | on |
Called when the app is loaded. |
| Method | paste |
Paste text from the clipboard. |
| Method | refresh |
Refresh the resource tree. |
| Method | restart |
Quit the TUI with an indication to restart the TUI. |
| Method | run |
Run an async task from a non-async function. |
| Method | script |
Clear the console of a script. |
| Method | script |
Log a message from a script. |
| Method | script |
Log an error message from a script. |
| Method | script |
Print a message from a script. |
| Method | script |
Show a visual bell from a script. |
| Method | show |
Show a confirmation dialog. |
| Method | show |
Show a notification. |
| Method | tab |
Called when a tab is activated. |
| Async Method | update |
Hack to update the footer. |
| Constant | BINDINGS |
The key bindings for the app. |
| Constant | CSS |
The path to the app's CSS file. |
| Constant | ENABLE |
Flag to enable the command palette. Inherited from the parent class. |
| Class Variable | validator |
Injected Validator instance. |
| Instance Variable | attribute |
The attribute explanations dictionary. |
| Instance Variable | current |
This is used to keep track of the current tab. This is a bit different from the actual current tab from the tabs attribute because at one point it is used to determine the previous tab. |
| Instance Variable | dark |
Flag to indicate if the theme is dark or light. |
| Instance Variable | debugging |
Flag to indicate if debugging is enabled. |
| Instance Variable | event |
The event loop. This is used to keep a pointer to the current event loop to use it for async calls from non-async functions. |
| Instance Variable | object |
The color of the objects. |
| Instance Variable | quit |
The reason for quitting the TUI. |
| Instance Variable | syntax |
The syntax theme. Inherited from the parent class. |
| Property | container |
Return the configurations view. |
| Property | container |
Return the info view. |
| Property | container |
Return the registrations view. |
| Property | container |
Return the requests view. |
| Property | container |
Return the tools view. |
| Property | container |
Return the tree view. |
| Property | debug |
Return the debug console. |
| Property | tabs |
Return the tabbed content. |
| Instance Variable | _colors |
The CSS variables. |
| Instance Variable | _container |
The configurations view. |
| Instance Variable | _container |
The info view. |
| Instance Variable | _container |
The registrations view. |
| Instance Variable | _container |
The requests view. |
| Instance Variable | _container |
The tree view. |
| Instance Variable | _debug |
The debug console. |
| Instance Variable | _tabs |
The tabbed content. |
| Instance Variable | _tools |
The tools view. |
Copy text to the clipboard.
| Parameters | |
text:str | The text to copy. |
| Returns | |
bool | True if the text was copied successfully, False otherwise. |
Run an async task from a non-async function.
| Parameters | |
task:Callable | The async task to run. |
| Returns | |
asyncio.Task | None | Undocumented |
Log a message from a script.
| Parameters | |
scriptstr | The name of the script. |
msg:str | The message to log. |
Log an error message from a script.
| Parameters | |
scriptstr | The name of the script. |
msg:str | The message to log. |
Print a message from a script.
| Parameters | |
scriptstr | The name of the script. |
msg:str | The message to print. |
def showConfirmation(self, msg:
str, title: str, confirmButtonText: str | None = 'Confirm', cancelButtonText: str | None = 'Cancel') -> bool | None:
¶
Show a confirmation dialog.
| Parameters | |
msg:str | The message to show. |
title:str | The title of the dialog. |
confirmstr | None | The text for the confirm button. |
cancelstr | None | The text for the cancel button. |
| Returns | |
bool | None | True if the user confirmed, False if the user cancelled, or None the user cancelled or an error occurred. |
def showNotification(self, message:
str, title: str, severity: Literal[ 'information', 'warning', 'error'], timeout: float | None = None):
¶
Show a notification.
| Parameters | |
message:str | The message to show. |
title:str | The title of the notification. |
severity:Literal[ | The severity of the notification. Must be one of 'information', 'warning', or 'error'. |
timeout:float | None | The timeout of the notification in seconds. If None, the default timeout is used. |
BINDINGS =
¶
The key bindings for the app.
| Value |
|
This is used to keep track of the current tab.
This is a bit different from the actual current tab from the tabs
attribute because at one point it is used to determine the previous tab.
The event loop. This is used to keep a pointer to the current event loop to use it for async calls from non-async functions.
This is set in the on_load() function.