class documentation
class ACMEContentConfirmDialog(SystemModalScreen[
Constructor: ACMEContentConfirmDialog(content, title, confirmButtonText, cancelButtonText)
A modal dialog for confirming actions in the ACME text UI.
| Method | __init__ |
Initialize the dialog. |
| Method | compose |
Compose the dialog. |
| Method | on |
Handle the button press event. This sets the result based on the button pressed and dismisses the dialog. |
| Method | on |
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 | border |
The title of the dialog. |
| Instance Variable | cancel |
The cancel button. |
| Instance Variable | confirm |
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:str | The content to display. |
title:str | None | The title of the dialog. |
confirmstr | None | The text for the confirm button. |
cancelstr | None | The text for the cancel button. |
Handle the button press event. This sets the result based on the button pressed and dismisses the dialog.
| Parameters | |
event:Button.Pressed | The button press event. |