Class: Editor.Window

new Editor.Window (name[, options])

Window class for operating editor window.

Instance Methods

win.adjust (x, y, w, h)

Try to adjust the window to fit the position and size we give.

win.close ()

Close the window.

win.closeDevTools ()

Closes the devtools.

win.dispose ()

Dereference the native window.

win.emptyLayout ()

Clear all panels docked in current window.

win.focus ()

Focus on the window.

win.forceClose ()

Force close the window.

win.hide ()

Hide the window.

win.load (editorUrl, argv)

Load page by url, and send argv in query property of the url. The renderer process will parse the argv when the page is ready and save it in Editor.argv in renderer process.

win.minimize ()

Minimize the window.

win.openDevTools (options)

Opens the devtools.

win.popupMenu (template[, x, y])

Popup a context menu.

win.resetLayout ([url])

Reset the dock layout of current window via url

win.restore ()

Restore the window.

win.show ()

Show the window.

win.send (message[, ...args])

Send message with ...args to renderer process asynchronously. It is possible to add a callback as the last or the 2nd last argument to receive replies from the IPC receiver.

Instance Properties


If the window is focused.


If the window is loaded.


If this is a main window.


If the window is minimized.


Returns the id list of the panel dock on this window.

Static Properties


The url of the default layout.


The main window.


The current opened windows.

Static Methods

Editor.Window.addWindow ( win )

Add an Editor.Window to window list.

Editor.Window.find ( param )

Find window by name, by BrowserWindow instance or by WebContents instance. Returns the Editor.Window.

Editor.Window.removeWindow ( win )

Remove an Editor.Window from window list.

IPC Messages

Message: 'editor:window-center'

Message: 'editor:window-focus'

Message: 'editor:window-inspect-at'

Message: 'editor:window-load'

Message: 'editor:window-open'

Message: 'editor:window-query-layout'

Message: 'editor:window-remove-all-panels'

Message: 'editor:window-resize'

Message: 'editor:window-save-layout'