class documentation

class ACMEContainerTools(Horizontal):

Constructor: ACMEContainerTools(*args, **kwargs)

View In Hierarchy

The container for the tools and commands.

Method __init__ Initialize the container.
Method action_clear_log Clear the log view.
Method action_toggle_log Toggle the log view.
Method buttonExecute Callback for the execute button.
Method cleanUp Clean up the tools tree and stop the autorun script if any
Method compose Compose the container.
Method inputFieldSubmitted Callback for the input field.
Method leaving_tab Leaving the tab.
Method on_mount Mount the container.
Method on_show Show the tools container.
Method scriptClearConsole Clears the console for a script.
Method scriptLog Prints a log message for a script.
Method scriptLogError Prints an error message for a script.
Method scriptPrint Prints a normal message for a script.
Method scriptVisualBell Visual bell for a script. The script name in the tree will have a reverse appearance for a short time.
Method updateHeader Set the header and description of the tools view.
Constant BINDINGS The bindings for the container.
Class Variable scriptManager Injected ScriptManager instance.
Property toolsExecButton Return the execute button for the tools.
Property toolsInput Return the input field for the tools.
Property toolsLog Return the log view for the tools.
Property toolsTree Return the tools tree.
Method _logMessage Logs a message for a script.
Instance Variable _app The application.
Instance Variable _toolsArgument The input field for the tools.
Instance Variable _toolsExecuteButton The execute button for the tools.
Instance Variable _toolsHeader The header for the tools.
Instance Variable _toolsLogView The log view for the tools.
Instance Variable _toolsTopView The top view for the tools.
Instance Variable _toolsTree The tree view for the tools.
def __init__(self, *args: Any, **kwargs: Any):

Initialize the container.

Parameters
*args:AnyThe arguments.
**kwargs:AnyThe keyword arguments.
def action_clear_log(self):

Clear the log view.

def action_toggle_log(self):

Toggle the log view.

@on(Button.Pressed, '#tool-execute-button')
def buttonExecute(self):

Callback for the execute button.

def cleanUp(self):

Clean up the tools tree and stop the autorun script if any

def compose(self) -> ComposeResult:

Compose the container.

Yields
The container content.
def inputFieldSubmitted(self):

Callback for the input field.

def leaving_tab(self):

Leaving the tab.

Stop the autorun script if any.

def on_mount(self):

Mount the container.

def on_show(self):

Show the tools container.

def scriptClearConsole(self, scriptName: str):

Clears the console for a script.

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

Prints a log message for a script.

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

Prints an error message for a script.

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

Prints a normal message for a script.

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

Visual bell for a script. The script name in the tree will have a reverse appearance for a short time.

Parameters
scriptName:strThe name of the script.
def updateHeader(self, title: str, description: str | None = ''):

Set the header and description of the tools view.

Parameters
title:strThe title text.
description:str | NoneThe description text.
BINDINGS =

The bindings for the container.

Value
[Binding('C', 'clear_log', 'Clear Log',
         key_display='SHIFT+C'),
 Binding('l', 'toggle_log', 'Toggle Log')]
scriptManager: ScriptManager =

Injected ScriptManager instance.

@property
toolsExecButton: Button =

Return the execute button for the tools.

Returns
The execute button for the tools.
@property
toolsInput: ACMEInputField =

Return the input field for the tools.

Returns
The input field for the tools.
@property
toolsLog: RichLog =

Return the log view for the tools.

Returns
The log view for the tools.
@property
toolsTree: ACMEToolsTree =

Return the tools tree.

Returns
The tools tree.
def _logMessage(self, scriptName: str, msg: str, prefix: str):

Logs a message for a script.

Parameters
scriptName:strThe name of the script.
msg:strThe message to log.
prefix:strThe prefix for the message.
_app =

The application.

_toolsArgument =

The input field for the tools.

_toolsExecuteButton =

The execute button for the tools.

_toolsHeader =

The header for the tools.

_toolsLogView =

The log view for the tools.

_toolsTopView =

The top view for the tools.

_toolsTree: ACMEToolsTree =

The tree view for the tools.