public cancel() as Void:
Cancels the dialog, emits cancelled, and closes it.
cancelled
dialog.cancel()