class documentation

class ACMEContentConfirmDialog(SystemModalScreen[bool]):

Constructor: ACMEContentConfirmDialog(content, title, confirmButtonText, cancelButtonText)

View In Hierarchy

A modal dialog for confirming actions in the ACME text UI.

Method __init__ Initialize the dialog.
Method compose Compose the dialog.
Method on_button_pressed Handle the button press event. This sets the result based on the button pressed and dismisses the dialog.
Method on_click Dismiss the screen when clicking outside the dialog. This also returns the result as None, indicating no confirmation.
Constant BINDINGS Key bindings for the dialog.
Instance Variable borderTitle The title of the dialog.
Instance Variable cancelButton The cancel button.
Instance Variable confirmButton The confirm button.
Instance Variable content The content to display.
Instance Variable result The result of the confirmation dialog.
Instance Variable _app The application.
def __init__(self, content: str, title: str | None = '', confirmButtonText: str | None = 'Confirm', cancelButtonText: str | None = 'Cancel'):

Initialize the dialog.

Parameters
content:strThe content to display.
title:str | NoneThe title of the dialog.
confirmButtonText:str | NoneThe text for the confirm button.
cancelButtonText:str | NoneThe text for the cancel button.
def compose(self) -> ComposeResult:

Compose the dialog.

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

Handle the button press event. This sets the result based on the button pressed and dismisses the dialog.

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

Dismiss the screen when clicking outside the dialog. This also returns the result as None, indicating no confirmation.

Parameters
event:ClickThe click event.
BINDINGS: list =

Key bindings for the dialog.

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

The title of the dialog.

cancelButton =

The cancel button.

confirmButton =

The confirm button.

content =

The content to display.

result: bool =

The result of the confirmation dialog.

_app =

The application.