class documentation

class ACMEContentDialog(ModalScreen):

Constructor: ACMEContentDialog(content, title, buttonEnabled)

View In Hierarchy

A modal dialog for displaying content in the ACME text UI.

Method __init__ Initialize the dialog.
Method compose Compose the dialog.
Method on_button_pressed Handle the button press event.
Method on_click Dismiss the screen when clicking outside the dialog.
Constant BINDINGS Key bindings for the dialog.
Instance Variable borderTitle The title of the dialog.
Instance Variable button The copy button.
Instance Variable content The content to display.
Instance Variable _app The application.
def __init__(self, content: str, title: str | None = '', buttonEnabled: bool | None = True):

Initialize the dialog.

Parameters
content:strThe content to display.
title:str | NoneThe title of the dialog.
buttonEnabled:bool | NoneWhether the copy button is enabled.
def compose(self) -> ComposeResult:

Compose the dialog.

Yields
The dialog content.
def on_button_pressed(self, event: Button.Pressed):

Handle the button press event.

Parameters
event:Button.PressedThe button press event.
def on_click(self, event: Click):

Dismiss the screen when clicking outside the dialog.

Parameters
event:ClickThe click event.
BINDINGS: list =

Key bindings for the dialog.

Value
[('c', 'dismiss', 'Dismiss'), ('escape', 'dismiss', 'Dismiss')]
borderTitle =

The title of the dialog.

button =

The copy button.

content =

The content to display.

_app =

The application.