The Dialog Factory Interface
The dialog factory interface creates BrowserWindow
instances meant to be used as dialogs in Jancy.
There is only one dialog factory and it can always be found at jancy.dialogFactory
.
Methods
dialogFactory.create(parent, browserWindowOptions, options)
parent
(BrowserWindow
) the BrowserWindow that will be the parent of this dialogbrowserWindowOptions
(object
) options to override the defaults used by the factoryoptions
(object
) dialog factory specific optionscenterRelativeToParent
(boolean
) optional iftrue
the resulting dialog will be centerered relative toparent
Returns a BrowserWindow
instance.
let dialog = jancy.dialogFactory.create( browserWindow, { width: 400, height: 175, title: 'My Dialog' }, { centerRelativeToParent: true } )
This method just creates the instance and it won’t be visible on the screen. There’s generally more work that goes into actually making a useful dialog.