Dialog

external interface Dialog(source)

Functions

Link copied to clipboard
abstract fun showCertificateTrustDialog(options: CertificateTrustDialogOptions): <Error class: unknown class><<Error class: unknown class>>
abstract fun showCertificateTrustDialog(    window: BaseWindow,     options: CertificateTrustDialogOptions): <Error class: unknown class><<Error class: unknown class>>

resolves when the certificate trust dialog is shown.

Link copied to clipboard
abstract fun showErrorBox(title: String, content: String)

Displays a modal dialog that shows an error message.

Link copied to clipboard
abstract fun showMessageBox(options: MessageBoxOptions): <Error class: unknown class><MessageBoxReturnValue>
abstract fun showMessageBox(window: BaseWindow, options: MessageBoxOptions): <Error class: unknown class><MessageBoxReturnValue>

resolves with a promise containing the following properties:

Link copied to clipboard

the index of the clicked button.

Link copied to clipboard
abstract fun showOpenDialog(options: OpenDialogOptions): <Error class: unknown class><OpenDialogReturnValue>
abstract fun showOpenDialog(window: BaseWindow, options: OpenDialogOptions): <Error class: unknown class><OpenDialogReturnValue>

Resolve with an object containing the following:

Link copied to clipboard
abstract fun showOpenDialogSync(options: OpenDialogSyncOptions): <Error class: unknown class><String>?
abstract fun showOpenDialogSync(window: BaseWindow, options: OpenDialogSyncOptions): <Error class: unknown class><String>?

the file paths chosen by the user; if the dialog is cancelled it returns undefined.

Link copied to clipboard
abstract fun showSaveDialog(options: SaveDialogOptions): <Error class: unknown class><SaveDialogReturnValue>
abstract fun showSaveDialog(window: BaseWindow, options: SaveDialogOptions): <Error class: unknown class><SaveDialogReturnValue>

Resolve with an object containing the following:

Link copied to clipboard

the path of the file chosen by the user; if the dialog is cancelled it returns an empty string.