public class Dialog extends Widget:
Base modal dialog.
Dialog actions use the same event model as other GUI widgets: subscribe with +=, unsubscribe with -=, and let accept() or cancel() emit a typed ActionEvent.
dialog = ConfirmDialog(Terminal.instance, "Confirm", "Continue?")
dialog.accepted += lambda(event: ActionEvent): print("accepted")
dialog.cancelled += lambda(event: ActionEvent): print("cancelled")
dialog.show()| Modifier and Type | Member | Description |
|---|---|---|
| public | terminalterminal as Terminal = null |
No summary. |
| public | titletitle as String = "" |
No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public event | acceptedaccepted as ActionEvent |
Emitted when the dialog is accepted. |
| public event | cancelledcancelled as ActionEvent |
Emitted when the dialog is cancelled. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Dialog | No summary. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | acceptaccept() as Void: |
Accepts the dialog, emits accepted, and closes it. |
| public | cancelcancel() as Void: |
Cancels the dialog, emits cancelled, and closes it. |
| public | closeclose() as Void: |
No summary. |
| public | showshow() as Void: |
No summary. |