Home Reference Source
public class | source

ElectronApp

You can directly use an instance of this class. electronApp

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

appIcon: *

public

appName: *

public
Private Members
private
private

_defaultWindowBounds: {"width": number, "height": number}

private
private

_log: *

private

_npm: *

private

Method Summary

Public Methods
public

async addOpPackage(targetDir: *, opPackageLocation: *): *

public
public

async exportProjectFileDialog(exportName: *): *

public

init()

public

async installPackages(targetDir: *, packageNames: *, opName: undefined): *

public
public

openFile(patchFile: *)

public

async openPatch(patchFile: *, rebuildCache: boolean)

public

async pickDirDialog(defaultPath: undefined): *

public

async pickFileDialog(filePath: *, asUrl: boolean, filter: *[]): *

public

async pickOpDirDialog(): *

public
public

reload()

public

async saveFileDialog(defaultPath: *, title: undefined, properties: *[], filters: *[]): *

public

async saveProjectFileDialog(defaultPath: *): *

public

sendTalkerMessage(cmd: *, data: *)

public

setDocumentEdited(edited: *)

public
Private Methods
private
private
private

_dirDialog(title: *, properties: *, defaultPath: undefined): *

private

_fileDialog(title: *, filePath: undefined, asUrl: boolean, extensions: string[], properties: undefined): *

private

_handleError(title: *, error: *)

private

_initCaches(cb: *)

private
private

async _installNpmPackages(packageNames: *, targetDir: *, opName: undefined): *

private

_loadNpm(cb: undefined)

private

_projectFileDialog(title: *, properties: *): *

private
private
private
private
private
private
private
private
private
private

Public Constructors

public constructor() source

Public Members

public appIcon: * source

public appName: * source

public editorWindow: * source

Private Members

private _contentChanged: * source

private _defaultWindowBounds: {"width": number, "height": number} source

private _initialPatchFile: * source

private _log: * source

private _npm: * source

private _unsavedContentLeave: boolean source

Public Methods

public async addOpPackage(targetDir: *, opPackageLocation: *): * source

Params:

NameTypeAttributeDescription
targetDir *
opPackageLocation *

Return:

*

public cycleFullscreen() source

public async exportProjectFileDialog(exportName: *): * source

Params:

NameTypeAttributeDescription
exportName *

Return:

*

public init() source

public async installPackages(targetDir: *, packageNames: *, opName: undefined): * source

Params:

NameTypeAttributeDescription
targetDir *
packageNames *
opName undefined
  • optional
  • default: undefined

Return:

*

public isDocumentEdited(): * source

Return:

*

public openFile(patchFile: *) source

Params:

NameTypeAttributeDescription
patchFile *

public async openPatch(patchFile: *, rebuildCache: boolean) source

Params:

NameTypeAttributeDescription
patchFile *
rebuildCache boolean
  • optional
  • default: true

public async pickDirDialog(defaultPath: undefined): * source

Params:

NameTypeAttributeDescription
defaultPath undefined
  • optional
  • default: undefined

Return:

*

public async pickFileDialog(filePath: *, asUrl: boolean, filter: *[]): * source

Params:

NameTypeAttributeDescription
filePath *
asUrl boolean
  • optional
  • default: false
filter *[]
  • optional
  • default: []

Return:

*

public async pickOpDirDialog(): * source

Return:

*

public async pickProjectFileDialog(): * source

Return:

*

public reload() source

public async saveFileDialog(defaultPath: *, title: undefined, properties: *[], filters: *[]): * source

Params:

NameTypeAttributeDescription
defaultPath *
title undefined
  • optional
  • default: undefined
properties *[]
  • optional
  • default: []
filters *[]
  • optional
  • default: []

Return:

*

public async saveProjectFileDialog(defaultPath: *): * source

Params:

NameTypeAttributeDescription
defaultPath *

Return:

*

public sendTalkerMessage(cmd: *, data: *) source

Params:

NameTypeAttributeDescription
cmd *
data *

public setDocumentEdited(edited: *) source

Params:

NameTypeAttributeDescription
edited *

public updateTitle() source

Private Methods

private _createMenu() source

private _createWindow() source

private _dirDialog(title: *, properties: *, defaultPath: undefined): * source

Params:

NameTypeAttributeDescription
title *
properties *
defaultPath undefined
  • optional
  • default: undefined

Return:

*

private _fileDialog(title: *, filePath: undefined, asUrl: boolean, extensions: string[], properties: undefined): * source

Params:

NameTypeAttributeDescription
title *
filePath undefined
  • optional
  • default: undefined
asUrl boolean
  • optional
  • default: false
extensions string[]
  • optional
  • default: ["*"]
properties undefined
  • optional
  • default: undefined

Return:

*

private _handleError(title: *, error: *) source

Params:

NameTypeAttributeDescription
title *
error *

private _initCaches(cb: *) source

Params:

NameTypeAttributeDescription
cb *

private _inspectElements() source

private async _installNpmPackages(packageNames: *, targetDir: *, opName: undefined): * source

Params:

NameTypeAttributeDescription
packageNames *
targetDir *
opName undefined
  • optional
  • default: undefined

Return:

*

private _loadNpm(cb: undefined) source

Params:

NameTypeAttributeDescription
cb undefined
  • optional
  • default: undefined

private _projectFileDialog(title: *, properties: *): * source

Params:

NameTypeAttributeDescription
title *
properties *

Return:

*

private _registerListeners() source

private _registerShortcuts() source

private _reloadWindow() source

private _resetSizeAndPostion() source

private _resetZoom() source

private _showAbout() source

private _toggleDevTools() source

private _unsavedContentDialog(): * source

Return:

*

private _zoomIn() source

private _zoomOut() source