Dialog

external interface Dialog(source)

Functions

Link copied to clipboard
abstract fun showCertificateTrustDialog(options: CertificateTrustDialogOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>
abstract fun showCertificateTrustDialog(window: BaseWindow, options: CertificateTrustDialogOptions): ERROR CLASS: Symbol not found for Promise<ERROR CLASS: Symbol not found for js.core.Void>

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: Symbol not found for Promise<electron/core/MessageBoxReturnValue>
abstract fun showMessageBox(window: BaseWindow, options: MessageBoxOptions): ERROR CLASS: Symbol not found for Promise<electron/core/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: Symbol not found for Promise<electron/core/OpenDialogReturnValue>
abstract fun showOpenDialog(window: BaseWindow, options: OpenDialogOptions): ERROR CLASS: Symbol not found for Promise<electron/core/OpenDialogReturnValue>

Resolve with an object containing the following:

Link copied to clipboard
abstract fun showOpenDialogSync(options: OpenDialogSyncOptions): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>??
abstract fun showOpenDialogSync(window: BaseWindow, options: OpenDialogSyncOptions): ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/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: Symbol not found for Promise<electron/core/SaveDialogReturnValue>
abstract fun showSaveDialog(window: BaseWindow, options: SaveDialogOptions): ERROR CLASS: Symbol not found for Promise<electron/core/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.