class documentation

class ACMETuiApp(App):

Constructor: ACMETuiApp()

View In Hierarchy

A Textual app to manage the ACME text UI.

Method __init__ Initialize the app.
Async Method action_quit_acme Quit the ACME.
Async Method action_quit_restart_tui Restart the TUI.
Async Method action_quit_tui Quit the TUI.
Method cleanUp Clean up the UI before exiting.
Method compose Build the Main UI.
Method copyToClipboard Copy text to the clipboard.
Method logDebug Print debug msg.
Method on_load Called when the app is loaded.
Method pasteFromClipboard Paste text from the clipboard.
Method refreshResources Refresh the resource tree.
Method restart Quit the TUI with an indication to restart the TUI.
Method runAsyncTask Run an async task from a non-async function.
Method scriptClearConsole Clear the console of a script.
Method scriptLog Log a message from a script.
Method scriptLogError Log an error message from a script.
Method scriptPrint Print a message from a script.
Method scriptVisualBell Show a visual bell from a script.
Method showConfirmation Show a confirmation dialog.
Method showNotification Show a notification.
Method tabChanged Called when a tab is activated.
Async Method updateFooter Hack to update the footer.
Constant BINDINGS The key bindings for the app.
Constant CSS_PATH The path to the app's CSS file.
Constant ENABLE_COMMAND_PALETTE Flag to enable the command palette. Inherited from the parent class.
Class Variable validator Injected Validator instance.
Instance Variable attributeExplanations The attribute explanations dictionary.
Instance Variable currentTab 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_loop 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 objectColor The color of the objects.
Instance Variable quitReason The reason for quitting the TUI.
Instance Variable syntaxTheme The syntax theme. Inherited from the parent class.
Property containerConfigs Return the configurations view.
Property containerInfo Return the info view.
Property containerRegistrations Return the registrations view.
Property containerRequests Return the requests view.
Property containerTools Return the tools view.
Property containerTree Return the tree view.
Property debugConsole Return the debug console.
Property tabs Return the tabbed content.
Instance Variable _colors The CSS variables.
Instance Variable _containerConfigurations The configurations view.
Instance Variable _containerInfo The info view.
Instance Variable _containerRegistrations The registrations view.
Instance Variable _containerRequests The requests view.
Instance Variable _containerTree The tree view.
Instance Variable _debugConsole The debug console.
Instance Variable _tabs The tabbed content.
Instance Variable _toolsView The tools view.
def __init__(self):

Initialize the app.

async def action_quit_acme(self):

Quit the ACME.

async def action_quit_restart_tui(self):

Restart the TUI.

async def action_quit_tui(self):

Quit the TUI.

def cleanUp(self):

Clean up the UI before exiting.

def compose(self) -> ComposeResult:

Build the Main UI.

Yields
The UI views.
def copyToClipboard(self, text: str) -> bool:

Copy text to the clipboard.

Parameters
text:strThe text to copy.
Returns
boolTrue if the text was copied successfully, False otherwise.
def logDebug(self, msg: str):

Print debug msg.

Parameters
msg:strThe message to print.
def on_load(self):

Called when the app is loaded.

def pasteFromClipboard(self) -> str:

Paste text from the clipboard.

Returns
strThe pasted text or None if an error occurred.
def refreshResources(self):

Refresh the resource tree.

def restart(self):

Quit the TUI with an indication to restart the TUI.

def runAsyncTask(self, task: Callable) -> asyncio.Task | None:

Run an async task from a non-async function.

Parameters
task:CallableThe async task to run.
Returns
asyncio.Task | NoneUndocumented
def scriptClearConsole(self, scriptName: str):

Clear the console of a script.

Parameters
scriptName:strThe name of the script.
def scriptLog(self, scriptName: str, msg: str):

Log a message from a script.

Parameters
scriptName:strThe name of the script.
msg:strThe message to log.
def scriptLogError(self, scriptName: str, msg: str):

Log an error message from a script.

Parameters
scriptName:strThe name of the script.
msg:strThe message to log.
def scriptPrint(self, scriptName: str, msg: str):

Print a message from a script.

Parameters
scriptName:strThe name of the script.
msg:strThe message to print.
def scriptVisualBell(self, scriptName: str):

Show a visual bell from a script.

Parameters
scriptName:strThe name of the script.
def showConfirmation(self, msg: str, title: str, confirmButtonText: str | None = 'Confirm', cancelButtonText: str | None = 'Cancel') -> bool | None:

Show a confirmation dialog.

Parameters
msg:strThe message to show.
title:strThe title of the dialog.
confirmButtonText:str | NoneThe text for the confirm button.
cancelButtonText:str | NoneThe text for the cancel button.
Returns
bool | NoneTrue 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:strThe message to show.
title:strThe title of the notification.
severity:Literal['information', 'warning', 'error']The severity of the notification. Must be one of 'information', 'warning', or 'error'.
timeout:float | NoneThe timeout of the notification in seconds. If None, the default timeout is used.
@on(TabbedContent.TabActivated)
def tabChanged(self, tab: TabbedContent.TabActivated):

Called when a tab is activated.

Parameters
tab:TabbedContent.TabActivatedThe activated tab.
async def updateFooter(self):

Hack to update the footer.

BINDINGS =

The key bindings for the app.

Value
[Binding('#', 'quit_tui', 'Console'),
 Binding('Q', 'quit_acme', 'Quit ACME',
         key_display='SHIFT-Q')]
CSS_PATH: str =

The path to the app's CSS file.

Value
'ACMETUI.tcss'
ENABLE_COMMAND_PALETTE: bool =

Flag to enable the command palette. Inherited from the parent class.

Value
False
validator: Validator =

Injected Validator instance.

attributeExplanations =

The attribute explanations dictionary.

currentTab: TabbedContent.TabActivated =

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.

dark: bool =

Flag to indicate if the theme is dark or light.

debugging: bool =

Flag to indicate if debugging is enabled.

event_loop: asyncio.AbstractEventLoop =

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.

objectColor =

The color of the objects.

quitReason =

The reason for quitting the TUI.

syntaxTheme =

The syntax theme. Inherited from the parent class.

@property
containerConfigs: ACMEContainerConfigurations =

Return the configurations view.

Returns
The configurations view.
@property
containerInfo: ACMEContainerInfo =

Return the info view.

Returns
The info view.
@property
containerRegistrations: ACMEContainerRegistrations =

Return the registrations view.

Returns
The registrations view.
@property
containerRequests: ACMEContainerRequests =

Return the requests view.

Returns
The requests view.
@property
containerTools: ACMEContainerTools =

Return the tools view.

Returns
The tools view.
@property
containerTree: ACMEContainerTree =

Return the tree view.

Returns
The tree view.
@property
debugConsole: Static =

Return the debug console.

Returns
The debug console.
@property
tabs: TabbedContent =

Return the tabbed content.

Returns
The tabbed content.
_colors =

The CSS variables.

_containerConfigurations =

The configurations view.

_containerInfo =

The info view.

_containerRegistrations =

The registrations view.

_containerRequests =

The requests view.

_containerTree =

The tree view.

_debugConsole =

The debug console.

_tabs =

The tabbed content.

_toolsView =

The tools view.